pytest-recap Test Report

Session Metadata

Summary

Test Results

Show outcomes:
Test Outcome Duration (s) Start Stop
demo-tests/orig/test_0.py::test0_1_fail_capturing failed 0.000605 2025-05-28T05:47:14.638547+00:00 2025-05-28T05:47:14.639152+00:00
Captured stdout:
FAIL this stdout is captured
FAIL this stdout is also captured
Captured stderr:
FAIL this stderr is captured
FAIL this stderr is also captured
Captured log:
INFO     conftest:test_0.py:39 ​​​
WARNING  conftest:test_0.py:42 FAIL this log is captured
WARNING  conftest:test_0.py:46 FAIL is this log captured?
WARNING  conftest:test_0.py:49 FAIL this log is also captured
CRITICAL conftest:test_0.py:50 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum;
ERROR    conftest:test_0.py:51 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum;
INFO     conftest:test_0.py:53 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum;
Error/Traceback:
capsys = <_pytest.capture.CaptureFixture object at 0x10c3071c0>
fake_data = 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, ...ariatur Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum;'
logger = 

    def test0_1_fail_capturing(capsys, fake_data, logger):
        logger.info(ZWS_X3)
        print("FAIL this stdout is captured")
        print("FAIL this stderr is captured", file=sys.stderr)
        logger.warning("FAIL this log is captured")
        with capsys.disabled():
            print("FAIL stdout not captured, going directly to sys.stdout")
            print("FAIL stderr not captured, going directly to sys.stderr", file=sys.stderr)
            logger.warning("FAIL is this log captured?")
        print("FAIL this stdout is also captured")
        print("FAIL this stderr is also captured", file=sys.stderr)
        logger.warning("FAIL this log is also captured")
        logger.critical(fake_data)
        logger.error(fake_data)
        # logger.warning(fake_data)
        logger.info(fake_data)
        # logger.debug(fake_data)
        # logger.info(ZWJ_X3)
>       assert False
E       assert False

demo-tests/orig/test_0.py:56: AssertionError
demo-tests/orig/test_0.py::test_always_rerun failed 0.000344 2025-05-28T05:47:14.675488+00:00 2025-05-28T05:47:14.675832+00:00
Captured stdout:
(none)
Captured stderr:
(none)
Captured log:
(none)
Error/Traceback:
tmp_path = PosixPath('/private/var/folders/pd/fvjgwfx97wb95q5t2k168sxr0000gn/T/pytest-of-jwr003/pytest-118/test_always_rerun2')

    @pytest.mark.flaky(reruns=2)
    def test_always_rerun(tmp_path):
        state_file = tmp_path / "rerun_state.txt"
        if not state_file.exists():
            state_file.write_text("fail")
>           assert False, "Fail first run"
E           AssertionError: Fail first run
E           assert False

demo-tests/orig/test_0.py:144: AssertionError
demo-tests/orig/test_0.py::test0_warning error 0.000101 2025-05-28T05:47:14.654700+00:00 2025-05-28T05:47:14.654801+00:00
Captured stdout:
(none)
Captured stderr:
(none)
Captured log:
(none)
Error/Traceback:
file /Users/jwr003/coding/pytest-recap/demo-tests/orig/test_0.py, line 122
  def test0_warning(capstdlog):
E       fixture 'capstdlog' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_mocker, cov, doctest_namespace, error_fixture, fake_data, include_metadata_in_junit_xml, json_metadata, logger, metadata, mocker, module_mocker, monkeypatch, no_cover, package_mocker, pytestconfig, random_sleep, record_property, record_testsuite_property, record_xml_attribute, recwarn, session_mocker, test_data, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/jwr003/coding/pytest-recap/demo-tests/orig/test_0.py:122
demo-tests/orig/test_0.py::test_flaky_3 error 0.000108 2025-05-28T05:47:14.658394+00:00 2025-05-28T05:47:14.658502+00:00
Captured stdout:
(none)
Captured stderr:
(none)
Captured log:
(none)
Error/Traceback:
file /Users/jwr003/coding/pytest-recap/demo-tests/orig/test_0.py, line 131
  @pytest.mark.flaky(reruns=3)
  def test_flaky_3(capstderr):
E       fixture 'capstderr' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_mocker, cov, doctest_namespace, error_fixture, fake_data, include_metadata_in_junit_xml, json_metadata, logger, metadata, mocker, module_mocker, monkeypatch, no_cover, package_mocker, pytestconfig, random_sleep, record_property, record_testsuite_property, record_xml_attribute, recwarn, session_mocker, test_data, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/jwr003/coding/pytest-recap/demo-tests/orig/test_0.py:131
demo-tests/orig/test_0.py::test0_xfail xfailed 0.000151 2025-05-28T05:47:14.651410+00:00 2025-05-28T05:47:14.651561+00:00
Captured stdout:
(none)
Captured stderr:
(none)
Captured log:
(none)
Error/Traceback:
file /Users/jwr003/coding/pytest-recap/demo-tests/orig/test_0.py, line 82
  @pytest.mark.xfail()
  def test0_xfail(logger, capstderr):
