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

conftest: remove hacks/shims for running tests on Python 3.3 #2123

Merged
merged 1 commit into from
Jul 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ def pytest_addoption(parser):


def pytest_collection_modifyitems(config, items):
# first, make sure things run in order
# needed to mitigate some weird quirk of vcrpy on Python 3.3, no idea why
items.sort(key=lambda item: (item.fspath or '') + '::' + item.name)

# rest of this is handling for "offline mode"
# handle running tests in "offline mode"
if not config.getoption('--offline'):
# nothing to skip
return
Expand All @@ -41,10 +37,3 @@ def vcr_cassette_dir(request):
# We know it's part of Sopel...
parts = parts[1:]
return os.path.join('test', 'vcr', *parts)


@pytest.fixture
def vcr_cassette_path(request, vcr_cassette_name):
# pytest-vcr 0.3.0 looks for this fixture name
# remove when killing off Python 3.3 support
return os.path.join(vcr_cassette_dir(request), vcr_cassette_name)