from test.support import import_helper
from test.support import os_helper
from test.support import socket_helper
-from test.support import set_recursion_limit
+from test.support import infinite_recursion
from test.support import warnings_helper
from platform import win32_is_iot
def test_walk_above_recursion_limit(self):
depth = 50
os.makedirs(os.path.join(self.walk_path, *(['d'] * depth)))
- with set_recursion_limit(depth - 5):
+ with infinite_recursion(depth - 5):
all = list(self.walk(self.walk_path))
sub2_path = self.sub2_tree[0]
from test.support import import_helper
from test.support import is_emscripten, is_wasi
-from test.support import set_recursion_limit
+from test.support import infinite_recursion
from test.support import os_helper
from test.support.os_helper import TESTFN, FakePath
from test.test_pathlib import test_pathlib_abc
path = base.joinpath(*(['d'] * directory_depth))
path.mkdir(parents=True)
- with set_recursion_limit(recursion_limit):
+ with infinite_recursion(recursion_limit):
list(base.walk())
list(base.walk(top_down=False))
path = base.joinpath(*(['d'] * directory_depth))
path.mkdir(parents=True)
- with set_recursion_limit(recursion_limit):
+ with infinite_recursion(recursion_limit):
list(base.glob('**/'))
def test_glob_pathlike(self):