Skip to content

Commit ae93fc1

Browse files
committed
skip IPv6 test if host doesn't have IPv6
Signed-off-by: Matt Cipperly <[email protected]>
1 parent 3e2c2e6 commit ae93fc1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_sender.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,12 @@ def recv(self, bufsize, flags=0):
293293
self._sender.socket = old_sock
294294

295295
def test_ipv6_only(self):
296+
# Test if our host supports IPv6 before running this test
297+
try:
298+
socket.gethostbyaddr('::1')
299+
except socket.gaierror:
300+
self.skipTest("Host does not support IPv6, cannot run this test")
301+
296302
self.tearDown()
297303

298304
real_getaddrinfo = socket.getaddrinfo

0 commit comments

Comments
 (0)