[PATCH 1 of 5] run-tests: loadable as module

Simon Heimberg simohe at besonet.ch
Tue Feb 8 00:55:59 CST 2011


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1296589625 -3600
# Node ID b03c10c7c66e0ff1fbc3524185217f1cc3599c40
# Parent  0d1dca7d2a041cb1cb6c6bd90608aa87068bde02
run-tests: loadable as module

diff -r 0d1dca7d2a04 -r b03c10c7c66e tests/run-tests.py
--- a/tests/run-tests.py	Fre Jan 28 03:09:22 2011 +0100
+++ b/tests/run-tests.py	Die Feb 01 20:47:05 2011 +0100
@@ -1109,4 +1109,5 @@
         time.sleep(1)
         cleanup(options)
 
-main()
+if __name__ == '__main__':
+    main()


More information about the Mercurial-devel mailing list