mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
* Reapply "gh-132947: Apply changes from importlib_metadata 8.7 (#137885)" (#137924)
This reverts commit 3706ef66ef.
* Skip the triggering test on buildbots only.
15 lines
546 B
Python
15 lines
546 B
Python
import os
|
|
import unittest
|
|
|
|
|
|
def skip_on_buildbot(func):
|
|
"""
|
|
#132947 revealed that after applying some otherwise stable
|
|
changes, only on some buildbot runners, the tests will fail with
|
|
ResourceWarnings.
|
|
"""
|
|
# detect "not github actions" as a proxy for BUILDBOT not being present yet.
|
|
is_buildbot = "GITHUB_ACTION" not in os.environ or "BUILDBOT" in os.environ
|
|
skipper = unittest.skip("Causes Resource Warnings (python/cpython#132947)")
|
|
wrapper = skipper if is_buildbot else lambda x: x
|
|
return wrapper(func)
|