capsys.readouterr does not capture output from the Out class
Open
- Dominant language
- Python
- Stars
- 484
- Forks
- 64
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 11
Description
Problem: https://github.com/Keonik1/relay/pull/2#discussion_r2299996176
Brief description:
capsys.readouterr() does not read messages that are output via the Out class and the Out.green, Out.red, Out.yellow functions themselves.
The likely reason is that Out redirects output directly to stdout, consoles, rather than to Python's stdout, which is redefined by pytest.
Maybe this will be usefull: https://stackoverflow.com/a/52844694
Contributor guide
Assessment
This issue has not been assessed yet.