summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-03-19 15:15:14 +0100
committerGitHub <noreply@github.com>2021-03-19 15:15:14 +0100
commit3e4be9ddb7713e4eca601bc286b0ef456f72145c (patch)
tree486731a30521061f18f9ce8f53993af4d072e40d
parent7207c88a56db4240bb2408dcb46a9f641f08408e (diff)
parent169062f646a33947ea245c1fbfa540306ea4842c (diff)
downloadqutebrowser-3e4be9ddb7713e4eca601bc286b0ef456f72145c.tar.gz
qutebrowser-3e4be9ddb7713e4eca601bc286b0ef456f72145c.zip
Merge pull request #6290 from Lembrun/pathlib-/tests/conftest.py
Pathlib /tests/conftest.py
-rw-r--r--tests/conftest.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 7b8cf2753..6275cdd02 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.relative_to(pathlib.Path(__file__).parent)
+ return rel_path == pathlib.Path('end2end') / 'features' and skip_bdd
@pytest.fixture(scope='session')