Closed guotin closed 3 years ago
I now only kept the condition which prevents a test file from being mapped as a source file. It informs which files were excluded based on this condition. It could also be done with the coverage configuration outside of the tool. I also added a coverage configuration for the helper project
in the tests. Similar file with [run] source = .
prevented my .venv
files from being mapped in the few open source projects I tested. The tool took ages to build a mapping if this wasn't done. Many non-python files were also mapped as source code files unless omitted.
I was thinking that if we really need to specify src folder we can do something like "pytest --rts=[SRC_FOLDER_NAME]" to avoid extra config file
There was discussion in #62 that the
pytest-rts
condition in saving coverage data should be removed. I now changed it to only ignore theinit_phase_plugin.py
andupdate_phase_plugin.py
which often get mapped as source files because they start the coverage collection. Would some other approach be better?