]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
add instrumentation to find out what v6 addresses windows does not like
authorBob Halley <halley@dnspython.org>
Wed, 19 Aug 2020 02:34:20 +0000 (19:34 -0700)
committerBob Halley <halley@dnspython.org>
Wed, 19 Aug 2020 02:34:20 +0000 (19:34 -0700)
tests/test_address.py

index 822290843a0acce6112906b5dac3454d693fbfd3..98150f2ce1b1494d259c450c93444c65ea64ac08 100644 (file)
@@ -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))