Automatically skip BDD tests on pytest 3.0
See https://github.com/pytest-dev/pytest-bdd/pull/193 This at least allows us to play with pytest 3.0 a bit...
This commit is contained in:
parent
747be14118
commit
323b181227
@ -120,10 +120,11 @@ def pytest_collection_modifyitems(items):
|
|||||||
|
|
||||||
|
|
||||||
def pytest_ignore_collect(path):
|
def pytest_ignore_collect(path):
|
||||||
"""Ignore BDD tests during collection if frozen."""
|
"""Ignore BDD tests if we're unable to run them."""
|
||||||
|
skip_bdd = (hasattr(sys, 'frozen') or
|
||||||
|
int(pytest.__version__.split('.')[0]) == 3)
|
||||||
rel_path = path.relto(os.path.dirname(__file__))
|
rel_path = path.relto(os.path.dirname(__file__))
|
||||||
return (rel_path == os.path.join('end2end', 'features') and
|
return rel_path == os.path.join('end2end', 'features') and skip_bdd
|
||||||
hasattr(sys, 'frozen'))
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
|
Loading…
Reference in New Issue
Block a user