Skip to content

Commit 4431832

Browse files
committed
Try a different way of detecting buildbot.
1 parent adf1dc9 commit 4431832

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_importlib/metadata/_issue132947.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +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_RUN' in os.environ or 'BUILDBOT' in os.environ
11+
is_buildbot = any(key.startswith('BUILDBOT') for key in os.environ)
12+
assert is_buildbot, f'no buildbot in {list(os.environ)}'
1213
skipper = unittest.skip("Causes Resource Warnings (python/cpython#132947)")
1314
wrapper = skipper if is_buildbot else lambda x: x
1415
return wrapper(func)

0 commit comments

Comments
 (0)