Skip to content

Commit

Permalink
bugfix - utils unit test
Browse files Browse the repository at this point in the history
torzdf committed Feb 20, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent f2c1086 commit 637dc3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/lib/utils_test.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 637dc3b

Please sign in to comment.