diff options
author | Collin Winter <collinw@gmail.com> | 2007-04-25 17:29:52 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-04-25 17:29:52 (GMT) |
commit | c2898c5a678e6dd00c3e0b18a214fcd7a3533800 (patch) | |
tree | dfaedbddee7b0ef79a19527788b8a720658e79bb /Lib/test/test_wsgiref.py | |
parent | 0d4c06e06e5ee1f3bb1fa8068114bd700d74864a (diff) | |
download | cpython-c2898c5a678e6dd00c3e0b18a214fcd7a3533800.zip cpython-c2898c5a678e6dd00c3e0b18a214fcd7a3533800.tar.gz cpython-c2898c5a678e6dd00c3e0b18a214fcd7a3533800.tar.bz2 |
Standardize on test.test_support.run_unittest() (as opposed to a mix of run_unittest() and run_suite()). Also, add functionality to run_unittest() that admits usage of unittest.TestLoader.loadTestsFromModule().
Diffstat (limited to 'Lib/test/test_wsgiref.py')
-rwxr-xr-x | Lib/test/test_wsgiref.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/test/test_wsgiref.py b/Lib/test/test_wsgiref.py index 1ec271b..b6d994b 100755 --- a/Lib/test/test_wsgiref.py +++ b/Lib/test/test_wsgiref.py @@ -1,5 +1,5 @@ from __future__ import nested_scopes # Backward compat for 2.1 -from unittest import TestSuite, TestCase, makeSuite +from unittest import TestCase from wsgiref.util import setup_testing_defaults from wsgiref.headers import Headers from wsgiref.handlers import BaseHandler, BaseCGIHandler @@ -11,6 +11,7 @@ from StringIO import StringIO from SocketServer import BaseServer import re, sys +from test import test_support class MockServer(WSGIServer): """Non-socket HTTP server""" @@ -575,11 +576,7 @@ class HandlerTests(TestCase): # This epilogue is needed for compatibility with the Python 2.5 regrtest module def test_main(): - import unittest - from test.test_support import run_suite - run_suite( - unittest.defaultTestLoader.loadTestsFromModule(sys.modules[__name__]) - ) + test_support.run_unittest(__name__) if __name__ == "__main__": test_main() |