pytest - How to capture stdout/stderr output↗
17 Oct 2023
docs.pytest.org
pytest official documentation page explaining how to capture the stdout and stderr output and make use of it during as an assert during the test