diff --git a/src/_pytest/compat.py b/src/_pytest/compat.py index 2f5a4c863f9..72c3d0918fb 100644 --- a/src/_pytest/compat.py +++ b/src/_pytest/compat.py @@ -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) diff --git a/tox.ini b/tox.ini index 2e91ddcb2d6..70b439f7573 100644 --- a/tox.ini +++ b/tox.ini @@ -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 =