diff options
-rw-r--r-- | tests/conftest.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 7b8cf2753..8e35e1c24 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,9 +22,9 @@ """The qutebrowser test suite conftest file.""" import os +import pathlib import sys import warnings -import pathlib import pytest import hypothesis @@ -183,9 +183,10 @@ def pytest_collection_modifyitems(config, items): def pytest_ignore_collect(path): """Ignore BDD tests if we're unable to run them.""" + fspath = pathlib.Path(path) skip_bdd = hasattr(sys, 'frozen') - rel_path = path.relto(os.path.dirname(__file__)) - return rel_path == os.path.join('end2end', 'features') and skip_bdd + rel_path = fspath.is_relative_to(pathlib.Path(__file__).parent) + return rel_path == pathlib.Path('end2end') / 'features' and skip_bdd @pytest.fixture(scope='session') |