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_commands.py b/Lib/test/test_commands.py
index 54ae676..77372c5 100644
--- a/Lib/test/test_commands.py
+++ b/Lib/test/test_commands.py
@@ -42,4 +42,10 @@
self.assert_(re.match(pat, getstatus("/bin/ls"), re.VERBOSE))
-run_unittest(CommandTests)
+
+def test_main():
+ run_unittest(CommandTests)
+
+
+if __name__ == "__main__":
+ test_main()