Factor out common boilerplate for test_support
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 @@
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 @@
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()