[PATCH 03 of 16] test-ancestor: define a main function

Siddharth Agarwal sid0 at fb.com
Sun Nov 16 03:17:05 CST 2014


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1416106364 28800
#      Sat Nov 15 18:52:44 2014 -0800
# Node ID a9555154aa62ffee7fe328e7f6f2f7585863724b
# Parent  0acf7d8386ab7425f041458fd021a23605fa2a5d
test-ancestor: define a main function

We're going to add to it in upcoming patches.

diff --git a/tests/test-ancestor.py b/tests/test-ancestor.py
--- a/tests/test-ancestor.py
+++ b/tests/test-ancestor.py
@@ -132,7 +132,10 @@
                     print "  C returned:      %s" % cgcas
                     print "  Python returned: %s" % pygcas
 
-if __name__ == '__main__':
+def main():
     test_missingancestors()
     test_lazyancestors()
     test_gca()
+
+if __name__ == '__main__':
+    main()


More information about the Mercurial-devel mailing list