From e35bb47ec0a2c566f0e412874c2f345e3dea0edc Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 30 Mar 2023 22:31:56 +0100 Subject: [PATCH] Update hashes and try and make PNG output not include Matplotlib version --- tests/baseline/hashes/mpl20_ft261.json | 5 ++++- tests/baseline/hashes/mpl21_ft261.json | 5 ++++- tests/baseline/hashes/mpl22_ft261.json | 5 ++++- tests/baseline/hashes/mpl30_ft261.json | 5 ++++- tests/baseline/hashes/mpl31_ft261.json | 5 ++++- tests/baseline/hashes/mpl32_ft261.json | 5 ++++- tests/baseline/hashes/mpl33_ft261.json | 6 +++++- tests/test_pytest_mpl.py | 3 ++- 8 files changed, 31 insertions(+), 8 deletions(-) diff --git a/tests/baseline/hashes/mpl20_ft261.json b/tests/baseline/hashes/mpl20_ft261.json index 76322063..d2cfe010 100644 --- a/tests/baseline/hashes/mpl20_ft261.json +++ b/tests/baseline/hashes/mpl20_ft261.json @@ -12,5 +12,8 @@ "test_pytest_mpl.test_hash_succeeds": "480062c2239ed9d70e361d1a5b578dc2aa756971161ac6e7287b492ae6118c59", "test.test_modified": "54f6cf83d5b06fa2ecb7fa23d6e87898679178ef5d0dfdd2551a139f1932127b", "test.test_new": "54f6cf83d5b06fa2ecb7fa23d6e87898679178ef5d0dfdd2551a139f1932127b", - "test.test_unmodified": "54f6cf83d5b06fa2ecb7fa23d6e87898679178ef5d0dfdd2551a139f1932127b" + "test.test_unmodified": "54f6cf83d5b06fa2ecb7fa23d6e87898679178ef5d0dfdd2551a139f1932127b", + "test_formats.test_format_eps": "da67357559501ff4afae72acede897d75d968ba0c4573dcd7ff992cfa72e49d4", + "test_formats.test_format_pdf": "9098ce368ec6e20951e9305fcb7da05a3f10169d270c84d8da3331371c6596bc", + "test_formats.test_format_png": "480062c2239ed9d70e361d1a5b578dc2aa756971161ac6e7287b492ae6118c59" } diff --git a/tests/baseline/hashes/mpl21_ft261.json b/tests/baseline/hashes/mpl21_ft261.json index 8b2beb5a..ed592685 100644 --- a/tests/baseline/hashes/mpl21_ft261.json +++ b/tests/baseline/hashes/mpl21_ft261.json @@ -12,5 +12,8 @@ "test_pytest_mpl.test_hash_succeeds": "17b65dd0247b0dfd8c1b4b079352414ae0fe03c0a3e79d63c8b8670d84d4098f", "test.test_modified": "14d326881467bc613e6504b87bd7d556a5e58668ff16b896fa3c15745cfb6336", "test.test_new": "14d326881467bc613e6504b87bd7d556a5e58668ff16b896fa3c15745cfb6336", - "test.test_unmodified": "14d326881467bc613e6504b87bd7d556a5e58668ff16b896fa3c15745cfb6336" + "test.test_unmodified": "14d326881467bc613e6504b87bd7d556a5e58668ff16b896fa3c15745cfb6336", + "test_formats.test_format_eps": "da67357559501ff4afae72acede897d75d968ba0c4573dcd7ff992cfa72e49d4", + "test_formats.test_format_pdf": "9098ce368ec6e20951e9305fcb7da05a3f10169d270c84d8da3331371c6596bc", + "test_formats.test_format_png": "17b65dd0247b0dfd8c1b4b079352414ae0fe03c0a3e79d63c8b8670d84d4098f" } diff --git a/tests/baseline/hashes/mpl22_ft261.json b/tests/baseline/hashes/mpl22_ft261.json index 08c26f4d..c4399308 100644 --- a/tests/baseline/hashes/mpl22_ft261.json +++ b/tests/baseline/hashes/mpl22_ft261.json @@ -12,5 +12,8 @@ "test_pytest_mpl.test_hash_succeeds": "e80557c8784fb920fb79b03b26dc072649a98811f00a8c212df8761e4351acde", "test.test_modified": "80e0ee6df7cf7d9d9407395a25af30beb8763e98820a7be972764899246d2cd7", "test.test_new": "80e0ee6df7cf7d9d9407395a25af30beb8763e98820a7be972764899246d2cd7", - "test.test_unmodified": "80e0ee6df7cf7d9d9407395a25af30beb8763e98820a7be972764899246d2cd7" + "test.test_unmodified": "80e0ee6df7cf7d9d9407395a25af30beb8763e98820a7be972764899246d2cd7", + "test_formats.test_format_eps": "da67357559501ff4afae72acede897d75d968ba0c4573dcd7ff992cfa72e49d4", + "test_formats.test_format_pdf": "9098ce368ec6e20951e9305fcb7da05a3f10169d270c84d8da3331371c6596bc", + "test_formats.test_format_png": "e80557c8784fb920fb79b03b26dc072649a98811f00a8c212df8761e4351acde" } diff --git a/tests/baseline/hashes/mpl30_ft261.json b/tests/baseline/hashes/mpl30_ft261.json index 313078ea..4d892daf 100644 --- a/tests/baseline/hashes/mpl30_ft261.json +++ b/tests/baseline/hashes/mpl30_ft261.json @@ -12,5 +12,8 @@ "test_pytest_mpl.test_hash_succeeds": "4e1157a93733cdb327f1741afdb0525f4d0e3f12e60b54f72c93db9f9c9ae27f", "test.test_modified": "6e2e4ba7b77caf62df24f6b92d6fc51ab1b837bf98039750334f65c0a6c5d898", "test.test_new": "6e2e4ba7b77caf62df24f6b92d6fc51ab1b837bf98039750334f65c0a6c5d898", - "test.test_unmodified": "6e2e4ba7b77caf62df24f6b92d6fc51ab1b837bf98039750334f65c0a6c5d898" + "test.test_unmodified": "6e2e4ba7b77caf62df24f6b92d6fc51ab1b837bf98039750334f65c0a6c5d898", + "test_formats.test_format_eps": "8ad5b5795b65e16790d1b57889540597fe18f164ddc38f50086f29e725b5c223", + "test_formats.test_format_pdf": "18858c67f1362e6d53975b66ffc221bda0c9f714185851fbf714bd73f0a80729", + "test_formats.test_format_png": "4e1157a93733cdb327f1741afdb0525f4d0e3f12e60b54f72c93db9f9c9ae27f" } diff --git a/tests/baseline/hashes/mpl31_ft261.json b/tests/baseline/hashes/mpl31_ft261.json index dbde4d54..29e4d9bc 100644 --- a/tests/baseline/hashes/mpl31_ft261.json +++ b/tests/baseline/hashes/mpl31_ft261.json @@ -12,5 +12,8 @@ "test_pytest_mpl.test_hash_succeeds": "2a4da3a36b384df539f3f47d476f67a918f5eee1df360dbab9469b96260df78f", "test.test_modified": "3675e5a48388e8cc341580e9b41115d3cf63d2465cf11eeed3faa23e84030fc2", "test.test_new": "3675e5a48388e8cc341580e9b41115d3cf63d2465cf11eeed3faa23e84030fc2", - "test.test_unmodified": "3675e5a48388e8cc341580e9b41115d3cf63d2465cf11eeed3faa23e84030fc2" + "test.test_unmodified": "3675e5a48388e8cc341580e9b41115d3cf63d2465cf11eeed3faa23e84030fc2", + "test_formats.test_format_eps": "8ad5b5795b65e16790d1b57889540597fe18f164ddc38f50086f29e725b5c223", + "test_formats.test_format_pdf": "18858c67f1362e6d53975b66ffc221bda0c9f714185851fbf714bd73f0a80729", + "test_formats.test_format_png": "2a4da3a36b384df539f3f47d476f67a918f5eee1df360dbab9469b96260df78f" } diff --git a/tests/baseline/hashes/mpl32_ft261.json b/tests/baseline/hashes/mpl32_ft261.json index c39964b0..ef97789d 100644 --- a/tests/baseline/hashes/mpl32_ft261.json +++ b/tests/baseline/hashes/mpl32_ft261.json @@ -12,5 +12,8 @@ "test_pytest_mpl.test_hash_succeeds": "8b8ff9ce044bc9075876278781667a708414460209bba25a39d8262ed73d0f04", "test.test_modified": "3b7db65812fd59403d17a2fba3ebe1fd0abdfde8633df06636e4e1daea259da0", "test.test_new": "3b7db65812fd59403d17a2fba3ebe1fd0abdfde8633df06636e4e1daea259da0", - "test.test_unmodified": "3b7db65812fd59403d17a2fba3ebe1fd0abdfde8633df06636e4e1daea259da0" + "test.test_unmodified": "3b7db65812fd59403d17a2fba3ebe1fd0abdfde8633df06636e4e1daea259da0", + "test_formats.test_format_eps": "8ad5b5795b65e16790d1b57889540597fe18f164ddc38f50086f29e725b5c223", + "test_formats.test_format_pdf": "18858c67f1362e6d53975b66ffc221bda0c9f714185851fbf714bd73f0a80729", + "test_formats.test_format_png": "8b8ff9ce044bc9075876278781667a708414460209bba25a39d8262ed73d0f04" } diff --git a/tests/baseline/hashes/mpl33_ft261.json b/tests/baseline/hashes/mpl33_ft261.json index 77c5f03f..30f71940 100644 --- a/tests/baseline/hashes/mpl33_ft261.json +++ b/tests/baseline/hashes/mpl33_ft261.json @@ -12,5 +12,9 @@ "test_pytest_mpl.test_hash_succeeds": "55ad74a44c99606f1df1e79f67a59a4986bddc2b48ea2b2d7ea8365db91dc7ca", "test.test_modified": "ce07de6b726c3b01afb03aa7c9e939d584bc71a54b9737d69853a0d915cd6181", "test.test_new": "ce07de6b726c3b01afb03aa7c9e939d584bc71a54b9737d69853a0d915cd6181", - "test.test_unmodified": "ce07de6b726c3b01afb03aa7c9e939d584bc71a54b9737d69853a0d915cd6181" + "test.test_unmodified": "ce07de6b726c3b01afb03aa7c9e939d584bc71a54b9737d69853a0d915cd6181", + "test_formats.test_format_eps": "8ad5b5795b65e16790d1b57889540597fe18f164ddc38f50086f29e725b5c223", + "test_formats.test_format_pdf": "18858c67f1362e6d53975b66ffc221bda0c9f714185851fbf714bd73f0a80729", + "test_formats.test_format_png": "55ad74a44c99606f1df1e79f67a59a4986bddc2b48ea2b2d7ea8365db91dc7ca", + "test_formats.test_format_svg": "f21b81fdc6163a13caf7fa675d42b996ab7f0070c063a287a00d13d50c5b38f1" } diff --git a/tests/test_pytest_mpl.py b/tests/test_pytest_mpl.py index 25c4ad0f..1da90582 100644 --- a/tests/test_pytest_mpl.py +++ b/tests/test_pytest_mpl.py @@ -698,7 +698,8 @@ def test_formats(pytester, use_hash_library, passes, file_format): @pytest.mark.mpl_image_compare(baseline_dir=r"{baseline_dir_abs}", {f'hash_library=r"{hash_library}",' if use_hash_library else ''} tolerance={DEFAULT_TOLERANCE}, - savefig_kwargs={{'format': '{file_format}'}}) + savefig_kwargs={{'format': '{file_format}', + 'metadata': {{"Software": None}}}}) def test_format_{file_format}(): fig = plt.figure() ax = fig.add_subplot(1, 1, 1)