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_copy_reg.py b/Lib/test/test_copy_reg.py
index 51ec60b..0f5c96f 100644
--- a/Lib/test/test_copy_reg.py
+++ b/Lib/test/test_copy_reg.py
@@ -22,4 +22,9 @@
type(1), int, "not a callable")
-test_support.run_unittest(CopyRegTestCase)
+def test_main():
+ test_support.run_unittest(CopyRegTestCase)
+
+
+if __name__ == "__main__":
+ test_main()