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

Cython support #155

Closed bergkvist closed 3 years ago

bergkvist commented 3 years ago

It would be nice if this would somehow work for .pyx/.pxd files too. (Cython files)

tarpas commented 3 years ago

Cython is translated into C. Although it's not unthinkable someday coverage tracking/tracing will work across runtimes and different programming languages and there will be a software product which would use the information for smart test selection at this point this is out of scope of pytest-testmon. Sorry :/.

bergkvist commented 3 years ago

I don't think you'd need to use coverage analysis for the generated C code to support this. pytest-testmon is already using coverage.py, right? Check out this: http://blog.behnel.de/posts/coverage-analysis-for-cython-modules.html

pytest is already smart enough not to rebuild a .pyx-file unless it has changed. I guess a solution could be to just rerun every test that depends on a .pyx file whenever the file changes. This would be better than nothing.