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

Commit 13c2224

Browse files
committed
Workaround for a bug in pytest<3.0.5: pytest-dev/pytest#2016
1 parent 06c7998 commit 13c2224

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pypy/module/_cppyy/test/conftest.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import py, sys
2+
from os.path import abspath, commonprefix, dirname
3+
4+
THIS_DIR = dirname(__file__)
25

36
@py.test.mark.tryfirst
47
def pytest_runtest_setup(item):
@@ -29,10 +32,11 @@ def pytest_runtest_setup(item):
2932
py.test.skip(infomsg)
3033

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

3741
disabled = None
3842

0 commit comments

Comments
 (0)