test_walk_above_recursion_limit
uses absolute limits
#116057
Labels
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
os.walk
andPath.walk
both have a test verifying that they're not implemented recursively. However, their recursion limits are absolute rather than relative to the current frame. Since the test framework itself already consumes about 30 frames, it only takes a few extra frames to cause a spurious failure. This can easily happen when running the tests within another script, which happens in the Android testbed.For example, if the limit in test_pathlib is reduced from 40 to 35:
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linked PRs
os.walk
andPath.walk
#116058The text was updated successfully, but these errors were encountered: