]> granicus.if.org Git - python/commitdiff
Comment out testHostnameRes() -- it depends on a correctly working
authorGuido van Rossum <guido@python.org>
Thu, 13 Jun 2002 16:54:38 +0000 (16:54 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 13 Jun 2002 16:54:38 +0000 (16:54 +0000)
DNS, and we can't assume that.

Lib/test/test_socket.py

index a2db64a5c8758c15241dcb602892d2c270a494d4..de105ba6f56b2ca8712273109ea4d7dcd758cf7c 100644 (file)
@@ -207,16 +207,16 @@ class GeneralModuleTests(unittest.TestCase):
             except AttributeError:
                 pass
 
-    def testHostnameRes(self):
-        """Testing hostname resolution mechanisms."""
-        hostname = socket.gethostname()
-        ip = socket.gethostbyname(hostname)
-        self.assert_(ip.find('.') >= 0, "Error resolving host to ip.")
-        hname, aliases, ipaddrs = socket.gethostbyaddr(ip)
-        all_host_names = [hname] + aliases
-        fqhn = socket.getfqdn()
-        if not fqhn in all_host_names:
-            self.fail("Error testing host resolution mechanisms.")
+##    def testHostnameRes(self):
+##        """Testing hostname resolution mechanisms."""
+##        hostname = socket.gethostname()
+##        ip = socket.gethostbyname(hostname)
+##        self.assert_(ip.find('.') >= 0, "Error resolving host to ip.")
+##        hname, aliases, ipaddrs = socket.gethostbyaddr(ip)
+##        all_host_names = [hname] + aliases
+##        fqhn = socket.getfqdn()
+##        if not fqhn in all_host_names:
+##            self.fail("Error testing host resolution mechanisms.")
 
     def testRefCountGetNameInfo(self):
         """Testing reference count for getnameinfo."""