Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Use local pytest-cache loader
Browse files Browse the repository at this point in the history
Additional code is required to properly initalize pytest-cache when it's installed into a local egg in the current working directory.

Fix from here:

    https://bitbucket.org/hpk42/pytest-cache/issue/8/pytest-cache-plugin-not-loading-when-using

Without this, I get:
.....
running build_ext
usage: setup.py [options] [file_or_dir] [file_or_dir] [...]
setup.py: error: unrecognized arguments: --clearcache
  • Loading branch information
danpat committed Jun 6, 2014
1 parent 55863b8 commit 76299a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def finalize_options(self):

def run_tests(self):
import pytest
import _pytest.config
pm = _pytest.config.get_plugin_manager()
pm.consider_setuptools_entrypoints()
errno = pytest.main(self.test_args)
sys.exit(errno)

Expand Down

0 comments on commit 76299a5

Please sign in to comment.