You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove coverage-chasing tests; fix BIMI x/y attribute check
Drop tests that asserted on contrived inputs solely to keep coverage
high, and fix the underlying bugs they were papering over.
- checkdmarc/bimi.py: SVG x/y forbidden-attribute capture was reading
the wrong xmltodict keys ("x"/"y" matches child elements, not
attributes), so the check_svg_requirements rejection never fired
on real SVGs. Switch to "@x"/"@y" and fix a typo that wrote the
y value into metadata["x"].
- checkdmarc/dnssec.py: Narrow three broad "except Exception" clauses
to (dns.exception.DNSException, OSError, EOFError) per AGENTS.md.
- tests/test_bimi.py: Delete TestSvgMetadataExtraAttributes; it built
malformed SVGs (with child <x>/<y>/<description>/<overflow> elements)
to exercise unreachable branches and even asserted on a known source
bug. Replace with one honest end-to-end test that proves the fixed
forbidden-attribute path works.
- tests/test_init.py: Delete testKnownGoodMocked — it patched all nine
check_* helpers to return canned valid dicts then asserted the canned
values came back. The network counterpart testKnownGood is the real
test.
- tests/test_dnssec.py: Delete testValidationExceptionContinues — it
existed only to exercise the broad except we've now narrowed away.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Apply ruff format to tests/test_dnssec.py
Trailing blank line at end of file. The previous commit ran
ruff check but missed ruff format.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Bump version to 5.16.2 and update changelog
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Cover the narrowed DNSSEC except clause with a real ValidationFailure
The narrowed exception handler in test_dnssec catches the actual
exception types dnspython raises. Exercise it with a real
dns.dnssec.ValidationFailure (the exception thrown on a genuine bad
signature) and assert on the function's contract: invalid DNSSEC
reports as not validated, rather than propagating.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Import ValidationFailure from dns.exception
dns.dnssec re-imports it from dns.exception but doesn't re-export it,
so pyright flags the dns.dnssec.ValidationFailure reference as a
reportPrivateImportUsage error. Use the canonical path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Sean Whalen <seanthegeek@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments