Even if `tests-dir` is specified, pytest still collects tests on all the repository
See original GitHub issueLong story short, I have a repository which is quite packed, including sub-directory that have their own tests sub-sub-directory.
When I run mutmut run --tests-dir tests/unit/
, the first step still runs python -m pytest -x
, which fails on my use case (because of the tests sub-sub-directories which should not be executed).
I would have expected mutmut to run python -m pytest -x tests/unit/
instead.
Is there a point to run pytest on the whole repository or is it an oversight?
(version 1.6.0)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
pytest is running the testcases even I specify to collect only ...
When I run py.test --collect-only , the test case is run instead of just displaying the list of test cases to be run....
Read more >BUG: pytest v3.10.0 collects and runs all tests twice ... - GitHub
Unfortunately, I can't provide the specific repo as my project is not open-source.
Read more >Changing standard (Python) test discovery - Pytest
As the collector just works on directories, if you specify twice a single test file, pytest will still collect it twice, no matter...
Read more >Testing Python Applications with Pytest
If we want to run tests defined as methods inside classes, ... will collect all test modules that were newly created or changed...
Read more >Testing with pytest - Scikit-HEP
Python used to have three major choices for tests; but now pytest is used almost ... tests if it doesn't fail - you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad to hear it!
If you have social media followers or a blog spread the word! 😃
That’s what I did, but I was wondering if it was the intended behaviour or if it is was a bug. Just letting you know in case of 😃