You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a test tagged with pytest.mark.thread_unsafe fails, there is a FAILED tag on the line of the test. There is no traceback. At the end of the test suite, the summary reports that all tests passed. Finally, pytest exits 1.
When the test suite is very large, one has to comb through the pytest stdout to find which test failed.
@pytest.mark.thread_unsafedeftest1():
assertFalse
$ pytest -v --parallel-threads=4 test1.py:
=============================================================== test session starts ===============================================================
test1.py::test1 FAILED ([thread-unsafe]: uses thread_unsafe marker) [100%]
*********************************************************** pytest-run-parallel report ************************************************************
1 tests were not run in parallel because of use of thread-unsafe functionality, to list the tests that were skipped, re-run while setting PYTEST_RUN_PARALLEL_VERBOSE=1 in your shell environment
======================================================== 1 passed, 258 deselected in 0.17s ========================================================
$ echo$?
1
Compare to plain pytest:
$ pytest -v test1.py
tests/test_lazy.py::test1 FAILED [100%]
==================================================================== FAILURES =====================================================================
______________________________________________________________________ test1 ______________________________________________________________________
@pytest.mark.thread_unsafe
def test1():
> assert False
E assert False
test1.py:3: AssertionError
============================================================= short test summary info =============================================================
FAILED tests/test_lazy.py::test1 - assert False
======================================================== 1 failed, 258 deselected in 0.15s ========================================================
Or pytest-run-parallel on an unmarked test:
$ pytest -v --parallel-threads=4 test1.py:
test1.py::test1 PARALLEL FAILED [100%]
===================================================================== ERRORS ======================================================================
_____________________________________________________________ ERROR at call of test1 ______________________________________________________________
def test1():
> assert False
E assert False
test1.py:2: AssertionError
*********************************************************** pytest-run-parallel report ************************************************************
All tests were run in parallel! 🎉
============================================================= short test summary info =============================================================
PARALLEL FAILED test1.py::test1 - assert False
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
If a test tagged with
pytest.mark.thread_unsafe
fails, there is a FAILED tag on the line of the test. There is no traceback. At the end of the test suite, the summary reports that all tests passed. Finally, pytest exits 1.When the test suite is very large, one has to comb through the pytest stdout to find which test failed.
Compare to plain pytest:
Or pytest-run-parallel on an unmarked test:
The text was updated successfully, but these errors were encountered: