WithSecureOpenSource / pytest-rts

Coverage-based regression test selection (RTS) plugin for pytest
Apache License 2.0
7 stars 3 forks source link

If directory name contains 'pytest-rts', the tool does not work #62

Closed alexey-vyskubov closed 3 years ago

alexey-vyskubov commented 3 years ago

I was trying to produce an example for the problem with decorators we discussed, and put my code into pytest-rts-try-decorators directory. Because of the (incorrect) hardcoded condition in the save_mapping_data() the tool does not work at all: "pytest-rts" in filename is wrong.

alexey-vyskubov commented 3 years ago

@guotin also this will prevent using pytest-rts for testing itself, which we surely want to do.

guotin commented 3 years ago

Some of the files that start the coverage collection (in pytest_rts/pytest/) seem to like getting mapped as source files. If the condition is fully removed, then they are often present in the mapping.db. On the other hand, If the condition is improved to ignore those files only, then the tool can't test them but the tool should work for other directories. Is that good enough?

matveypashkovskiy commented 3 years ago

I think this is fixed now. @guotin @alexey-vyskubov could you please confirm?