File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ def test_auto_detect_cpus(
54
54
) -> None :
55
55
from xdist .plugin import pytest_cmdline_main as check_options
56
56
57
+ monkeypatch .delenv ("PYTEST_XDIST_AUTO_NUM_WORKERS" , False )
58
+
57
59
with suppress (ImportError ):
58
60
import psutil
59
61
@@ -101,6 +103,7 @@ def test_auto_detect_cpus_psutil(
101
103
102
104
psutil = pytest .importorskip ("psutil" )
103
105
106
+ monkeypatch .delenv ("PYTEST_XDIST_AUTO_NUM_WORKERS" , False )
104
107
monkeypatch .setattr (psutil , "cpu_count" , lambda logical = True : 84 if logical else 42 )
105
108
106
109
config = pytester .parseconfigure ("-nauto" )
@@ -117,6 +120,8 @@ def test_auto_detect_cpus_os(
117
120
) -> None :
118
121
from xdist .plugin import pytest_cmdline_main as check_options
119
122
123
+ monkeypatch .delenv ("PYTEST_XDIST_AUTO_NUM_WORKERS" , False )
124
+
120
125
config = pytester .parseconfigure ("-nauto" )
121
126
check_options (config )
122
127
assert config .getoption ("numprocesses" ) == 3
@@ -178,6 +183,8 @@ def test_hook_auto_num_workers_none(
178
183
# but we document it so let's test it.
179
184
from xdist .plugin import pytest_cmdline_main as check_options
180
185
186
+ monkeypatch .delenv ("PYTEST_XDIST_AUTO_NUM_WORKERS" , False )
187
+
181
188
pytester .makeconftest (
182
189
"""
183
190
def pytest_xdist_auto_num_workers():
You can’t perform that action at this time.
0 commit comments