pytest-xdist
is a plugin for pytest allowing to run tests in parallel.
I installed it via pip but I can't get it to run in combination with IPytest. I allways get ExitCode.NO_TESTS_COLLECTED: 5
I tried so far creating a ipynb notebook with the following cells:
Setupimport time import ipytest def test_first(): time.sleep(3) assert True def test_second(): time.sleep(3) assert True def test_third(): time.sleep(3) assert TrueTest 1: plain ipytest → works ✅
ipytest.autoconfig(addopts=[]) ipytest.run()
======================================= test session starts =======================================
platform win32 -- Python 3.10.10, pytest-7.2.2, pluggy-1.0.0
rootdir: ...
plugins: anyio-3.6.2, xdist-3.2.0
collected 3 items
t_bcf84451f8db4a55bde8bada6fc2f412.py
.
.
.
[100%]
======================================== 3 passed in 9.05s ========================================
<ExitCode.OK: 0>
Test 2: ipytest + pytest-xdist → no tests are executed 🛑
ipytest.autoconfig(addopts=["--numprocesses=2"]) ipytest.run()
======================================= test session starts =======================================
platform win32 -- Python 3.10.10, pytest-7.2.2, pluggy-1.0.0
rootdir: ...
plugins: anyio-3.6.2, xdist-3.2.0
gw0 I / gw1 I
gw0 [0] / gw1 [0]
====================================== no tests ran in 0.71s ======================================
<ExitCode.NO_TESTS_COLLECTED: 5>
What am I doing wrong?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4