Kaydet (Commit) 654c11ee authored tarafından Guido van Rossum's avatar Guido van Rossum

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.)
üst 09638c16
...@@ -207,16 +207,16 @@ class GeneralModuleTests(unittest.TestCase): ...@@ -207,16 +207,16 @@ class GeneralModuleTests(unittest.TestCase):
except AttributeError: except AttributeError:
pass pass
## def testHostnameRes(self): def testHostnameRes(self):
## """Testing hostname resolution mechanisms.""" """Testing hostname resolution mechanisms."""
## hostname = socket.gethostname() hostname = socket.gethostname()
## ip = socket.gethostbyname(hostname) ip = socket.gethostbyname(hostname)
## self.assert_(ip.find('.') >= 0, "Error resolving host to ip.") self.assert_(ip.find('.') >= 0, "Error resolving host to ip.")
## hname, aliases, ipaddrs = socket.gethostbyaddr(ip) hname, aliases, ipaddrs = socket.gethostbyaddr(ip)
## all_host_names = [hname] + aliases all_host_names = [hname] + aliases
## fqhn = socket.getfqdn() fqhn = socket.getfqdn()
## if not fqhn in all_host_names: if not fqhn in all_host_names:
## self.fail("Error testing host resolution mechanisms.") self.fail("Error testing host resolution mechanisms.")
def testRefCountGetNameInfo(self): def testRefCountGetNameInfo(self):
"""Testing reference count for getnameinfo.""" """Testing reference count for getnameinfo."""
...@@ -498,7 +498,7 @@ class FileObjectClassTestCase(SocketConnectedTest): ...@@ -498,7 +498,7 @@ class FileObjectClassTestCase(SocketConnectedTest):
self.cli_file.write(MSG) self.cli_file.write(MSG)
self.cli_file.flush() self.cli_file.flush()
def test_main(): def main():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(GeneralModuleTests)) suite.addTest(unittest.makeSuite(GeneralModuleTests))
suite.addTest(unittest.makeSuite(BasicTCPTest)) suite.addTest(unittest.makeSuite(BasicTCPTest))
...@@ -508,4 +508,4 @@ def test_main(): ...@@ -508,4 +508,4 @@ def test_main():
test_support.run_suite(suite) test_support.run_suite(suite)
if __name__ == "__main__": if __name__ == "__main__":
test_main() main()
...@@ -175,11 +175,11 @@ class TimeoutTestCase(unittest.TestCase): ...@@ -175,11 +175,11 @@ class TimeoutTestCase(unittest.TestCase):
pass pass
def test_main(): def main():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(CreationTestCase)) suite.addTest(unittest.makeSuite(CreationTestCase))
suite.addTest(unittest.makeSuite(TimeoutTestCase)) suite.addTest(unittest.makeSuite(TimeoutTestCase))
test_support.run_suite(suite) test_support.run_suite(suite)
if __name__ == "__main__": if __name__ == "__main__":
test_main() main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment