Skip to content

Commit

Permalink
Merge branch 'master' into repo-helper-update
Browse files Browse the repository at this point in the history
# Conflicts:
#	repo_helper.yml
  • Loading branch information
domdfcoding committed Jan 23, 2021
2 parents f79968e + 17493ac commit 34f53bd
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .imgbotconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"schedule": "weekly",
"ignoredFiles": [
"**/*.svg"
"**/*.svg",
"tests/example_photos/*.jpg"
]
}
3 changes: 3 additions & 0 deletions repo_helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ platforms:

travis_extra_install_pre:
- sudo apt install libimage-exiftool-perl

imgbot_ignore:
- tests/example_photos/*.jpg
12 changes: 9 additions & 3 deletions tests/test_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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())
)
4 changes: 2 additions & 2 deletions tests/test_sort_/test_sort_images.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions tests/test_sort_/test_sort_images_duplicate.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tests/test_sort_/test_sort_images_known_cameras.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 34f53bd

Please sign in to comment.