E       fixture 'capstderr' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_mocker, cov, doctest_namespace, error_fixture, fake_data, include_metadata_in_junit_xml, json_metadata, logger, metadata, mocker, module_mocker, monkeypatch, no_cover, package_mocker, pytestconfig, random_sleep, record_property, record_testsuite_property, record_xml_attribute, recwarn, session_mocker, test_data, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/jwr003/coding/pytest-recap/demo-tests/orig/test_0.py:82
demo-tests/orig/test_0.py::test0_xpass xfailed 0.00016 2025-05-28T05:47:14.653573+00:00 2025-05-28T05:47:14.653733+00:00
Captured stdout:
(none)
Captured stderr:
(none)
Captured log:
(none)
Error/Traceback:
file /Users/jwr003/coding/pytest-recap/demo-tests/orig/test_0.py, line 104
  @pytest.mark.xfail()
  def test0_xpass(logger, capstdout):
E       fixture 'capstdout' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_mocker, cov, doctest_namespace, error_fixture, fake_data, include_metadata_in_junit_xml, json_metadata, logger, metadata, mocker, module_mocker, monkeypatch, no_cover, package_mocker, pytestconfig, random_sleep, record_property, record_testsuite_property, record_xml_attribute, recwarn, session_mocker, test_data, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/jwr003/coding/pytest-recap/demo-tests/orig/test_0.py:104
demo-tests/orig/test_0.py::test0_xpass_demo xpassed 0.000113 2025-05-28T05:47:14.653101+00:00 2025-05-28T05:47:14.653214+00:00
Captured stdout:
(none)
Captured stderr:
(none)
Captured log:
(none)
Error/Traceback:
None
demo-tests/orig/test_0.py::test_always_rerun rerun 0.00041 2025-05-28T05:47:14.666805+00:00 2025-05-28T05:47:14.667215+00:00
Captured stdout:
(none)
Captured stderr:
(none)
Captured log:
(none)
Error/Traceback:
tmp_path = PosixPath('/private/var/folders/pd/fvjgwfx97wb95q5t2k168sxr0000gn/T/pytest-of-jwr003/pytest-118/test_always_rerun0')

    @pytest.mark.flaky(reruns=2)
    def test_always_rerun(tmp_path):
        state_file = tmp_path / "rerun_state.txt"
        if not state_file.exists():
            state_file.write_text("fail")
>           assert False, "Fail first run"
E           AssertionError: Fail first run
E           assert False

demo-tests/orig/test_0.py:144: AssertionError
demo-tests/orig/test_0.py::test_always_rerun rerun 0.000424 2025-05-28T05:47:14.671333+00:00 2025-05-28T05:47:14.671757+00:00
Captured stdout:
(none)
Captured stderr:
(none)
Captured log:
(none)
Error/Traceback:
tmp_path = PosixPath('/private/var/folders/pd/fvjgwfx97wb95q5t2k168sxr0000gn/T/pytest-of-jwr003/pytest-118/test_always_rerun1')

    @pytest.mark.flaky(reruns=2)
    def test_always_rerun(tmp_path):
        state_file = tmp_path / "rerun_state.txt"
        if not state_file.exists():
            state_file.write_text("fail")
>           assert False, "Fail first run"
E           AssertionError: Fail first run
E           assert False

demo-tests/orig/test_0.py:144: AssertionError
demo-tests/orig/test_0.py::test0_skip skipped 0.000165 2025-05-28T05:47:14.650800+00:00 2025-05-28T05:47:14.650965+00:00
Captured stdout:
(none)
Captured stderr:
(none)
Captured log:
(none)
Error/Traceback:
('/Users/jwr003/coding/pytest-recap/demo-tests/orig/test_0.py', 74, 'Skipped: Skipping this test with decorator.')
demo-tests/orig/test_0.py::test0_1_pass_capturing passed 0.000656 2025-05-28T05:47:14.637005+00:00 2025-05-28T05:47:14.637661+00:00
Captured stdout:
FAIL this stdout is captured
FAIL this stdout is also captured
Captured stderr:
FAIL this stderr is captured
FAIL this stderr is also captured
Captured log:
INFO     conftest:test_0.py:18 ​​​
WARNING  conftest:test_0.py:21 FAIL this log is captured
WARNING  conftest:test_0.py:25 FAIL is this log captured?
WARNING  conftest:test_0.py:28 FAIL this log is also captured
INFO     conftest:test_0.py:32 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo;
Error/Traceback:
None
demo-tests/orig/test_0.py::test_with_warning passed 0.000129 2025-05-28T05:47:14.650280+00:00 2025-05-28T05:47:14.650409+00:00
Captured stdout:
(none)
Captured stderr:
(none)
Captured log:
(none)
Error/Traceback:
None