Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/_pytest/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,5 +309,6 @@ def __call__(self) -> bool:
def running_on_ci() -> bool:
"""Check if we're currently running on a CI system."""
# Only enable CI mode if one of these env variables is defined and non-empty.
# Note: review `regendoc` tox env in case this list is changed.
env_vars = ["CI", "BUILD_NUMBER"]
return any(os.environ.get(var) for var in env_vars)
4 changes: 4 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ commands =
setenv =
# We don't want this warning to reach regen output.
PYTHONWARNDEFAULTENCODING=
# Remove CI markers: pytest auto-detects those and uses more verbose output, which is undesirable
# for the example documentation.
CI=
BUILD_NUMBER=

[testenv:plugins]
description =
Expand Down
Loading