Skip to content

Commit 356dd73

Browse files
authored
Merge branch 'master' into always_compare
2 parents 80239e0 + 767e144 commit 356dd73

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ include README.rst
33
include CHANGES.md
44
include tox.ini
55

6-
recursive-include tests *.py *.png
6+
recursive-include tests *.py *.json *.png
77
recursive-include images *.png

pytest_mpl/plugin.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,13 @@ def compare_image_to_hash_library(self, item, fig, result_dir):
481481

482482
hash_library = self.load_hash_library(hash_library_filename)
483483
hash_name = self.generate_test_name(item)
484+
485+
test_hash = self.generate_image_hash(item, fig)
484486

485487
if hash_name not in hash_library:
486488
new_test = True
487-
error_message = f"Hash for test '{hash_name}' not found in {hash_library_filename}."
488-
489-
test_hash = self.generate_image_hash(item, fig)
489+
error_message = (f"Hash for test '{hash_name}' not found in {hash_library_filename}. "
490+
f"Generated hash is {test_hash}.")
490491

491492
# Save the figure for later summary (will be removed later if not needed)
492493
test_image = (result_dir / "result.png").absolute()

0 commit comments

Comments
 (0)