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.

…tion

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 force-pushed the v2-add-tox-tests-posargs branch from 7d555c5 to c9041bd Compare October 6, 2025 12:10
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