-
Notifications
You must be signed in to change notification settings - Fork 213
coverage is wrong when running with xdist's --boxed #9
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
Comments
Can you please test against latest master, there are various improvements/fixes not yet released. |
Sorry, I get the same results... |
I was experiencing a similar issue where running:
was reporting correct coverage. Then when running through setuptools like:
The coverage was incorrect. However, installing the latest from |
@diefans Confirmed: https://travis-ci.org/schlamar/pytest-cov/builds/26548730 @mattupstate That seems unrelated, but thanks for confirming that master solves a few issues. |
This is an upstream issue: https://bitbucket.org/hpk42/py/issue/45/forkedfunc-skips-exit-handlers-breaks |
I have prepared a much nicer solution upstream:
|
@schlamar Since this is upstream bug, does this mean you can release without the monkeypatching? Or are you going to wait for upstream anyways? |
@sontek I'm going to wait for the decision on my pull request for py. If it is merged I can release because pytest-cov doesn't need any further changes. |
@diefans should be fixed, you just need to upgrade py to 1.4.21 and cov-core to 1.13.0. |
Broken again with py 1.4.22 |
Yes, I know. We are working something out. For now, you can pin py to 1.4.21. |
pytest 2.6.0 depends on py 1.4.22, so you require to downgrade them both =) My 2 years old patch is still working:
But I if you want things to make right you probably should ask xdist to provide box_start/box_stop hooks which you will be able to use. |
@mocksoul Do you have some code? =) |
Do we have a fix for this? |
fixed (again) in 1633bd3, will be released soon |
Sweet! @schlamar can you ping this ticket when a new release is available? Thanks! |
As being said, it is fixed in pytest-cov-1.8.0, https://pypi.python.org/pypi/pytest-cov/1.8.0 |
I need to run my tests with xdist's --boxed feature.
there is a big difference in coverage compared to running unboxed:
35 % of all modules are completely uncovered.
I also noticed, that despite that I run the tests with
py.test tests/ --boxed -d -n 8 --random
the uncovered modules are always the same.When I run one single test module in boxed mode coverage complains that the module to cover was not imported:
The text was updated successfully, but these errors were encountered: