Files
parsedmarc/tests
5c7f4ba048 Clear shared IP cache in parallel test setUp for isolation (#866)
tests/test_parallel.py's parity test compares sequential
parse_report_file(path, offline=True) results in the parent process
against results from cold worker processes. When the full suite runs
locally (GITHUB_ACTIONS unset), tests/test_init.py runs first with real
DNS lookups and warms the shared module-level
parsedmarc.IP_ADDRESS_CACHE; get_ip_address_info consults the cache
before honoring offline, so the sequential baseline returned
DNS-enriched entries (e.g. reverse_dns='smtp7.cardinal.com') while the
workers correctly returned None, failing the test. CI never sees this
because it runs offline from the start.

Clear the cache in _ParallelTestCase.setUp so baselines and workers
both start cold. Test-only change; the cache-before-offline ordering in
utils.py is intentional (a cache hit makes no network queries).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 18:41:08 -04:00
..