Skip to content

use color output by default #329

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[pytest]
addopts = -ra --maxfail=1
addopts = -ra --maxfail=1 --color=yes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale? It's rather customary to only use color when output is a tty (the default --color=auto)

Also, the commit name does not say which tool is impacted

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal is to have some color in Jenkins' logs, without needing to modify all the pipelines.
Is there a reason we might not want some color?

Copy link
Contributor

@ydirson ydirson Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for auto as a default IIRC is so the output gets full-text and stays greppable etc. While it is likely not very important in this case, hardcoding an option in the repo just for the sake of Jenkins is not ideal in general, it would seem more adequate to have Jenkins set it using PYTEST_ADDOPTS envvar instead.

markers =
# *** Markers that change test behaviour ***
default_vm: mark a test with a default VM in case no --vm parameter was given.
Expand Down
Loading