Skip to content

Rename the second test_af_inferred_from_where so the IPv4 case runs - #1304

Merged
rthalley merged 1 commit into
rthalley:mainfrom
dylanpulver:tests/unshadow-af-inferred-from-where
Sep 27, 2026
Merged

rthalley merged 1 commit into
rthalley:mainfrom
dylanpulver:tests/unshadow-af-inferred-from-where

Conversation

@dylanpulver

Copy link
Copy Markdown
Contributor

DestinationAndSourceTests defines test_af_inferred_from_where twice, on consecutive methods. Python keeps the later one, so only the IPv6 case runs:

def test_af_inferred_from_where(self):
    af, d, s = _d_and_s("1.2.3.4", 53, None, 0)
    self.assertEqual(af, socket.AF_INET)

def test_af_inferred_from_where(self):
    af, d, s = _d_and_s("1::2", 53, None, 0)
    self.assertEqual(af, socket.AF_INET6)

So inferring AF_INET from an IPv4 where has no test.

Renaming the second to test_v6_af_inferred_from_where, matching the test_v6_* names already in the file, puts the IPv4 case back. DestinationAndSourceTests goes from 8 to 9 passing.

🤖 Generated with Claude Code

https://claude.ai/code/session_011M5uTyCU4WcNTsPvGrErDo

The IPv6 case reused the IPv4 case's name, so only one of the two ran.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011M5uTyCU4WcNTsPvGrErDo
@rthalley
rthalley merged commit c161688 into rthalley:main Sep 27, 2026
10 of 11 checks passed
@rthalley

Copy link
Copy Markdown
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants