2 new commits in pytest:
https://bitbucket.org/hpk42/pytest/commits/9f1c5ee5a82b/
Changeset: 9f1c5ee5a82b
Branch: tbekolay/better-setuptools-integration-in-goodpra-1400520902689
User: tbekolay
Date: 2014-05-19 19:35:28
Summary: Better setuptools integration in goodpractices
Affected #: 1 file
diff -r 9a891617d5a28b75043d1f6480bf41b8f39ddc2f -r
9f1c5ee5a82b1496a47e3e3890ab1412d2b54caa doc/en/goodpractises.txt
--- a/doc/en/goodpractises.txt
+++ b/doc/en/goodpractises.txt
@@ -229,6 +229,12 @@
class PyTest(TestCommand):
+ user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
+
+ def initialize_options(self):
+ TestCommand.initialize_options(self)
+ self.pytest_args = None
+
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
@@ -237,7 +243,7 @@
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import pytest
- errno = pytest.main(self.test_args)
+ errno = pytest.main(self.pytest_args)
sys.exit(errno)
@@ -252,7 +258,12 @@
python setup.py test
this will download ``pytest`` if needed and then run your tests
-as you would expect it to.
+as you would expect it to. You can pass a single string of arguments
+using the ``--pytest-args`` or ``-a`` command-line option. For example::
+
+ python setup.py test -a "--durations=5"
+
+is equivalent to running ``py.test --durations=5``.
.. _`test discovery`:
.. _`Python test discovery`:
https://bitbucket.org/hpk42/pytest/commits/7b67cc5603a6/
Changeset: 7b67cc5603a6
User: hpk42
Date: 2014-05-19 20:30:54
Summary: Merged in
tbekolay/pytest/tbekolay/better-setuptools-integration-in-goodpra-1400520902689
(pull request #171)
Better setuptools integration in goodpractices
Affected #: 1 file
diff -r 9a891617d5a28b75043d1f6480bf41b8f39ddc2f -r
7b67cc5603a6d67b8867874595a82e9a8137233e doc/en/goodpractises.txt
--- a/doc/en/goodpractises.txt
+++ b/doc/en/goodpractises.txt
@@ -229,6 +229,12 @@
class PyTest(TestCommand):
+ user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
+
+ def initialize_options(self):
+ TestCommand.initialize_options(self)
+ self.pytest_args = None
+
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
@@ -237,7 +243,7 @@
def run_tests(self):
#import here, cause outside the eggs aren't loaded
import pytest
- errno = pytest.main(self.test_args)
+ errno = pytest.main(self.pytest_args)
sys.exit(errno)
@@ -252,7 +258,12 @@
python setup.py test
this will download ``pytest`` if needed and then run your tests
-as you would expect it to.
+as you would expect it to. You can pass a single string of arguments
+using the ``--pytest-args`` or ``-a`` command-line option. For example::
+
+ python setup.py test -a "--durations=5"
+
+is equivalent to running ``py.test --durations=5``.
.. _`test discovery`:
.. _`Python test discovery`:
Repository URL: https://bitbucket.org/hpk42/pytest/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
pytest-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-commit