-
-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: "Already imported a file that will be measured", loss of coverage #909
Comments
git bisect blames commit b7e0eec |
So it looks like
and then I have only one wrongly reported missing code line: the I would prefer not having to do that: after all, things worked fine with coverage 4.x (or 5.0a3). (And anyway the real workaround would be to stop being silly with custom test running modules and start using pytest, which is on my todo list anyway.) |
Adjust sys.path to better emulate Python, but only if we should.
This is now available in coverage 5.0.2 |
Describe the bug
I'm measuring gtimelog's test coverage with
coverage run -m gtimelog.tests
. Since coverage 5.0a4 this is missing some coverage (shows 79% instead of 100%) and also produces warnings:To Reproduce
How can we reproduce the problem? Please be specific.
What version of Python are you using? 2.7.17 and 3.7.5
What version of coverage.py are you using? 5.0.1 (but every version starting with 5.0a4 is affected; 5.0a3 is fine)
What versions of what packages do you have installed?
What code are you running? Give us a specific commit of a specific repo that we can check out.
https://github.com/gtimelog/gtimelog/tree/5f7858cc58925e42b2d7cbc1d872b11745c38872
What commands did you run?
make coverage
for a quick version;.tox/coverage/bin/pip install coverage=$version && .tox/coverage/bin/coverage -m gtimelog.test && .tox/coverage/bin/coverage report
to test a specific version of coverage.pyExpected behavior
100% coverage reported, no warnings.
The text was updated successfully, but these errors were encountered: