summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 12d6e62..3458a07 100644
--- a/setup.py
+++ b/setup.py
@@ -91,17 +91,24 @@ else:
class pytest(setuptools.command.test.test):
- user_options = [('pytest-args=', 'a', 'Arguments to pass to py.test')]
+ user_options = [
+ ('pytest-args=', 'a', 'Arguments to pass to py.test'),
+ ('pytest-env=', 'E', 'Only run tests matching the environment'),
+ ]
def initialize_options(self):
setuptools.command.test.test.initialize_options(self)
self.pytest_args = ''
+ self.pytest_env = None
def run_tests(self):
import pytest
pytest_args = self.pytest_args.split(' ')
+ if self.pytest_env:
+ pytest_args = pytest_args + ['-E', self.pytest_env]
sys.exit(pytest.main(pytest_args))
+
setuptools.setup(
name=NAME,
packages=setuptools.find_packages(exclude=['ez_setup', 't', 't.*']),