diff options
author | Raymond Hettinger <python@rcn.com> | 2003-04-27 07:54:23 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-04-27 07:54:23 (GMT) |
commit | 9dcbbea87867f38f7994dd96388266114ef0c162 (patch) | |
tree | 4dfcbbd65dcca3232918b6e30dde5625f83435b2 /Lib/test/test_os.py | |
parent | c23fb774772949b7861f91eec987b1cd414d5a3c (diff) | |
download | cpython-9dcbbea87867f38f7994dd96388266114ef0c162.zip cpython-9dcbbea87867f38f7994dd96388266114ef0c162.tar.gz cpython-9dcbbea87867f38f7994dd96388266114ef0c162.tar.bz2 |
Factor out common boilerplate for test_support
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index cf67ef8..94c0bfb 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -9,7 +9,7 @@ import warnings warnings.filterwarnings("ignore", "tempnam", RuntimeWarning, __name__) warnings.filterwarnings("ignore", "tmpnam", RuntimeWarning, __name__) -from test.test_support import TESTFN, run_suite +from test.test_support import TESTFN, run_classtests class TemporaryFileTests(unittest.TestCase): def setUp(self): @@ -282,14 +282,10 @@ class WalkTests(unittest.TestCase): os.rmdir(TESTFN) def test_main(): - suite = unittest.TestSuite() - for cls in (TemporaryFileTests, - StatAttributeTests, - EnvironTests, - WalkTests, - ): - suite.addTest(unittest.makeSuite(cls)) - run_suite(suite) + run_classtests(TemporaryFileTests, + StatAttributeTests, + EnvironTests, + WalkTests) if __name__ == "__main__": test_main() |