1. Pypy
  2. Untitled project
  3. pypy

Commits

Ronny Pfannschmidt  committed e14a978

better pytest path finding for testrunner

  • Participants
  • Parent commits 1ddcbcc
  • Branches refine-testrunner

Comments (0)

Files changed (1)

File testrunner/runner.py

View file
  • Ignore whitespace
     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