Skip to content

Commit

Permalink
Merge pull request #95 from Nautilus-Cyberneering/issue-94-do-not-val…
Browse files Browse the repository at this point in the history
…idate-size-of-renamed-images

Do not validate size for renamed Base images
  • Loading branch information
josecelano authored Mar 1, 2022
2 parents 7871bce + 77bef8d commit 5631142
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from nautilus_librarian.mods.dvc.domain.utils import (
extract_list_of_media_file_changes_from_dvc_diff_output,
extract_added_and_modified_files_from_dvc_diff,
get_new_filepath_if_is_a_renaming_dict,
)
from nautilus_librarian.mods.libvips.domain.validate_image_dimensions import (
Expand All @@ -22,7 +22,7 @@ def validate_images_dimensions(dvc_diff, min_image_size, max_image_size):
ResultCode.CONTINUE, [Message("No Gold image changes found")]
)

filenames = extract_list_of_media_file_changes_from_dvc_diff_output(
filenames = extract_added_and_modified_files_from_dvc_diff(
dvc_diff, only_basename=False
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def given_a_diff_structure_and_size_limits_it_should_validate_modified_image_dim
)


def given_a_diff_structure_and_size_limits_it_should_validate_renamed_image_dimensions(
def given_a_diff_structure_and_size_limits_it_should_not_validate_renamed_image_dimensions(
sample_gold_image_absolute_path,
):

Expand All @@ -70,7 +70,7 @@ def given_a_diff_structure_and_size_limits_it_should_validate_renamed_image_dime
)

assert result.code == ResultCode.CONTINUE
assert result.contains_text(
assert not result.contains_text(
"✓ Dimensions of " + sample_gold_image_absolute_path + " are 1740 x 1160"
)

Expand Down

0 comments on commit 5631142

Please sign in to comment.