Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-mpl for
openSUSE:Factory checked in at 2026-08-22 21:35:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-mpl (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-mpl.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-mpl"
Sat Aug 22 21:35:58 2026 rev:8 rq:1373051 version:0.19.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-mpl/python-pytest-mpl.changes
2026-01-06 17:47:41.909313229 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-mpl.new.1258/python-pytest-mpl.changes
2026-08-22 21:38:04.555365488 +0200
@@ -1,0 +2,12 @@
+Sat Aug 22 09:58:21 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 0.19.0:
+ * Add skip_hash=True/False option to allow hash comparison to
+ be skipped for specific tests
+ * Bump actions/checkout from 5 to 6 in the actions group
+ * Bump stefanzweifel/git-auto-commit-action from 7.0.0 to 7.1.0
+ in the actions group
+ * Update minimum Python and dependency versions for package and
+ tests
+
+-------------------------------------------------------------------
Old:
----
pytest_mpl-0.18.0.tar.gz
New:
----
pytest_mpl-0.19.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-mpl.spec ++++++
--- /var/tmp/diff_new_pack.tFzA7m/_old 2026-08-22 21:38:05.242390096 +0200
+++ /var/tmp/diff_new_pack.tFzA7m/_new 2026-08-22 21:38:05.244390168 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-pytest-mpl
-Version: 0.18.0
+Version: 0.19.0
Release: 0
Summary: Pytest plugin for testing Matplotlib figures
License: BSD-2-Clause
++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.tFzA7m/_old 2026-08-22 21:38:05.281391493 +0200
+++ /var/tmp/diff_new_pack.tFzA7m/_new 2026-08-22 21:38:05.284391601 +0200
@@ -1,6 +1,6 @@
-mtime: 1767277030
-commit: 778da83477121619059c218ce975eb9e79a6346d459ba8343a6f4bde95b954cf
-url: https://src.opensuse.org/python-pytest/python-pytest-mpl.git
-revision: 778da83477121619059c218ce975eb9e79a6346d459ba8343a6f4bde95b954cf
+mtime: 1787392712
+commit: e024e77096f82f23d226e864413115c76632bca6b1d29e689e11e41f4e8bf4c5
+url: https://src.opensuse.org/python-pytest/python-pytest-mpl
+revision: e024e77096f82f23d226e864413115c76632bca6b1d29e689e11e41f4e8bf4c5
projectscmsync: https://src.opensuse.org/python-pytest/_ObsPrj.git
++++++ build.specials.obscpio ++++++
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2026-08-22 11:58:32.000000000 +0200
@@ -0,0 +1 @@
+.osc
++++++ pytest_mpl-0.18.0.tar.gz -> pytest_mpl-0.19.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_mpl-0.18.0/.github/workflows/test_and_publish.yml
new/pytest_mpl-0.19.0/.github/workflows/test_and_publish.yml
--- old/pytest_mpl-0.18.0/.github/workflows/test_and_publish.yml
2025-11-15 14:43:02.000000000 +0100
+++ new/pytest_mpl-0.19.0/.github/workflows/test_and_publish.yml
2026-03-25 11:00:28.000000000 +0100
@@ -29,26 +29,25 @@
- inkscape
envs: |
# Test oldest SPEC 0 configurations
- - linux: py311-test-mpl38
- - macos: py311-test-mpl38
- - windows: py311-test-mpl38
+ - linux: py312-test-mpl39
+ - macos: py312-test-mpl39
+ - windows: py312-test-mpl39
# Test newest configurations
- - linux: py313-test-mpl310
- - macos: py313-test-mpl310
- - windows: py313-test-mpl310
+ - linux: py314-test-mpl310
+ - macos: py314-test-mpl310
+ - windows: py314-test-mpl310
# Test intermediate SPEC 0 configurations on Linux
- - linux: py311-test-mpl39
- - linux: py312-test-mpl39
- - linux: py311-test-mpl310
- - linux: py312-test-mpl310
+ - linux: py313-test-mpl39
+ - linux: py313-test-mpl310
# Test non-SPEC 0 configurations
- - linux: py313-test-mpldev-pytestdev
- - linux: py311-test-mpl37-pytest74
- - linux: py39-test-mpl33-pytest62
- # Test oldest non-SPEC 0 configurations
- - linux: py39-test-mpl33
- - macos: py39-test-mpl35
- - windows: py39-test-mpl33
+ - linux: py314-test-mpldev-pytestdev
+ - linux: py313-test-mpl38-pytest84
+ - linux: py312-test-mpl38-pytest74
+ - linux: py310-test-mpl35-pytest62
+ # Test oldest supported Python configurations
+ - linux: py310-test-mpl35
+ - macos: py310-test-mpl35
+ - windows: py310-test-mpl35
coverage: 'codecov'
publish:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_mpl-0.18.0/.github/workflows/update-changelog.yaml
new/pytest_mpl-0.19.0/.github/workflows/update-changelog.yaml
--- old/pytest_mpl-0.18.0/.github/workflows/update-changelog.yaml
2025-11-15 14:43:02.000000000 +0100
+++ new/pytest_mpl-0.19.0/.github/workflows/update-changelog.yaml
2026-03-25 11:00:28.000000000 +0100
@@ -16,7 +16,7 @@
steps:
- name: Checkout code
- uses: actions/checkout@v5
+ uses: actions/checkout@v6
with:
ref: main
persist-credentials: true
@@ -29,7 +29,7 @@
path-to-changelog: CHANGES.md
- name: Commit updated CHANGELOG
- uses:
stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 #
v4
+ uses:
stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 #
v4
with:
branch: main
commit_message: Update CHANGELOG
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_mpl-0.18.0/CHANGES.md
new/pytest_mpl-0.19.0/CHANGES.md
--- old/pytest_mpl-0.18.0/CHANGES.md 2025-11-15 14:43:02.000000000 +0100
+++ new/pytest_mpl-0.19.0/CHANGES.md 2026-03-25 11:00:28.000000000 +0100
@@ -1,3 +1,40 @@
+## v0.18.0 - 2025-11-15
+
+<!-- Release notes generated using configuration in .github/release.yml at
main -->
+### What's Changed
+
+#### Exciting New Features 🎉
+
+* Support generating summary reports when using `pytest-xdist` by
@ConorMacBride in https://github.com/matplotlib/pytest-mpl/pull/242
+
+#### Other Changes
+
+* [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci[bot] in
https://github.com/matplotlib/pytest-mpl/pull/226
+* [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci[bot] in
https://github.com/matplotlib/pytest-mpl/pull/228
+* [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci[bot] in
https://github.com/matplotlib/pytest-mpl/pull/229
+* [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci[bot] in
https://github.com/matplotlib/pytest-mpl/pull/233
+* CI: Harden GHA configuration by @tacaswell in
https://github.com/matplotlib/pytest-mpl/pull/243
+* Bump stefanzweifel/git-auto-commit-action from 4.16.0 to 6.0.1 by
@dependabot[bot] in https://github.com/matplotlib/pytest-mpl/pull/244
+* Bump OpenAstronomy/github-actions-workflows from 1 to 2 by @dependabot[bot]
in https://github.com/matplotlib/pytest-mpl/pull/245
+* Bump actions/checkout from 2 to 4 by @dependabot[bot] in
https://github.com/matplotlib/pytest-mpl/pull/246
+* Group all gha dependabot updates by @Cadair in
https://github.com/matplotlib/pytest-mpl/pull/247
+* Bump actions/checkout from 4 to 5 in the actions group by @dependabot[bot]
in https://github.com/matplotlib/pytest-mpl/pull/249
+* Set oldest macOS test to`mpl35` by @ConorMacBride in
https://github.com/matplotlib/pytest-mpl/pull/250
+* Bump stefanzweifel/git-auto-commit-action from 6.0.1 to 7.0.0 in the actions
group by @dependabot[bot] in https://github.com/matplotlib/pytest-mpl/pull/251
+* MNT/DEP: migrate static package metadata to pyproject.toml and add missing
lower bounds on direct dependencies by @neutrinoceros in
https://github.com/matplotlib/pytest-mpl/pull/252
+
+#### Infrastructure Changes
+
+* Generate baseline hashes during tests to reduce flakiness by @ConorMacBride
in https://github.com/matplotlib/pytest-mpl/pull/234
+* Ensure requirements pinned in `tox.ini` are not overridden by @ConorMacBride
in https://github.com/matplotlib/pytest-mpl/pull/253
+
+### New Contributors
+
+* @tacaswell made their first contribution in
https://github.com/matplotlib/pytest-mpl/pull/243
+* @dependabot[bot] made their first contribution in
https://github.com/matplotlib/pytest-mpl/pull/244
+
+**Full Changelog**:
https://github.com/matplotlib/pytest-mpl/compare/v0.17.0...v0.18.0
+
## v0.17.0 - 2024-02-14
<!-- Release notes generated using configuration in .github/release.yml at
main -->
@@ -61,8 +98,11 @@
### Fixes
- Make summary log message about test results in general instead of failures
by @neutrinoceros in https://github.com/matplotlib/pytest-mpl/pull/148
+
- Add support for classes with pytest 7 by @ConorMacBride in
https://github.com/matplotlib/pytest-mpl/pull/164
+
- Note that this change necessitated a minor breaking change for figure tests
within classes only, and the following will need to be done:
+
- - Hash library test names will need to be regenerated/updated to include the
class name.
- - If the undocumented `mpl-use-full-test-name` ini option is enabled, the
the baseline images will need to be regenerated, or have their filename updated
to include the class name.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_mpl-0.18.0/PKG-INFO
new/pytest_mpl-0.19.0/PKG-INFO
--- old/pytest_mpl-0.18.0/PKG-INFO 2025-11-15 14:43:10.788101200 +0100
+++ new/pytest_mpl-0.19.0/PKG-INFO 2026-03-25 11:00:37.667269700 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: pytest-mpl
-Version: 0.18.0
+Version: 0.19.0
Summary: pytest plugin to help with testing figures output from Matplotlib
Author-email: Thomas Robitaille <[email protected]>
License-Expression: BSD-2-Clause
@@ -13,11 +13,11 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
-Requires-Python: >=3.9
+Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
-Requires-Dist: pytest>=5.4.0
-Requires-Dist: matplotlib>=3.3.3
+Requires-Dist: pytest>=6.2.5
+Requires-Dist: matplotlib>=3.5.3
Requires-Dist: packaging>=22.0.0
Requires-Dist: Jinja2>=2.10.2
Requires-Dist: Pillow>=8.1.1
@@ -27,7 +27,7 @@
Requires-Dist: sphinx>=7.0.0; extra == "docs"
Requires-Dist: mpl_sphinx_theme>=3.9.0; extra == "docs"
Requires-Dist: sphinx_design>=0.6.0; extra == "docs"
-Requires-Dist: matplotlib==3.9.*; extra == "docs"
+Requires-Dist: matplotlib==3.10.*; extra == "docs"
Dynamic: license-file
``pytest-mpl``
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_mpl-0.18.0/docs/configuration.rst
new/pytest_mpl-0.19.0/docs/configuration.rst
--- old/pytest_mpl-0.18.0/docs/configuration.rst 2025-11-15
14:43:02.000000000 +0100
+++ new/pytest_mpl-0.19.0/docs/configuration.rst 2026-03-25
11:00:28.000000000 +0100
@@ -207,6 +207,30 @@
Configuring this option disables baseline image comparison.
If you want to enable both hash and baseline image comparison, which we call
:doc:`"hybrid mode" <hybrid_mode>`, you must explicitly set the :ref:`baseline
directory configuration option <baseline-dir>`.
+.. _skip-hash:
+
+Skip hash comparison for specific tests
+---------------------------------------
+| **kwarg**: ``skip_hash=<bool>``
+| **CLI**: ---
+| **INI**: ---
+| Default: ``False``
+
+When a global hash library is configured (via CLI or INI), you can disable
hash comparison for specific tests by setting ``skip_hash=True``.
+This is useful for tests that have non-deterministic output where exact hash
matching is not possible, but baseline image comparison with a tolerance is
acceptable.
+
+When ``skip_hash=True`` is set, the test will use baseline image comparison
instead of hash comparison, even if a hash library is configured globally.
+
+.. code:: python
+
+ @pytest.mark.mpl_image_compare(skip_hash=True, tolerance=10)
+ def test_plot_with_tolerance():
+ # This test will use baseline image comparison with tolerance,
+ # skipping hash comparison even if --mpl-hash-library is set
+ ...
+
+This option is particularly useful in :doc:`"hybrid mode" <hybrid_mode>` when
most tests should use hash comparison for speed and reliability, but a few
tests need tolerance-based image comparison due to platform-specific rendering
differences.
+
.. _controlling-sensitivity:
Controlling the sensitivity of the comparison
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_mpl-0.18.0/docs/hybrid_mode.rst
new/pytest_mpl-0.19.0/docs/hybrid_mode.rst
--- old/pytest_mpl-0.18.0/docs/hybrid_mode.rst 2025-11-15 14:43:02.000000000
+0100
+++ new/pytest_mpl-0.19.0/docs/hybrid_mode.rst 2026-03-25 11:00:28.000000000
+0100
@@ -82,6 +82,24 @@
:summary:`test_basic_html`
+Skipping hash comparison for specific tests
+============================================
+
+In some cases, certain tests may produce images that are not deterministic
across platforms or environments.
+For these tests, you can use ``skip_hash=True`` to disable hash comparison and
fall back to baseline image comparison with a tolerance:
+
+.. code-block:: python
+
+ @pytest.mark.mpl_image_compare(skip_hash=True, tolerance=10)
+ def test_plot_with_platform_differences():
+ # This test will use baseline image comparison instead of hash
comparison
+ fig, ax = plt.subplots()
+ ax.plot([1, 2, 3])
+ return fig
+
+This allows you to use hash comparison for most tests (for speed and
reliability), while allowing a few tests to use tolerance-based image
comparison.
+See the :ref:`skip_hash configuration option <skip-hash>` for more details.
+
Continue reading
================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_mpl-0.18.0/pyproject.toml
new/pytest_mpl-0.19.0/pyproject.toml
--- old/pytest_mpl-0.18.0/pyproject.toml 2025-11-15 14:43:02.000000000
+0100
+++ new/pytest_mpl-0.19.0/pyproject.toml 2026-03-25 11:00:28.000000000
+0100
@@ -25,10 +25,10 @@
"Operating System :: OS Independent",
]
description = "pytest plugin to help with testing figures output from
Matplotlib"
-requires-python = ">=3.9"
+requires-python = ">=3.10"
dependencies = [
- "pytest>=5.4.0",
- "matplotlib>=3.3.3",
+ "pytest>=6.2.5",
+ "matplotlib>=3.5.3",
"packaging>=22.0.0",
"Jinja2>=2.10.2",
"Pillow>=8.1.1",
@@ -55,7 +55,7 @@
"sphinx>=7.0.0",
"mpl_sphinx_theme>=3.9.0",
"sphinx_design>=0.6.0",
- "matplotlib==3.9.*",
+ "matplotlib==3.10.*",
]
[tool.setuptools]
@@ -86,4 +86,3 @@
"stdlib",
]
line_length = 100
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_mpl-0.18.0/pytest_mpl/plugin.py
new/pytest_mpl-0.19.0/pytest_mpl/plugin.py
--- old/pytest_mpl-0.18.0/pytest_mpl/plugin.py 2025-11-15 14:43:02.000000000
+0100
+++ new/pytest_mpl-0.19.0/pytest_mpl/plugin.py 2026-03-25 11:00:28.000000000
+0100
@@ -694,9 +694,11 @@
if deterministic is None:
# The deterministic option should only matter for hash-based tests,
- # so we first check if a hash library is being used
+ # so we first check if a hash library is being used (and not
skipped)
+ skip_hash = compare.kwargs.get('skip_hash', False)
+ use_hash_library = (self.hash_library or
compare.kwargs.get('hash_library', None)) and not skip_hash
- if self.hash_library or compare.kwargs.get('hash_library', None):
+ if use_hash_library:
if ext == 'png':
if 'metadata' not in savefig_kwargs or 'Software' not in
savefig_kwargs['metadata']:
@@ -910,15 +912,21 @@
result_image.relative_to(self.results_dir).as_posix()
if self.generate_hash_library is not None:
- summary['hash_status'] = 'generated'
- image_hash = self.generate_image_hash(item, fig)
- self._generated_hash_library[test_name] = image_hash
- summary['baseline_hash'] = image_hash
+ skip_hash = compare.kwargs.get('skip_hash', False)
+ if skip_hash:
+ summary['hash_status'] = 'skipped'
+ else:
+ summary['hash_status'] = 'generated'
+ image_hash = self.generate_image_hash(item, fig)
+ self._generated_hash_library[test_name] = image_hash
+ summary['baseline_hash'] = image_hash
# Only test figures if not generating images
if self.generate_dir is None:
- # Compare to hash library
- if self.hash_library or compare.kwargs.get('hash_library',
None):
+ # Compare to hash library (skip_hash=True disables for
this test)
+ skip_hash = compare.kwargs.get('skip_hash', False)
+ use_hash_library = (self.hash_library or
compare.kwargs.get('hash_library', None)) and not skip_hash
+ if use_hash_library:
msg = self.compare_image_to_hash_library(item, fig,
result_dir, summary=summary)
# Compare against a baseline if specified
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_mpl-0.18.0/pytest_mpl.egg-info/PKG-INFO
new/pytest_mpl-0.19.0/pytest_mpl.egg-info/PKG-INFO
--- old/pytest_mpl-0.18.0/pytest_mpl.egg-info/PKG-INFO 2025-11-15
14:43:10.000000000 +0100
+++ new/pytest_mpl-0.19.0/pytest_mpl.egg-info/PKG-INFO 2026-03-25
11:00:37.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: pytest-mpl
-Version: 0.18.0
+Version: 0.19.0
Summary: pytest plugin to help with testing figures output from Matplotlib
Author-email: Thomas Robitaille <[email protected]>
License-Expression: BSD-2-Clause
@@ -13,11 +13,11 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
-Requires-Python: >=3.9
+Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
-Requires-Dist: pytest>=5.4.0
-Requires-Dist: matplotlib>=3.3.3
+Requires-Dist: pytest>=6.2.5
+Requires-Dist: matplotlib>=3.5.3
Requires-Dist: packaging>=22.0.0
Requires-Dist: Jinja2>=2.10.2
Requires-Dist: Pillow>=8.1.1
@@ -27,7 +27,7 @@
Requires-Dist: sphinx>=7.0.0; extra == "docs"
Requires-Dist: mpl_sphinx_theme>=3.9.0; extra == "docs"
Requires-Dist: sphinx_design>=0.6.0; extra == "docs"
-Requires-Dist: matplotlib==3.9.*; extra == "docs"
+Requires-Dist: matplotlib==3.10.*; extra == "docs"
Dynamic: license-file
``pytest-mpl``
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_mpl-0.18.0/pytest_mpl.egg-info/requires.txt
new/pytest_mpl-0.19.0/pytest_mpl.egg-info/requires.txt
--- old/pytest_mpl-0.18.0/pytest_mpl.egg-info/requires.txt 2025-11-15
14:43:10.000000000 +0100
+++ new/pytest_mpl-0.19.0/pytest_mpl.egg-info/requires.txt 2026-03-25
11:00:37.000000000 +0100
@@ -1,5 +1,5 @@
-pytest>=5.4.0
-matplotlib>=3.3.3
+pytest>=6.2.5
+matplotlib>=3.5.3
packaging>=22.0.0
Jinja2>=2.10.2
Pillow>=8.1.1
@@ -8,7 +8,7 @@
sphinx>=7.0.0
mpl_sphinx_theme>=3.9.0
sphinx_design>=0.6.0
-matplotlib==3.9.*
+matplotlib==3.10.*
[test]
pytest-cov>=6.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_mpl-0.18.0/tests/test_hash_library.py
new/pytest_mpl-0.19.0/tests/test_hash_library.py
--- old/pytest_mpl-0.18.0/tests/test_hash_library.py 2025-11-15
14:43:02.000000000 +0100
+++ new/pytest_mpl-0.19.0/tests/test_hash_library.py 2026-03-25
11:00:28.000000000 +0100
@@ -4,6 +4,93 @@
from helpers import pytester_path
+def test_skip_hash(pytester):
+ """Test that skip_hash=True skips hash comparison and uses baseline
instead."""
+ path = pytester_path(pytester)
+ hash_library = path / "hash_library.json"
+ baseline_dir = path / "baseline"
+
+ # Generate baseline image (no hash library needed for generation)
+ pytester.makepyfile(
+ """
+ import matplotlib.pyplot as plt
+ import pytest
+ @pytest.mark.mpl_image_compare()
+ def test_mpl():
+ fig = plt.figure()
+ ax = fig.add_subplot(1, 1, 1)
+ ax.plot([1, 3, 2])
+ return fig
+ """
+ )
+ pytester.runpytest(f"--mpl-generate-path={baseline_dir}")
+
+ # Create hash library with bad hash
+ with open(hash_library, "w") as fp:
+ json.dump({"test_skip_hash.test_mpl": "bad-hash-value"}, fp)
+
+ # Without skip_hash: should fail (hash mismatch)
+ result = pytester.runpytest("--mpl",
+ f"--mpl-hash-library={hash_library}",
+ f"--mpl-baseline-path={baseline_dir}")
+ result.assert_outcomes(failed=1)
+
+ # With skip_hash=True: should pass (uses baseline comparison, skips hash)
+ pytester.makepyfile(
+ """
+ import matplotlib.pyplot as plt
+ import pytest
+ @pytest.mark.mpl_image_compare(skip_hash=True)
+ def test_mpl():
+ fig = plt.figure()
+ ax = fig.add_subplot(1, 1, 1)
+ ax.plot([1, 3, 2])
+ return fig
+ """
+ )
+ result = pytester.runpytest("--mpl",
+ f"--mpl-hash-library={hash_library}",
+ f"--mpl-baseline-path={baseline_dir}")
+ result.assert_outcomes(passed=1)
+
+
+def test_skip_hash_not_generated(pytester):
+ """Test that skip_hash=True tests are not included in generated hash
library."""
+ path = pytester_path(pytester)
+ hash_library = path / "hash_library.json"
+
+ pytester.makepyfile(
+ """
+ import matplotlib.pyplot as plt
+ import pytest
+
+ @pytest.mark.mpl_image_compare()
+ def test_normal():
+ fig = plt.figure()
+ ax = fig.add_subplot(1, 1, 1)
+ ax.plot([1, 2, 3])
+ return fig
+
+ @pytest.mark.mpl_image_compare(skip_hash=True)
+ def test_skip():
+ fig = plt.figure()
+ ax = fig.add_subplot(1, 1, 1)
+ ax.plot([3, 2, 1])
+ return fig
+ """
+ )
+ pytester.runpytest(f"--mpl-generate-hash-library={hash_library}")
+
+ # Check generated hash library
+ with open(hash_library) as fp:
+ hashes = json.load(fp)
+
+ # test_normal should be in the hash library
+ assert "test_skip_hash_not_generated.test_normal" in hashes
+ # test_skip should NOT be in the hash library
+ assert "test_skip_hash_not_generated.test_skip" not in hashes
+
+
@pytest.mark.parametrize(
"ini, cli, kwarg, success_expected",
[
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_mpl-0.18.0/tox.ini
new/pytest_mpl-0.19.0/tox.ini
--- old/pytest_mpl-0.18.0/tox.ini 2025-11-15 14:43:02.000000000 +0100
+++ new/pytest_mpl-0.19.0/tox.ini 2026-03-25 11:00:28.000000000 +0100
@@ -1,7 +1,7 @@
[tox]
envlist =
- py{39,310,311,312}-test-mpl{33,34,35,36,37,38}
- py312-test-mpldev-pytestdev
+
py{312,313,314}-test-mpl{35,36,37,38,39,310}-pytest{62,70,71,72,73,74,80,81,82,83,84}
+ py314-test-mpldev-pytestdev
codestyle
requires =
setuptools >= 30.3.0
@@ -22,28 +22,15 @@
!mpldev-!pytestdev: true
deps =
pytest-xdist
- mpl20: matplotlib==2.0.*
- mpl21: matplotlib==2.1.*
- mpl22: matplotlib==2.2.*
- mpl22: numpy<2
- mpl30: matplotlib==3.0.*
- mpl31: matplotlib==3.1.*
- mpl31: numpy<2
- mpl32: matplotlib==3.2.*
- mpl33: matplotlib==3.3.*
- mpl33: numpy<2
- mpl34: matplotlib==3.4.*
- mpl35: matplotlib==3.5.*
+ mpl{35,36,37,38,39}: pyparsing<3.3.0
mpl35: numpy<2
+ mpl35: matplotlib==3.5.*
mpl36: matplotlib==3.6.*
mpl37: matplotlib==3.7.*
mpl38: matplotlib==3.8.*
mpl39: matplotlib==3.9.*
mpl310: matplotlib==3.10.*
mpldev: matplotlib>=0.0.dev0
- pytest54: pytest==5.4.*
- pytest60: pytest==6.0.*
- pytest61: pytest==6.1.*
pytest62: pytest==6.2.*
pytest70: pytest==7.0.*
pytest71: pytest==7.1.*
@@ -54,6 +41,7 @@
pytest81: pytest==8.1.*
pytest82: pytest==8.2.*
pytest83: pytest==8.3.*
+ pytest84: pytest==8.4.*
pytestdev: git+https://github.com/pytest-dev/pytest.git#egg=pytest
extras =
test