Skip to content

Extend tox.ini with testpaths and {posargs} in poetry-pytest invocation #2067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisinmtown
Copy link
Contributor

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

…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
Copy link
Contributor Author

chrisinmtown commented Jul 17, 2025

I'm impatient :) and don't like waiting for all 802 tests to run in all 6 test environments. This change makes it possible for faster code-test cycles. Please consider, comment, etc., thank you.

@coveralls
Copy link

Coverage Status

coverage: 94.354%. remained the same
when pulling 861ab3d on chrisinmtown:add-tox-tests-posargs
into a1c53db on spec-first:main.

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.

2 participants