Giter VIP home page Giter VIP logo

Comments (10)

etragas-fathom avatar etragas-fathom commented on May 20, 2024 1

Haha excellent! I just came here to report that session.testsfailed was probably the issue. Thank you for fixing this so quickly 👏

from pytest-parallel.

kevlened avatar kevlened commented on May 20, 2024

Interesting. I wonder if this also happens when using --tests-per-worker auto. I'll write a test to repro the original problem.

from pytest-parallel.

etragas-fathom avatar etragas-fathom commented on May 20, 2024

I tested, and this issue doesn't occur if you set --workers 1

from pytest-parallel.

etragas-fathom avatar etragas-fathom commented on May 20, 2024

I suspect there is a diff between running process_with_threads directly and wrapping that in a process

from pytest-parallel.

kevlened avatar kevlened commented on May 20, 2024

pytest-parallel just does a normal run when --workers is 1, so that makes sense. What's odd is there's a test to ensure failures are reported: https://github.com/browsertron/pytest-parallel/blob/2f6a094ebb5a6d274adcdb1942a62dd124252711/tests/test_parallel.py#L4-L18

There must be something else in the reporting that's missing.

from pytest-parallel.

etragas-fathom avatar etragas-fathom commented on May 20, 2024

But the exit code isn't the same thing as the number of failures right? So would the above test catch that?

from pytest-parallel.

kevlened avatar kevlened commented on May 20, 2024

It's not the same, but it means there's a disconnect between how pytest does its reporting and how it decides to exit the process.

from pytest-parallel.

kevlened avatar kevlened commented on May 20, 2024

That test needs assert result.ret == 1

from pytest-parallel.

kevlened avatar kevlened commented on May 20, 2024

The multiprocessing portion of this library works by monkeypatching values on pytest classes using the multiprocessing module. Ideally, we'd monkeypatch the testsfailed counter. The problem is getting a multiprocessing counter to work like a normal integer is non-trivial.

from pytest-parallel.

kevlened avatar kevlened commented on May 20, 2024

Thanks for reporting this! It should be resolved in 0.0.6, which is on PyPI now.

from pytest-parallel.

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.