Skip to content

Commit 0a497c7

Browse files
regendoc: remove CI environment variables (pytest-dev#13950) (pytest-dev#13951)
pytest auto-detects and uses more verbose output when running in CI. Change tox:regendoc to remove those environment variables, because we do not want extra verbose output in the user documentation. See pytest-dev#13938 (comment). (cherry picked from commit 82e9b97) Co-authored-by: Bruno Oliveira <[email protected]>
1 parent a9f7e6e commit 0a497c7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/_pytest/compat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,5 +309,6 @@ def __call__(self) -> bool:
309309
def running_on_ci() -> bool:
310310
"""Check if we're currently running on a CI system."""
311311
# Only enable CI mode if one of these env variables is defined and non-empty.
312+
# Note: review `regendoc` tox env in case this list is changed.
312313
env_vars = ["CI", "BUILD_NUMBER"]
313314
return any(os.environ.get(var) for var in env_vars)

tox.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ commands =
171171
setenv =
172172
# We don't want this warning to reach regen output.
173173
PYTHONWARNDEFAULTENCODING=
174+
# Remove CI markers: pytest auto-detects those and uses more verbose output, which is undesirable
175+
# for the example documentation.
176+
CI=
177+
BUILD_NUMBER=
174178

175179
[testenv:plugins]
176180
description =

0 commit comments

Comments
 (0)