Skip to content

Commit 3a402fd

Browse files
authored
Merge pull request #111 from dstansby/patch-1
Print hash if figure test is new
2 parents 01c5ec3 + e3bde25 commit 3a402fd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pytest_mpl/plugin.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,12 @@ def compare_image_to_hash_library(self, item, fig, result_dir):
466466

467467
hash_library = self.load_hash_library(hash_library_filename)
468468
hash_name = self.generate_test_name(item)
469+
470+
test_hash = self.generate_image_hash(item, fig)
469471

470472
if hash_name not in hash_library:
471-
return f"Hash for test '{hash_name}' not found in {hash_library_filename}."
472-
473-
test_hash = self.generate_image_hash(item, fig)
473+
return (f"Hash for test '{hash_name}' not found in {hash_library_filename}. "
474+
f"Generated hash is {test_hash}.")
474475

475476
if test_hash == hash_library[hash_name]:
476477
return

0 commit comments

Comments
 (0)