Skip to content

Commit

Permalink
Merge pull request #2123 from sopel-irc/conftest-deadsnakes
Browse files Browse the repository at this point in the history
conftest: remove hacks/shims for running tests on Python 3.3
  • Loading branch information
dgw authored Jul 6, 2021
2 parents 8f38990 + eebef21 commit 86cbbe4
Showing 1 changed file with 1 addition and 12 deletions.
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)

0 comments on commit 86cbbe4

Please sign in to comment.