-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for NO_COLOR and FORCE_COLOR #7466
Add support for NO_COLOR and FORCE_COLOR #7466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Would you mind add a small explanation to those variables and PY_COLORS
to reference.rst
under Environment Variables
? Thanks!
Added! Should they be in alphabetical order? For example, before:
After:
|
Good catch, I think so, perhaps except keeping the pytest-specific ones separated from the others:
Also the non-pytest specific could be order by precedence perhaps?
What do you think? |
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks @hugovk!
Thanks @hugovk! |
@@ -0,0 +1,3 @@ | |||
Added support for ``NO_COLOR`` and ``FORCE_COLOR`` environment variables to control colored output. | |||
|
|||
For more information, see `the docs <https://docs.pytest.org/en/stable/reference.html#environment-variables>`__. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could/should use an internal reference (Python uses using-on-envvars
).
In general (internal) documentation links should not go through external resources/protocols.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, that escaped my mind, thanks. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: #7474
Thanks again
Fixes #7464.
PY_COLORS
is pytest-specific and comes first (#7464 (comment)).Then
NO_COLOR
takes precendece overFORCE_COLOR
(like tartley/colorama#230).Then check the other rules.
Also includes the Jython removal from #7462.