[pypy-commit] pypy refine-testrunner: better pytest path finding for testrunner

RonnyPfannschmidt noreply at buildbot.pypy.org
Sat Feb 23 13:31:43 CET 2013


Author: Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
Branch: refine-testrunner
Changeset: r61660:e14a978b599b
Date: 2013-02-22 16:48 +0100
http://bitbucket.org/pypy/pypy/changeset/e14a978b599b/

Log:	better pytest path finding for testrunner

diff --git a/testrunner/runner.py b/testrunner/runner.py
--- a/testrunner/runner.py
+++ b/testrunner/runner.py
@@ -146,10 +146,8 @@
     run = staticmethod(util.run)
     dry_run = staticmethod(util.dry_run)
 
-    pytestpath = os.path.abspath(os.path.join('py', 'bin', 'py.test'))
-    if not os.path.exists(pytestpath):
-        pytestpath = os.path.abspath(os.path.join('pytest.py'))
-        assert os.path.exists(pytestpath)
+    pytestpath = py.path.local(__file__).dirpath().dirpath().join('pytest.py')
+    assert pytestpath.check()
     test_driver = [pytestpath]
 
     cherrypick = None


More information about the pypy-commit mailing list