]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
cope with windows getaddrinfo
authorBob Halley <halley@dnspython.org>
Thu, 18 Jun 2020 14:32:02 +0000 (07:32 -0700)
committerBob Halley <halley@dnspython.org>
Thu, 18 Jun 2020 14:32:02 +0000 (07:32 -0700)
tests/test_resolver_override.py

index e60080b0fdcf6ac5542d92fee32c0744381c5271..bf98f09842d13c5758799b2df31c17a62de34243 100644 (file)
@@ -64,10 +64,14 @@ class OverrideSystemResolverTestCase(unittest.TestCase):
             return False
         for x in a:
             if x not in b:
-                print('NOT EQUIVALENT')
-                print(a)
-                print(b)
-                return False
+                # Windows does not set the protocol to non-zero, so try
+                # looking for a zero protocol.
+                y = (x[0], x[1], 0, x[3], x[4])
+                if y not in b:
+                    print('NOT EQUIVALENT')
+                    print(a)
+                    print(b)
+                    return False
         return True
 
     def equivalent(self, *args, **kwargs):