MCPcopy
hub / github.com/pytest-dev/pytest / running_on_ci

Function running_on_ci

src/_pytest/compat.py:310–315  ·  view source on GitHub ↗

Check if we're currently running on a CI system.

()

Source from the content-addressed store, hash-verified

308
309
310def running_on_ci() -> bool:
311 """Check if we're currently running on a CI system."""
312 # Only enable CI mode if one of these env variables is defined and non-empty.
313 # Note: review `regendoc` tox env in case this list is changed.
314 env_vars = ["CI", "BUILD_NUMBER"]
315 return any(os.environ.get(var) for var in env_vars)
316
317
318if sys.version_info >= (3, 13):

Callers 4

_compare_eq_iterableFunction · 0.90

Calls 1

getMethod · 0.45

Tested by 1