File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1- import pytest
2-
31def pytest_addoption (parser ):
42 parser .addoption (
53 "--force-log-cli" ,
64 action = "store_true" ,
75 help = "Force enable log_cli even when xdist is active" ,
86 )
97
8+
109def pytest_configure (config ):
1110 # Detect if xdist (parallel execution) is active
12- xdist_active = hasattr (config , "workerinput" ) or config .pluginmanager .hasplugin ("xdist" )
13- import pytest
11+ xdist_active = hasattr (config , "workerinput" ) or config .pluginmanager .hasplugin (
12+ "xdist"
13+ )
14+
1415
1516def pytest_addoption (parser ):
1617 parser .addoption (
@@ -19,9 +20,12 @@ def pytest_addoption(parser):
1920 help = "Force enable log_cli even when xdist is active" ,
2021 )
2122
23+
2224def pytest_configure (config ):
2325 # Detect if xdist (parallel execution) is active
24- xdist_active = hasattr (config , "workerinput" ) or config .pluginmanager .hasplugin ("xdist" )
26+ xdist_active = hasattr (config , "workerinput" ) or config .pluginmanager .hasplugin (
27+ "xdist"
28+ )
2529
2630 if not xdist_active or config .getoption ("--force-log-cli" ):
2731 # Normal run (no xdist): enable live logs
Original file line number Diff line number Diff line change 11import time
22
3+
34def test_example_1 ():
45 time .sleep (0.5 )
56 assert 1 == 1
67
8+
79def test_example_2 ():
810 time .sleep (0.5 )
911 assert 2 == 2
You can’t perform that action at this time.
0 commit comments