You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That works, all fine. However, it runs the complete test suite. If you work on a single test function, it is currently not possible to run this alone. You always have to run the complete test suite.
Proposed Solution
I would propose the following small patch to introduce the posargs argument:
Without the posargs argument tox has to run the
*complete* test suite. With this patch, you can
pass a test file and a test function. That allows tox
to only run this specific test function. For example:
$ tox -e py36 test_semver.py::test_should_bump_major
Fix#146: improve tox.ini/.travis.yml
* Changes in tox.ini:
* add posargs for pytest. This allows to run only a single test function.
* Rename py.test -> pytest as the old spelling py.test will be deprecated in the future.
* Changes in .travis.yml:
* Add cache for pip to speed up things a little bit
* Add tox as a installation requirement
* Replace setup.py with tox as it discouraged in https://tox.readthedocs.io/en/latest/example/basic.html#integration-with-setup-py-test-command
Situation
Usually you run
tox
like this:That works, all fine. However, it runs the complete test suite. If you work on a single test function, it is currently not possible to run this alone. You always have to run the complete test suite.
Proposed Solution
I would propose the following small patch to introduce the
posargs
argument:This makes it possible to run
tox
only for the test functiontest_should_bump_major
:With this single patch, it is even possible to use it for the
setup.py
script:The text was updated successfully, but these errors were encountered: