Skip to content

Commit 3b96283

Browse files
committed
Try environment again.
1 parent 3780899 commit 3b96283

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_importlib/metadata/_issue132947.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ 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()
12-
assert is_buildbot, f'no buildbot in {os.getcwd()}'
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)}"
1315
skipper = unittest.skip("Causes Resource Warnings (python/cpython#132947)")
1416
wrapper = skipper if is_buildbot else lambda x: x
1517
return wrapper(func)

0 commit comments

Comments
 (0)