add option to return inclusive path for iterative search, closes #1

This commit is contained in:
2025-04-03 13:42:36 +02:00
parent 23dc0a9fdd
commit d79683b8b2
2 changed files with 18 additions and 7 deletions

View File

@@ -263,6 +263,9 @@ def test_search_folder_path(base_folder):
found = io.search_folder_path(base_folder, stop_folder_name=stop_folder)
assert found is not None
assert found.name == "path"
stop_folder = None
found = io.search_folder_path(base_folder, stop_folder_name=stop_folder)
assert found is None
found = io.search_folder_path(
base_folder, stop_folder_name=stop_folder, return_inclusive=True
)
assert found is not None
assert found.name == "to"
assert found.parent.name == "path"