We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3780899 commit 3b96283Copy full SHA for 3b96283
Lib/test/test_importlib/metadata/_issue132947.py
@@ -8,8 +8,10 @@ def skip_on_buildbot(func):
8
changes, only on some buildbot runners, the tests will fail with
9
ResourceWarnings.
10
"""
11
- is_buildbot = 'buildbot' in os.getcwd()
12
- assert is_buildbot, f'no buildbot in {os.getcwd()}'
+ is_buildbot = "buildbot" in os.getcwd() or any(
+ "buildbot" in key.lower() for key in os.environ
13
+ )
14
+ assert is_buildbot, f"no buildbot in {os.getcwd()} or {tuple(os.environ)}"
15
skipper = unittest.skip("Causes Resource Warnings (python/cpython#132947)")
16
wrapper = skipper if is_buildbot else lambda x: x
17
return wrapper(func)
0 commit comments