Pytest Logging: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * Pytest") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | |||
* https://docs.pytest.org/en/7.0.x/how-to/logging.html | |||
=Internal= | =Internal= | ||
* [[Pytest#Subjects|Pytest]] | * [[Pytest#Subjects|Pytest]] | ||
=Overview= | |||
<code>pytest</code> captures the <font color=darkkhaki>stdout and stderr</font> generated while running the tests, and that is why they cannot be seen in the running terminal, <font color=darkkhaki>unless the test fails</font>. To disable this behavior and allow <font color=darkkhaki>stdout and stderr</font> propagation, start <code>pytest</code> with: | |||
<font size=-1> | |||
pytest -s|--capture=no ... | |||
</font> |
Latest revision as of 05:39, 9 June 2022
External
Internal
Overview
pytest
captures the stdout and stderr generated while running the tests, and that is why they cannot be seen in the running terminal, unless the test fails. To disable this behavior and allow stdout and stderr propagation, start pytest
with:
pytest -s|--capture=no ...