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_mhlib.py b/Lib/test/test_mhlib.py index 30f8ca3..9d5f101 100644 --- a/Lib/test/test_mhlib.py +++ b/Lib/test/test_mhlib.py
@@ -331,4 +331,10 @@ msg.fp.close() del msg -run_unittest(MhlibTests) + +def test_main(): + run_unittest(MhlibTests) + + +if __name__ == "__main__": + test_main()