Skip to content

Commit 51f0fcf

Browse files
committed
Rely on 'not github actions' as a proxy.
1 parent 3b96283 commit 51f0fcf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Lib/test/test_importlib/metadata/_issue132947.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ def skip_on_buildbot(func):
88
changes, only on some buildbot runners, the tests will fail with
99
ResourceWarnings.
1010
"""
11-
is_buildbot = "buildbot" in os.getcwd() or any(
12-
"buildbot" in key.lower() for key in os.environ
13-
)
14-
assert is_buildbot, f"no buildbot in {os.getcwd()} or {tuple(os.environ)}"
11+
# detect "not github actions" as a proxy for BUILDBOT not being present yet.
12+
is_buildbot = "GITHUB_ACTION" not in os.environ or "BUILDBOT" in os.environ
1513
skipper = unittest.skip("Causes Resource Warnings (python/cpython#132947)")
1614
wrapper = skipper if is_buildbot else lambda x: x
1715
return wrapper(func)

0 commit comments

Comments
 (0)