Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
"Already imported a file that will be measured" reported for coverage itself #905
Comments
|
Perhaps this is a variant of #876, that coverage should be smarter about ignoring local venv directories. |
|
Wait, somehow i missed that this was about coverage itself...! |
|
yep! and |
|
This is similar to #876: when using You can fix it by adding this to .coveragerc:
BTW, I don't think this is a slightly wrong configuration, I think it's really common, unless I missed something? |
|
|
|
Start with the exact same same setup as described above:
Verify that there are no "already-imported" warnings yet: $ coverage run -m t
hello worldAdd plugin
See "already-imported" warnings from the omitted path appear:
Is that a bug in coverage or in django_coverage_plugin? |
|
@erdseb this issue is about coverage itself, not django |
|
Any update on this? |
|
+1 |
Describe the bug
Admittedly, my configuration is probably ~slightly wrong -- but since this is a new message in coverage 5.x I figured I'd point it out. The warning seems non-actionable for this particular case.
To Reproduce
How can we reproduce the problem? Please be specific.
This
.coveragerc(distilled from a larger example)coverage installed into
./venvany old simple python file, here's
t.pyrun
coverage run -m tExpected behavior
the warnings are pretty noisy, and in my case not really actionable (this is a development env, I'll later run from
toxwhereomitwill exclude these particular files).I realize I probably should add
omit = venv*/*or something of the sortAdditional context
nothing really, just new noise :)
thanks again for coverage, I don't know what I'd do without it