Skip to content

Conversation

chrisinmtown
Copy link
Contributor

@chrisinmtown chrisinmtown commented Jul 18, 2025

This allows limiting the scope of the test run, which can save much time.

Run one test in one test environment:

tox -e py39 -- tests/test_api.py::test_api

Run one test in all test environments:

tox -- tests/test_api.py::test_api

Run all tests in one file in one test environment:

tox -e py39 -- tests/test_api.py

Run all tests in one file in all test environments:

tox -- tests/test_api.py

@chrisinmtown chrisinmtown changed the title Extend tox.ini with testpaths and {posargs} in poetry-pytest invocation (v2) Extend tox.ini with testpaths and {posargs} in poetry-pytest invocation Jul 18, 2025
@chrisinmtown
Copy link
Contributor Author

I back-ported this tiny change from V3, it makes testing just a little bit easier. Please consider it in the next round, thank you.

@chrisinmtown chrisinmtown force-pushed the v2-add-tox-tests-posargs branch 3 times, most recently from 96adabc to 8b92ac8 Compare October 13, 2025 12:00
This allows limiting the scope of the test run, which can save much time.

Run all tests:
    tox
Run all tests in one file in all test environments:
    tox -- tests/test_api.py
Run one test in all test environments:
    tox -- tests/test_api.py::test_api
Run all tests in one test environment:
    tox -e py39
Run all tests in one file in one test environment:
    tox -e py39 -- tests/test_api.py
Run one test in one test environment:
    tox -e py39 -- tests/test_api.py::test_api
@chrisinmtown chrisinmtown force-pushed the v2-add-tox-tests-posargs branch from 8b92ac8 to ce3c399 Compare October 13, 2025 12:56
@chrisinmtown chrisinmtown changed the title (v2) Extend tox.ini with testpaths and {posargs} in poetry-pytest invocation (v2) Extend tox.ini with {posargs} in poetry-pytest invocation Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant