-
Notifications
You must be signed in to change notification settings - Fork 211
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
Incorrect coverage report #117
Comments
It might be possible to measure it with a workaround like this: https://github.com/ionelmc/pytest-benchmark/blob/master/tox.ini#L32-L33 - it forces the engine used for subprocess measurements to load early. |
Coverage wasn't happening for import/def lines. Looks like pytest-dev/pytest-cov#117 affects us, I guess the plugin load/execute order is what is breaking it for us.
Have this been fixed ? i am still getting this issue. |
Not yet fixed. There is a workaroud tho. |
Show an example and maybe we can figure it out. |
you can checkout the last travis ci build of Sanic https://github.com/channelcat/sanic |
Maybe your local checkout is dirty (have any |
Ah yes, it's a pytest plugin, so plugin loading is currently unpredictable. See pytest-dev/pytest#935 |
yeah, you're right. i had |
How can we fix that ? should we load |
Well ... this being a problem in pytest, we can only talk about workarounds here. |
yeah, any suggestion ? it works fine for me when i use |
Afaik it's either the workaround I use in pytest-benchmark (forceload pytest-cov subprocess engine) or ronny's plugin trick (haven't tried it). |
Ah ... now I get the confusion, line numbers changed: https://github.com/ionelmc/pytest-benchmark/blob/51b3bf7ebf85bfd73445446e167a9a89171582d6/tox.ini#L25-L27 |
hmm.. it doesn't work for me by just setting these env.. am i missing anything ? and it shows
|
What happens if you run
|
Then looks correct. |
Well there you go, just run |
yeah, but |
nvm, |
This is fixed right? Also, #177 will clarify the solutions. |
Using
py.test --cov-config .coveragerc --cov nengo -n 6 nengo
a lot of lines that should be hit get reported as missed (like class and function definitions in a module). This might be related to #19 as the project has a conftest file importing other modules from the project.Using
coverage run --rcfile .coveragerc --source nengo -m py.test nengo
instead a correct coverage report is generated, but this command does not support xdist.The text was updated successfully, but these errors were encountered: