Open uriva opened 2 years ago
No, testmon wouldn't be able to recognize file.json
as a dependency of the code.
AFAIK coverage is and will always deal with executable files and lines but not I/O.
https://coverage.readthedocs.io/en/6.0.2/api_plugin.html#file-tracers can be implemented but they are intended for things like yml file with instructions or django templates...
There are a couple of possible solutions for your use case but all the realistic ones include manual declaration of the dependency of tests to input files.
if I have in my code an
open('path/to/file.json').read()
command, would testmon be able to flag that file?I saw there is something called file tracers in
coverage
but not sure if it is for this use case.