diff --git a/.imgbotconfig b/.imgbotconfig index 4336a2a..66f7427 100644 --- a/.imgbotconfig +++ b/.imgbotconfig @@ -1,6 +1,7 @@ { "schedule": "weekly", "ignoredFiles": [ - "**/*.svg" + "**/*.svg", + "tests/example_photos/*.jpg" ] } diff --git a/repo_helper.yml b/repo_helper.yml index e8e149c..b0f8647 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -33,3 +33,6 @@ platforms: travis_extra_install_pre: - sudo apt install libimage-exiftool-perl + +imgbot_ignore: + - tests/example_photos/*.jpg diff --git a/tests/test_sort.py b/tests/test_sort.py index 493ce28..bb5bfb5 100644 --- a/tests/test_sort.py +++ b/tests/test_sort.py @@ -16,7 +16,9 @@ def test_sort_images( all_example_photos = example_photos.rglob("*.jpg") sort_images(destination, *all_example_photos) - advanced_data_regression.check([p.relative_to(tmp_pathplus).as_posix() for p in destination.iterchildren()]) + advanced_data_regression.check( + sorted(p.relative_to(tmp_pathplus).as_posix() for p in destination.iterchildren()) + ) def test_sort_images_known_cameras( @@ -27,7 +29,9 @@ def test_sort_images_known_cameras( all_example_photos = example_photos.rglob("*.jpg") sort_images(destination, *all_example_photos, known_cameras={"VKY-L09": "Smartphone"}) - advanced_data_regression.check([p.relative_to(tmp_pathplus).as_posix() for p in destination.iterchildren()]) + advanced_data_regression.check( + sorted(p.relative_to(tmp_pathplus).as_posix() for p in destination.iterchildren()) + ) def test_sort_images_duplicate( @@ -40,4 +44,6 @@ def test_sort_images_duplicate( sort_images(destination, *all_example_photos) sort_images(destination, *all_example_photos) - advanced_data_regression.check([p.relative_to(tmp_pathplus).as_posix() for p in destination.iterchildren()]) + advanced_data_regression.check( + sorted(p.relative_to(tmp_pathplus).as_posix() for p in destination.iterchildren()) + ) diff --git a/tests/test_sort_/test_sort_images.yml b/tests/test_sort_/test_sort_images.yml index 710a048..63540e9 100644 --- a/tests/test_sort_/test_sort_images.yml +++ b/tests/test_sort_/test_sort_images.yml @@ -1,3 +1,3 @@ -- photos/2018_12_28/VKY-L09/IMG_20181228_155131.jpg -- photos/2018_12_28/VKY-L09 - photos/2018_12_28 +- photos/2018_12_28/VKY-L09 +- photos/2018_12_28/VKY-L09/IMG_20181228_155131.jpg diff --git a/tests/test_sort_/test_sort_images_duplicate.yml b/tests/test_sort_/test_sort_images_duplicate.yml index 773b43b..7974bc1 100644 --- a/tests/test_sort_/test_sort_images_duplicate.yml +++ b/tests/test_sort_/test_sort_images_duplicate.yml @@ -1,4 +1,4 @@ -- photos/2018_12_28/VKY-L09/IMG_20181228_155131.jpg -- photos/2018_12_28/VKY-L09/IMG_20181228_155131 (1).jpg -- photos/2018_12_28/VKY-L09 - photos/2018_12_28 +- photos/2018_12_28/VKY-L09 +- photos/2018_12_28/VKY-L09/IMG_20181228_155131 (1).jpg +- photos/2018_12_28/VKY-L09/IMG_20181228_155131.jpg diff --git a/tests/test_sort_/test_sort_images_known_cameras.yml b/tests/test_sort_/test_sort_images_known_cameras.yml index 249eef0..0d622f5 100644 --- a/tests/test_sort_/test_sort_images_known_cameras.yml +++ b/tests/test_sort_/test_sort_images_known_cameras.yml @@ -1,3 +1,3 @@ -- photos/2018_12_28/Smartphone/IMG_20181228_155131.jpg -- photos/2018_12_28/Smartphone - photos/2018_12_28 +- photos/2018_12_28/Smartphone +- photos/2018_12_28/Smartphone/IMG_20181228_155131.jpg