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

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 16, 2014, 9:17 a.m.
Message ID <a9555154aa62ffee7fe3.1416129425@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/6752/
State Accepted
Commit 37c3731d8a584fea0e6642d5e34d69a066a24729
Headers show

Comments

Siddharth Agarwal - Nov. 16, 2014, 9:17 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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.

Patch

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()