[Python-checkins] cpython (3.4): Invoke test_urllibnet tests using unittest.main function

senthil.kumaran python-checkins at python.org
Tue Apr 15 03:32:20 CEST 2014


http://hg.python.org/cpython/rev/2755403682ad
changeset:   90310:2755403682ad
branch:      3.4
parent:      90304:008486e18e90
user:        Senthil Kumaran <senthil at uthcode.com>
date:        Mon Apr 14 21:31:41 2014 -0400
summary:
  Invoke test_urllibnet tests using unittest.main function

files:
  Lib/test/test_urllibnet.py |  10 +++-------
  1 files changed, 3 insertions(+), 7 deletions(-)


diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -10,6 +10,8 @@
 import time
 
 
+support.requires('network')
+
 class URLTimeoutTest(unittest.TestCase):
     # XXX this test doesn't seem to test anything useful.
 
@@ -206,11 +208,5 @@
                                 " >= total size in %s" % records_repr)
 
 
-def test_main():
-    support.requires('network')
-    support.run_unittest(URLTimeoutTest,
-                         urlopenNetworkTests,
-                         urlretrieveNetworkTests)
-
 if __name__ == "__main__":
-    test_main()
+    unittest.main()

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list