diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index 8391f2ced6..35b6121c41 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -38,6 +38,9 @@ This document explains the changes made to Iris for this release #. `@scottrobinson02`_ fixed the output units when dividing a coordinate by a cube. (:issue:`5305`, :pull:`5331`) + +#. `@ESadek-MO`_ has updated :mod:`iris.tests.graphics.idiff` to stop duplicated file names + preventing acceptance. (:issue:`5098`, :pull:`5482`) 💣 Incompatible Changes diff --git a/lib/iris/tests/graphics/idiff.py b/lib/iris/tests/graphics/idiff.py index a355f2cf82..62e72f4e0e 100755 --- a/lib/iris/tests/graphics/idiff.py +++ b/lib/iris/tests/graphics/idiff.py @@ -73,17 +73,12 @@ def diff_viewer( repo = graphics.read_repo_json() def accept(event): - if test_id not in repo: - repo[test_id] = phash - graphics.write_repo_json(repo) - out_file = result_dir / (test_id + ".png") - result_path.rename(out_file) - msg = f"ACCEPTED: {result_path.name} -> {out_file.name}" - print(msg) - else: - msg = f"DUPLICATE: {result_path.name} -> {expected_path.name} (ignored)" - print(msg) - result_path.unlink() + repo[test_id] = phash + graphics.write_repo_json(repo) + out_file = result_dir / (test_id + ".png") + result_path.rename(out_file) + msg = f"ACCEPTED: {result_path.name} -> {out_file.name}" + print(msg) diff_fname.unlink() plt.close()