summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2011-12-02 15:57:31 -0500
committerJason R. Coombs <jaraco@jaraco.com>2011-12-02 15:57:31 -0500
commitf6062b8d4322827f80f5d40e0ab4c1cb4e9c2275 (patch)
tree3221c2cb2fc0842d2b3ccde2b07adb718da4134a
parentb1410c2434f959f0faa30020b63f53b761b0a7e1 (diff)
downloadpytest-runner-f6062b8d4322827f80f5d40e0ab4c1cb4e9c2275.tar.gz
Added support for getting extras when running tests
-rw-r--r--command.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/command.py b/command.py
index c21037c..cd5973d 100644
--- a/command.py
+++ b/command.py
@@ -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