Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Workaround for a bug in pytest<3.0.5: pytest-dev/pytest#2016
Browse files Browse the repository at this point in the history
  • Loading branch information
rlamy committed Nov 16, 2018
1 parent 06c7998 commit 13c2224
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pypy/module/_cppyy/test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import py, sys
from os.path import abspath, commonprefix, dirname

THIS_DIR = dirname(__file__)

@py.test.mark.tryfirst
def pytest_runtest_setup(item):
Expand Down Expand Up @@ -29,10 +32,11 @@ def pytest_runtest_setup(item):
py.test.skip(infomsg)

def pytest_ignore_collect(path, config):
path = str(path)
if py.path.local.sysfind('genreflex') is None and config.option.runappdirect:
return True # "can't run dummy tests in -A"
return commonprefix([path, THIS_DIR]) == THIS_DIR
if disabled:
return True
return commonprefix([path, THIS_DIR]) == THIS_DIR

disabled = None

Expand Down

0 comments on commit 13c2224

Please sign in to comment.