mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-116057: Use relative recursion limits when testing os.walk() and Path.walk() (#116058)
Replace test.support.set_recursion_limit with test.support.infinite_recursion.
This commit is contained in:
parent
c5fa796619
commit
2339e7cff7
2 changed files with 5 additions and 5 deletions
|
@ -34,7 +34,7 @@ from test import support
|
|||
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
|
||||
|
||||
|
@ -1496,7 +1496,7 @@ class WalkTests(unittest.TestCase):
|
|||
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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue