Unhelpful warnings produced when using source directive and subprocess measurement · Issue #96 · nedbat/coveragepy (original) (raw)

Originally reported by Geoff Bache (Bitbucket: geoffbache, GitHub: Unknown)


When I specify my source in the [run] section of the rc file, and run coverage by setting COVERAGE_PROCESS_START, I get a lot of spurious warnings printed on standard error.

It says "Source module %s was never encountered." and occasionally "No data was collected."

Obviously not every subprocess will necessarily load every source module, and indeed it's perfectly OK to have some python subprocess somewhere which doesn't run any of my code.

The first warning is also a pain when running multiple tests in different processes: I want to have one rc file saying where my source is without needing every test to load every module.

I'd question whether these warnings are useful at all: but at least there should be some way to disable them, and preferably they should be off by default.