File tree 2 files changed +4
-3
lines changed 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -727,7 +727,7 @@ def test(i):
727
727
test_a = test_file ,
728
728
test_b = test_file ,
729
729
)
730
- result = testdir .runpytest ('--tx=2*popen ' , '--dist=loadscope' , '-v' )
730
+ result = testdir .runpytest ('-n2 ' , '--dist=loadscope' , '-v' )
731
731
assert get_workers_and_test_count_by_prefix ('test_a.py::test' , result .outlines ) == {'gw0' : 10 }
732
732
assert get_workers_and_test_count_by_prefix ('test_b.py::test' , result .outlines ) == {'gw1' : 10 }
733
733
@@ -744,7 +744,7 @@ class TestB:
744
744
def test(self, i):
745
745
pass
746
746
""" )
747
- result = testdir .runpytest ('--tx=2*popen ' , '--dist=loadscope' , '-v' )
747
+ result = testdir .runpytest ('-n2 ' , '--dist=loadscope' , '-v' )
748
748
assert get_workers_and_test_count_by_prefix ('test_a.py::TestA' , result .outlines ) == {'gw0' : 10 }
749
749
assert get_workers_and_test_count_by_prefix ('test_a.py::TestB' , result .outlines ) == {'gw1' : 10 }
750
750
Original file line number Diff line number Diff line change @@ -98,7 +98,8 @@ def pytest_configure(config):
98
98
@pytest .mark .tryfirst
99
99
def pytest_cmdline_main (config ):
100
100
if config .option .numprocesses :
101
- config .option .dist = "load"
101
+ if not config .option .dist :
102
+ config .option .dist = "load"
102
103
config .option .tx = ['popen' ] * config .option .numprocesses
103
104
if config .option .distload :
104
105
config .option .dist = "load"
You can’t perform that action at this time.
0 commit comments