From 8ba96b4e986a280c19d089f81d0436e21fc229b3 Mon Sep 17 00:00:00 2001 From: Tim Hedger-Gourlay Date: Fri, 31 Jul 2026 11:27:19 +0100 Subject: [PATCH] Make list_files() traversal deterministic --- tests/test_unasync.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_unasync.py b/tests/test_unasync.py index 35e0c6c..7bf791b 100644 --- a/tests/test_unasync.py +++ b/tests/test_unasync.py @@ -17,6 +17,8 @@ def list_files(startpath): output = "" for root, dirs, files in os.walk(startpath): + dirs.sort() + files.sort() level = root.replace(startpath, "").count(os.sep) indent = " " * 4 * (level) output += f"{indent}{os.path.basename(root)}/"