Giter Site home page Giter Site logo

Comments (20)

schlamar avatar schlamar commented on June 14, 2024

Can you please test against latest master, there are various improvements/fixes not yet released.

from pytest-cov.

diefans avatar diefans commented on June 14, 2024

Sorry, I get the same results...

from pytest-cov.

mattupstate avatar mattupstate commented on June 14, 2024

I was experiencing a similar issue where running:

$ py.test --cov mymodule --cov-report=term-missing

was reporting correct coverage. Then when running through setuptools like:

$ python setup.py test

The coverage was incorrect. However, installing the latest from master branch has fixed my issue.

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

@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.

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

This is an upstream issue: https://bitbucket.org/hpk42/py/issue/45/forkedfunc-skips-exit-handlers-breaks

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

@diefans I have a hacky but working solution by patching py.process.ForkedFunc. Not sure if I want to roll that out officially. But it should work if you add this to your conftest.py: fb100db

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

I have prepared a much nicer solution upstream:

from pytest-cov.

sontek avatar sontek commented on June 14, 2024

@schlamar Since this is upstream bug, does this mean you can release without the monkeypatching? Or are you going to wait for upstream anyways?

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

@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.

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

@sontek 1.7.0 just released

@diefans this will be fixed as soon as a new py version is released, my pull request was merged

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

@diefans should be fixed, you just need to upgrade py to 1.4.21 and cov-core to 1.13.0.

from pytest-cov.

mocksoul avatar mocksoul commented on June 14, 2024

Broken again with py 1.4.22
https://bitbucket.org/hpk42/py/diff/py/_process/forkedfunc.py?diff2=37f557844498&at=default

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

Yes, I know. We are working something out. For now, you can pin py to 1.4.21.

from pytest-cov.

mocksoul avatar mocksoul commented on June 14, 2024

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:

  1. In session start record current PID
  2. Before test start compare current pid with session pid and if they are different -- make multiprocessing start
  3. Before teardown check is we used multiprocessing and stop it if needed

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.

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

@mocksoul Do you have some code? =)

from pytest-cov.

aconrad avatar aconrad commented on June 14, 2024

Do we have a fix for this?

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

@aconrad #15 should fix it, I might find some time at the weekend to have a look at it.

from pytest-cov.

schlamar avatar schlamar commented on June 14, 2024

fixed (again) in 1633bd3, will be released soon

from pytest-cov.

aconrad avatar aconrad commented on June 14, 2024

Sweet! @schlamar can you ping this ticket when a new release is available? Thanks!

from pytest-cov.

mocksoul avatar mocksoul commented on June 14, 2024

As being said, it is fixed in pytest-cov-1.8.0, https://pypi.python.org/pypi/pytest-cov/1.8.0

from pytest-cov.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.