gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)

This commit is contained in:
Christian Heimes 2022-05-19 12:43:16 +02:00 committed by GitHub
parent e48ac9c100
commit 137fd3d88a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 109 additions and 14 deletions

View file

@ -156,6 +156,8 @@ class TestFileMethods(LargeFileTest):
def skip_no_disk_space(path, required):
def decorator(fun):
def wrapper(*args, **kwargs):
if not hasattr(shutil, "disk_usage"):
raise unittest.SkipTest("requires shutil.disk_usage")
if shutil.disk_usage(os.path.realpath(path)).free < required:
hsize = int(required / 1024 / 1024)
raise unittest.SkipTest(