How to capture stdout/stderr output — pytest documentation

docs.pytest.org docs.pytest.org