From 637dc3b55c39db9dceccf124e529b8bec61b75d4 Mon Sep 17 00:00:00 2001 From: torzdf <36920800+torzdf@users.noreply.github.com> Date: Mon, 20 Feb 2023 12:12:51 +0000 Subject: [PATCH] bugfix - utils unit test --- tests/lib/utils_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lib/utils_test.py b/tests/lib/utils_test.py index 95cc8ae..a6f8e01 100644 --- a/tests/lib/utils_test.py +++ b/tests/lib/utils_test.py @@ -139,12 +139,12 @@ def test_get_image_paths(tmp_path: str) -> None: # Test getting any image paths from a folder with images and random files exists = [os.path.join(test_folder, img) for img in os.listdir(test_folder) if os.path.splitext(img)[-1] != ".txt"] - assert get_image_paths(test_folder) == exists + assert sorted(get_image_paths(test_folder)) == sorted(exists) # Test getting image paths from a folder with images with a specific extension exists = [os.path.join(test_folder, img) for img in os.listdir(test_folder) if os.path.splitext(img)[-1] == ".png"] - assert get_image_paths(test_folder, extension=".png") == exists + assert sorted(get_image_paths(test_folder, extension=".png")) == sorted(exists) _PARAMS = [("/path/to/file.txt", ["/", "path", "to", "file.txt"]), # Absolute