[pypy-commit] pypy arm-backend-2: do not consider the file pypy/test_all.py as a test_xxx.py test file when collecting directories

bivab noreply at buildbot.pypy.org
Thu Jul 5 14:25:15 CEST 2012


Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r55926:2ad609c205d8
Date: 2012-07-05 14:24 +0200
http://bitbucket.org/pypy/pypy/changeset/2ad609c205d8/

Log:	do not consider the file pypy/test_all.py as a test_xxx.py test file
	when collecting directories

diff --git a/testrunner/runner.py b/testrunner/runner.py
--- a/testrunner/runner.py
+++ b/testrunner/runner.py
@@ -302,7 +302,11 @@
 
     def is_test_py_file(self, p):
         name = p.basename
-        return name.startswith('test_') and name.endswith('.py')
+        # XXX avoid picking up pypy/test_all.py as a test test_xxx.py file else
+        # the pypy directory is not traversed and picked up as one test
+        # directory
+        return (self.reltoroot(p) != 'pypy/test_all.py'
+                    and (name.startswith('test_') and name.endswith('.py')))
 
     def reltoroot(self, p):
         rel = p.relto(self.root)


More information about the pypy-commit mailing list