tarpas / pytest-testmon

Selects tests affected by changed files. Executes the right tests first. Continuous test runner when used with pytest-watch.
https://testmon.org
MIT License
800 stars 54 forks source link

If test itself changes, should testmon pick it up? #202

Closed adam-mrozik closed 1 year ago

adam-mrozik commented 1 year ago

I have made a PR changing one test file only. Testmon, as a result, collected 0 tests. Is this expected? I assume if it is based on coverage, then this is expected, but kind of hinders some of the functionality, because now I have to run sum whatever pytest collects with whatever test files have been changed

tarpas commented 1 year ago

Yes definitely it should pick it up.... Did you run something like pytest --testmon --cov=src tests ? So that tests are outside of the collected coverage?

In that case it should work too, but there might have been a bug which will be fixed in 1.4.5.

adam-mrozik commented 1 year ago

I run python3 -m pytest etests --testmon-forceselect (using forceselect + folder with tests is named different). Could any of these affect my results?

pokopt commented 1 year ago

@adam-mrozik I'm trying to reproduce the issue but with no luck so far. Was your change "significant"? I mean did you change reachable code not just comment or so? Thanks in advance for more info.

pokopt commented 1 year ago

Since I can't reproduce the problem I'm closing the issue. In case of any update I'll be happy to investigate further.