commit | 2e2be3760ccdfd4bdde4afdd66f4078022ba3b61 | [log] [tgz] |
---|---|---|
author | Fred Drake <fdrake@acm.org> | Thu Sep 20 21:33:42 2001 +0000 |
committer | Fred Drake <fdrake@acm.org> | Thu Sep 20 21:33:42 2001 +0000 |
tree | d1b7dce65ddcecf2f312acfdb319ba656e99c3a1 | |
parent | 6f7993765ac0989b5d13084240797913627a31d8 [diff] [blame] |
Change the PyUnit-based tests to use the test_main() approach. This allows using the tests with unittest.py as a script. The tests will still run when run as a script themselves.
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 9cddb5f..3f26f2f 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py
@@ -62,5 +62,9 @@ self.check_tempfile(os.tmpnam()) +def test_main(): + run_unittest(TemporaryFileTests) -run_unittest(TemporaryFileTests) + +if __name__ == "__main__": + test_main()