[pypy-commit] pypy pytest: resuffle the code in pypy/test_all.py, so a ./pytest.py run will not confuse at collection time

RonnyPfannschmidt noreply at buildbot.pypy.org
Sat Jan 21 17:47:19 CET 2012


Author: Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
Branch: pytest
Changeset: r51588:8237f969655e
Date: 2012-01-21 17:23 +0100
http://bitbucket.org/pypy/pypy/changeset/8237f969655e/

Log:	resuffle the code in pypy/test_all.py, so a ./pytest.py run will not
	confuse at collection time

diff --git a/pypy/test_all.py b/pypy/test_all.py
--- a/pypy/test_all.py
+++ b/pypy/test_all.py
@@ -11,11 +11,12 @@
 """
 import sys, os
 
-if len(sys.argv) == 1 and os.path.dirname(sys.argv[0]) in '.':
-    print >> sys.stderr, __doc__
-    sys.exit(2)
 
 if __name__ == '__main__':
+    if len(sys.argv) == 1 and os.path.dirname(sys.argv[0]) in '.':
+        print >> sys.stderr, __doc__
+        sys.exit(2)
+
     import tool.autopath
     import pytest
     import pytest_cov


More information about the pypy-commit mailing list