summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-08-18 19:34:20 -0700
committerBob Halley <halley@dnspython.org>2020-08-18 19:34:20 -0700
commit98d8b13fe3efef91e690a789817ad0006df4f70a (patch)
treee5ecf74364ae8627c419850b1173f143ed467895 /tests
parent1b2af789ffc6c8da54dda199a94c9d79797d356c (diff)
downloaddnspython-98d8b13fe3efef91e690a789817ad0006df4f70a.tar.gz
add instrumentation to find out what v6 addresses windows does not like
Diffstat (limited to 'tests')
-rw-r--r--tests/test_address.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_address.py b/tests/test_address.py
index 8222908..98150f2 100644
--- a/tests/test_address.py
+++ b/tests/test_address.py
@@ -1,6 +1,7 @@
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
import socket
+import sys
import unittest
import dns.exception
@@ -247,6 +248,12 @@ class IPv6Tests(unittest.TestCase):
"::0:a:b:c:d:e:f",
"a:b:c:d:e:f:0::",
)
+ if sys.platform == 'win32':
+ for s in valid:
+ try:
+ socket.inet_pton(socket.AF_INET6, s)
+ except Exception:
+ print('win32 rejects:', s)
for s in valid:
self.assertEqual(dns.ipv6.inet_aton(s),
socket.inet_pton(socket.AF_INET6, s))