Skip to content

Conversation

bluetech
Copy link
Member

Please see the commits for explanations.

Maybe it's not ideal but that's the current reality, and I wouldn't like
to break tradition by renaming the file.
The file is definitely not executable.
Use the upstream implementation, so we can easily drop our own impl when
we drop Python 3.10.
Currently defined in `_pytest.assertion.util`, but then imported from
`_pytest.terminal`, so makes sense to move it to the general utils
place.
@bluetech bluetech added the skip news used on prs to opt out of the changelog requirement label Sep 30, 2025
Comment on lines -616 to -621


def running_on_ci() -> bool:
"""Check if we're currently running on a CI system."""
env_vars = ["CI", "BUILD_NUMBER"]
return any(var in os.environ for var in env_vars)
Copy link
Member

Choose a reason for hiding this comment

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

Great, this is helping for my current refactor on #13762 a lot.

Copy link
Member Author

Choose a reason for hiding this comment

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

Exactly my thinking :)

@bluetech bluetech merged commit 9498a82 into pytest-dev:main Oct 1, 2025
33 checks passed
@bluetech bluetech deleted the compat-changes branch October 1, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news used on prs to opt out of the changelog requirement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants