fix method pytest_runtest_logreport

1. add call write_captured_output for condition report.passed
2. add info into changelog
This commit is contained in:
anb76ru 2022-11-15 19:55:32 +03:00
parent 534feecc2d
commit c178ff56a6
2 changed files with 3 additions and 0 deletions

View File

@ -137,6 +137,8 @@ Bug Fixes
- `#9877 <https://github.com/pytest-dev/pytest/issues/9877>`_: Ensure ``caplog.get_records(when)`` returns current/correct data after invoking ``caplog.clear()``.
- `#10491 <https://github.com/pytest-dev/pytest/issues/10491>`_: Method ``pytest_runtest_logreport`` generated report in case test passed or test failed and ``when=='call'``.
Improved Documentation
----------------------

View File

@ -560,6 +560,7 @@ class LogXML:
if report.when == "call": # ignore setup/teardown
reporter = self._opentestcase(report)
reporter.append_pass(report)
reporter.write_captured_output(report)
elif report.failed:
if report.when == "teardown":
# The following vars are needed when xdist plugin is used.