From 222c6cdadf771cb469d79fe9c3791fac22a05ad0 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sun, 13 Oct 2024 12:46:54 +0100 Subject: [PATCH] specify only v4 --- tests/test_sockets.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_sockets.py b/tests/test_sockets.py index 4ecb5d8f..3ab542e5 100644 --- a/tests/test_sockets.py +++ b/tests/test_sockets.py @@ -329,10 +329,11 @@ async def test_happy_eyeballs_refcycles(self) -> None: """ Test derived from https://github.com/python/cpython/pull/124859 """ - port = ephemeral_port_reserve.reserve() + ip = "127.0.0.1" + port = ephemeral_port_reserve.reserve(ip=ip) exc = None try: - async with await connect_tcp("localhost", port): + async with await connect_tcp(ip, port): pass except OSError as e: exc = e.__cause__