Skip to content

RedirectOut(): Do a "fallback" print to origin stderr in case of an error#244

Merged
phihag merged 1 commit intomasterfrom
exception_fallback_print
Mar 26, 2026
Merged

RedirectOut(): Do a "fallback" print to origin stderr in case of an error#244
phihag merged 1 commit intomasterfrom
exception_fallback_print

Conversation

@jedie
Copy link
Copy Markdown
Member

@jedie jedie commented Feb 19, 2026

RedirectOut() is mainly used for capture output in tests. But in case on an error, there is no output. So it some cases it's needed to temporary remove the Context Manager. To fix this: Do a "fallback" print to origin stderr.

…rror

`RedirectOut()` is mainly used for capture output in tests. But in case on an error, there is no
output. So it some cases it's needed to temporary remove the Context Manager. To fix this: Do a
"fallback" print to origin stderr.
@jedie jedie changed the title RedirectOut(): Do a "fallback" print to origin stderr in case of an e… RedirectOut(): Do a "fallback" print to origin stderr in case of an error Feb 19, 2026
Comment thread bx_py_utils/test_utils/redirect.py
@phihag phihag merged commit db92c9e into master Mar 26, 2026
3 checks passed
@phihag phihag deleted the exception_fallback_print branch March 26, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants