summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-06-13 20:24:17 (GMT)
committerGuido van Rossum <guido@python.org>2002-06-13 20:24:17 (GMT)
commit654c11ee3a2c9b72c040524c9cc4f95a1858f20b (patch)
treeb181aaff2bfb64b91e908e491b72809eb89e1874 /Lib/test/test_socket.py
parent09638c16d842c77c7b9f7c0f339508c0b2a40feb (diff)
downloadcpython-654c11ee3a2c9b72c040524c9cc4f95a1858f20b.zip
cpython-654c11ee3a2c9b72c040524c9cc4f95a1858f20b.tar.gz
cpython-654c11ee3a2c9b72c040524c9cc4f95a1858f20b.tar.bz2
Temporarily disable the timeout and socket tests.
They still run as standalone scripts, but when used as part of the regression test suite, they are effectively no-ops. (This is done by renaming test_main to main.)
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index de105ba..b4540a4 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -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."""
@@ -498,7 +498,7 @@ class FileObjectClassTestCase(SocketConnectedTest):
self.cli_file.write(MSG)
self.cli_file.flush()
-def test_main():
+def main():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(GeneralModuleTests))
suite.addTest(unittest.makeSuite(BasicTCPTest))
@@ -508,4 +508,4 @@ def test_main():
test_support.run_suite(suite)
if __name__ == "__main__":
- test_main()
+ main()