diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2011-12-02 15:57:31 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2011-12-02 15:57:31 -0500 |
commit | f6062b8d4322827f80f5d40e0ab4c1cb4e9c2275 (patch) | |
tree | 3221c2cb2fc0842d2b3ccde2b07adb718da4134a | |
parent | b1410c2434f959f0faa30020b63f53b761b0a7e1 (diff) | |
download | pytest-runner-f6062b8d4322827f80f5d40e0ab4c1cb4e9c2275.tar.gz |
Added support for getting extras when running tests
-rw-r--r-- | command.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -15,10 +15,12 @@ class PyTest(_pytest_runner_test.test): user_options = [ ('junitxml=', None, "Output jUnit XML test results to specified " "file"), + ('extras', None, "Install (all) setuptools extras when running tests"), ] def initialize_options(self): self.junitxml=None + self.extras=False def finalize_options(self): pass @@ -28,6 +30,9 @@ class PyTest(_pytest_runner_test.test): self.distribution.fetch_build_eggs(self.distribution.install_requires) if self.distribution.tests_require: self.distribution.fetch_build_eggs(self.distribution.tests_require) + if self.distribution.extras_require and self.extras: + map(self.distribution.fetch_build_eggs, + self.distribution.extras_require.values()) if self.dry_run: self.announce('skipping tests (dry run)') return |