Comments (10)
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.
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.
I tested, and this issue doesn't occur if you set --workers 1
from pytest-parallel.
I suspect there is a diff between running process_with_threads directly and wrapping that in a process
from pytest-parallel.
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.
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.
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.
That test needs assert result.ret == 1
from pytest-parallel.
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.
Thanks for reporting this! It should be resolved in 0.0.6
, which is on PyPI now.
from pytest-parallel.
Related Issues (20)
- Could you pls release master ASAP for support python3.9 HOT 6
- OSError: [WinError 87] 'pytest --tests-per-worker auto' in terminal (pycharm, windows) HOT 2
- Maintainers needed HOT 5
- Is it possible to have a separate log for each process? HOT 2
- Runs with dynamically predefined thread names are sticks
- If tests call code that `fork()`s, use of this plugin often leads to crashes on Mac OS High Sierra and onward, *even when number of workers is set to 1*
- Control auto worker count through environment variable
- The plugin does not fire any setup / tear down events for child threads make it extremely hard to implement extensions
- not compatible with django HOT 1
- Fatal Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedWriter name=5> at interpreter shutdown, possibly due to daemon threads
- Many tests fail
- Duplicated tests when running with allure-pytest
- Using pytest parallel to generate reports results in data corruption
- Latest pytest (7.2.0) breaks pytest-parallel. HOT 8
- Pytest-parallel is failing to run
- “generator raised StopIteration” on latest parallel version
- setUpClass method executed once per test with multiple workers
- AttributeError: Can't pickle local object 'ArgumentParser.__init__.<locals>.identity' on Windows
- do not create thread if tests_per_worker==1
- Consider moving project to pytest-dev for maintenance HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-parallel.