Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pathlib /tests/conftest.py #6290

Merged
merged 9 commits into from Mar 19, 2021
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"""The qutebrowser test suite conftest file."""

import os
import pathlib
import sys
import warnings
import pathlib

import pytest
import hypothesis
Expand Down Expand Up @@ -184,8 +184,8 @@ def pytest_collection_modifyitems(config, items):
def pytest_ignore_collect(path):
"""Ignore BDD tests if we're unable to run them."""
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 = path.relto(str(pathlib.Path(__file__).parent))
return rel_path == pathlib.Path('end2end') / 'end2end' and skip_bdd


@pytest.fixture(scope='session')
Expand Down