Comments (5)
I think the problem is the way __add__
is implemented. This happens if you get more than one failure?
from pytest-parallel.
If you set 3 tests that fail and 2 workers it always fails.
from pytest-parallel.
tst.py:
import pytest
def test_tst():
assert False
def test_second():
assert False
def test_third():
assert False
from pytest-parallel.
HUAWEI_P10-796cab753f8233:pytest-parallel etragas$ python3 -m pytest --workers 2 ../tst.py
====================================================================== test session starts ======================================================================
platform darwin -- Python 3.6.6, pytest-3.8.1, py-1.6.0, pluggy-0.7.1
rootdir: /Users/etragas/diseaseTools, inifile: pytest.ini
plugins: parallel-0.0.6, xdist-1.23.2, profiling-1.3.0, mock-1.10.0, forked-0.2, cov-2.6.0
collected 3 items
pytest-parallel: 2 workers (processes), 1 test per worker (thread)
FFException in thread Thread-1:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/Users/etragas/diseaseTools/pytest-parallel/pytest_parallel/__init__.py", line 80, in run
run_test(self.session, item, None)
File "/Users/etragas/diseaseTools/pytest-parallel/pytest_parallel/__init__.py", line 50, in run_test
item.ihook.pytest_runtest_protocol(item=item, nextitem=nextitem)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/hooks.py", line 258, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
firstresult=hook.spec_opts.get('firstresult'),
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 201, in _multicall
return outcome.get_result()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
raise ex[1].with_traceback(ex[2])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
res = hook_impl.function(*args)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/runner.py", line 66, in pytest_runtest_protocol
runtestprotocol(item, nextitem=nextitem)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/runner.py", line 81, in runtestprotocol
reports.append(call_and_report(item, "call", log))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/runner.py", line 165, in call_and_report
hook.pytest_runtest_logreport(report=report)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/hooks.py", line 258, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
firstresult=hook.spec_opts.get('firstresult'),
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 201, in _multicall
return outcome.get_result()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
raise ex[1].with_traceback(ex[2])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
res = hook_impl.function(*args)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/_pytest/main.py", line 402, in pytest_runtest_logreport
self.testsfailed += 1
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'int'
from pytest-parallel.
This should be resolved in 0.0.8
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
- Global state in parallel tests
- 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.