pytest: force_terminal by global variable? #2730
-
In #1298, it is answered how the color/style codes can be preserved under pytest output. Anwer: Initialize the from rich.console import Console
console = Console(force_terminal=True) I'm wondering if there's a way to achieve this without changing production code, e.g., setting an environment variable, or some other global thing that I could set? |
Beta Was this translation helpful? Give feedback.
Answered by
willmcgugan
Jan 3, 2023
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nschloe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FORCE_COLOR=1
should do it. See here for other env vars.