MCPcopy
hub / github.com/pytest-dev/pytest / test_xdist_times

Method test_xdist_times

testing/test_terminal.py:2379–2397  ·  view source on GitHub ↗
(
        self, many_tests_files, pytester: Pytester, monkeypatch
    )

Source from the content-addressed store, hash-verified

2377 )
2378
2379 def test_xdist_times(
2380 self, many_tests_files, pytester: Pytester, monkeypatch
2381 ) -> None:
2382 pytest.importorskip("xdist")
2383 monkeypatch.delenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", raising=False)
2384 pytester.makeini(
2385 """
2386 [pytest]
2387 console_output_style = times
2388 """
2389 )
2390 output = pytester.runpytest("-n2", "-v")
2391 output.stdout.re_match_lines_random(
2392 [
2393 r"\[gw\d\] \d{1,3}[\.[a-z\ ]{1,2}\d{0,3}\w{1,2} PASSED test_bar.py::test_bar\[1\]",
2394 r"\[gw\d\] \d{1,3}[\.[a-z\ ]{1,2}\d{0,3}\w{1,2} PASSED test_foo.py::test_foo\[1\]",
2395 r"\[gw\d\] \d{1,3}[\.[a-z\ ]{1,2}\d{0,3}\w{1,2} PASSED test_foobar.py::test_foobar\[1\]",
2396 ]
2397 )
2398
2399 def test_capture_no(self, many_tests_files, pytester: Pytester) -> None:
2400 output = pytester.runpytest("-s")

Callers

nothing calls this directly

Calls 4

delenvMethod · 0.80
re_match_lines_randomMethod · 0.80
makeiniMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected