Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-regressions for
openSUSE:Factory checked in at 2026-01-21 14:13:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-regressions (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-regressions.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-regressions"
Wed Jan 21 14:13:28 2026 rev:9 rq:1327967 version:2.9.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-regressions/python-pytest-regressions.changes
2025-11-25 15:51:01.565877339 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-regressions.new.1928/python-pytest-regressions.changes
2026-01-21 14:13:39.653596131 +0100
@@ -1,0 +2,10 @@
+Mon Jan 19 00:33:00 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Update to 2.9.1:
+ * Fix type annotation for data_regression.check.
+ * ImageRegression.check now supports receiving an PIL.Image object
+ directly.
+ * Support for Python 3.14 has been added, while Python 3.9 (EOL) has been
+ dropped.
+
+-------------------------------------------------------------------
Old:
----
pytest_regressions-2.8.3.tar.gz
New:
----
pytest_regressions-2.9.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-regressions.spec ++++++
--- /var/tmp/diff_new_pack.6kuL5a/_old 2026-01-21 14:13:40.253621193 +0100
+++ /var/tmp/diff_new_pack.6kuL5a/_new 2026-01-21 14:13:40.253621193 +0100
@@ -18,13 +18,13 @@
%{?sle15_python_module_pythons}
Name: python-pytest-regressions
-Version: 2.8.3
+Version: 2.9.1
Release: 0
License: MIT
Summary: Python fixtures to write regression tests
URL: https://github.com/ESSS/pytest-regressions
Source:
https://files.pythonhosted.org/packages/source/p/pytest-regressions/pytest_regressions-%{version}.tar.gz
-BuildRequires: %{python_module base >= 3.9}
+BuildRequires: %{python_module base >= 3.10}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
@@ -35,7 +35,7 @@
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module numpy}
-BuildRequires: %{python_module pytest-datadir >= 1.2.0}
+BuildRequires: %{python_module pytest-datadir >= 1.7.0}
# These could be added as build dep for testing but are commented to
# reduce the number of requirements.
# BuildRequires: %%{python_module pandas}
@@ -44,7 +44,7 @@
BuildRequires: fdupes
Requires: python-PyYAML
Requires: python-pytest >= 6.2.0
-Requires: python-pytest-datadir >= 1.2.0
+Requires: python-pytest-datadir >= 1.7.0
Suggests: python-matplotlib
Suggests: python-numpy
Suggests: python-pandas
++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.6kuL5a/_old 2026-01-21 14:13:40.293622864 +0100
+++ /var/tmp/diff_new_pack.6kuL5a/_new 2026-01-21 14:13:40.297623031 +0100
@@ -1,6 +1,6 @@
-mtime: 1763956324
-commit: 1ad4edf6fe5f668239f78a807d8d75e542f05d4a4b40c96f928712fd278c0d40
+mtime: 1768782793
+commit: 755a45b82e017c4dc6bdfb2ea23ef1eb9b81b826d8c7615fef84ed7f05e17ea7
url: https://src.opensuse.org/python-pytest/python-pytest-regressions.git
-revision: 1ad4edf6fe5f668239f78a807d8d75e542f05d4a4b40c96f928712fd278c0d40
+revision: 755a45b82e017c4dc6bdfb2ea23ef1eb9b81b826d8c7615fef84ed7f05e17ea7
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-01-19 01:43:05.000000000 +0100
@@ -0,0 +1 @@
+.osc
++++++ pytest_regressions-2.8.3.tar.gz -> pytest_regressions-2.9.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/.github/workflows/deploy.yml
new/pytest_regressions-2.9.1/.github/workflows/deploy.yml
--- old/pytest_regressions-2.8.3/.github/workflows/deploy.yml 2025-09-05
14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/.github/workflows/deploy.yml 2026-01-09
17:47:28.000000000 +0100
@@ -15,10 +15,10 @@
env:
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }}
steps:
- - uses: actions/checkout@v5
+ - uses: actions/checkout@v6
- name: Build and Check Package
- uses: hynek/[email protected]
+ uses: hynek/[email protected]
deploy:
needs: package
@@ -28,10 +28,10 @@
contents: write # For tag.
steps:
- - uses: actions/checkout@v5
+ - uses: actions/checkout@v6
- name: Download Package
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v7
with:
name: Packages
path: dist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_regressions-2.8.3/.github/workflows/test.yml
new/pytest_regressions-2.9.1/.github/workflows/test.yml
--- old/pytest_regressions-2.8.3/.github/workflows/test.yml 2025-09-05
14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/.github/workflows/test.yml 2026-01-09
17:47:28.000000000 +0100
@@ -22,9 +22,9 @@
package:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v5
+ - uses: actions/checkout@v6
- name: Build and Check Package
- uses: hynek/[email protected]
+ uses: hynek/[email protected]
test:
needs: [package]
@@ -32,20 +32,20 @@
strategy:
fail-fast: false
matrix:
- python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
os: [ubuntu-latest, windows-latest]
steps:
- - uses: actions/checkout@v5
+ - uses: actions/checkout@v6
- name: Download Package
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v7
with:
name: Packages
path: dist
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_regressions-2.8.3/.pre-commit-config.yaml
new/pytest_regressions-2.9.1/.pre-commit-config.yaml
--- old/pytest_regressions-2.8.3/.pre-commit-config.yaml 2025-09-05
14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/.pre-commit-config.yaml 2026-01-09
17:47:28.000000000 +0100
@@ -14,12 +14,12 @@
language: python
files: \.py$
- repo: https://github.com/asottile/reorder-python-imports
- rev: v3.15.0
+ rev: v3.16.0
hooks:
- id: reorder-python-imports
args: ['--application-directories=.:src', --py36-plus]
-- repo: https://github.com/psf/black
- rev: 25.1.0
+- repo: https://github.com/psf/black-pre-commit-mirror
+ rev: 25.12.0
hooks:
- id: black
args: [--safe, --quiet]
@@ -27,7 +27,14 @@
hooks:
- id: rst
name: rst
- entry: rst-lint --encoding utf-8
+ entry: rst-lint
files: ^(CHANGELOG.rst|HOWTORELEASE.rst|README.rst|changelog/.*)$
language: python
additional_dependencies: [pygments, restructuredtext_lint]
+- repo: https://github.com/pre-commit/mirrors-mypy
+ rev: v1.19.1
+ hooks:
+ - id: mypy
+ files: ^(src/|tests/)
+ additional_dependencies:
+ - pytest-datadir
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_regressions-2.8.3/CHANGELOG.rst
new/pytest_regressions-2.9.1/CHANGELOG.rst
--- old/pytest_regressions-2.8.3/CHANGELOG.rst 2025-09-05 14:51:02.000000000
+0200
+++ new/pytest_regressions-2.9.1/CHANGELOG.rst 2026-01-09 17:47:28.000000000
+0100
@@ -1,3 +1,19 @@
+2.9.1
+-----
+
+*2026-01-09*
+
+* `#222 <https://github.com/ESSS/pytest-regressions/pull/222>`__: Fix type
annotation for ``data_regression.check``.
+
+
+2.9.0
+-----
+
+*2026-01-08*
+
+* `#218 <https://github.com/ESSS/pytest-regressions/pull/218>`__:
``ImageRegression.check`` now supports receiving an ``PIL.Image`` object
directly.
+* `#220 <https://github.com/ESSS/pytest-regressions/pull/220>`__: Support for
Python 3.14 has been added, while Python 3.9 (EOL) has been dropped.
+
2.8.3
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_regressions-2.8.3/PKG-INFO
new/pytest_regressions-2.9.1/PKG-INFO
--- old/pytest_regressions-2.8.3/PKG-INFO 2025-09-05 14:51:05.766727000
+0200
+++ new/pytest_regressions-2.9.1/PKG-INFO 2026-01-09 17:47:32.461976300
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: pytest-regressions
-Version: 2.8.3
+Version: 2.9.1
Summary: Easy to use fixtures to write regression tests.
Home-page: https://github.com/ESSS/pytest-regressions
Author: ESSS
@@ -13,15 +13,15 @@
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Testing
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
+Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
-Requires-Python: >=3.9
+Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: pytest-datadir>=1.7.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_regressions-2.8.3/doc/conf.py
new/pytest_regressions-2.9.1/doc/conf.py
--- old/pytest_regressions-2.8.3/doc/conf.py 2025-09-05 14:51:02.000000000
+0200
+++ new/pytest_regressions-2.9.1/doc/conf.py 2026-01-09 17:47:28.000000000
+0100
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_regressions-2.8.3/setup.py
new/pytest_regressions-2.9.1/setup.py
--- old/pytest_regressions-2.8.3/setup.py 2025-09-05 14:51:02.000000000
+0200
+++ new/pytest_regressions-2.9.1/setup.py 2026-01-09 17:47:28.000000000
+0100
@@ -24,7 +24,7 @@
long_description_content_type="text/x-rst",
packages=find_packages("src"),
package_dir={"": "src"},
- python_requires=">=3.9",
+ python_requires=">=3.10",
package_data={
"pytest_regressions": ["py.typed"],
},
@@ -54,11 +54,11 @@
"Intended Audience :: Developers",
"Topic :: Software Development :: Testing",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
+ "Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions/common.py
new/pytest_regressions-2.9.1/src/pytest_regressions/common.py
--- old/pytest_regressions-2.8.3/src/pytest_regressions/common.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions/common.py
2026-01-09 17:47:28.000000000 +0100
@@ -1,9 +1,10 @@
import difflib
import os
+from collections.abc import Callable
from collections.abc import MutableMapping
from collections.abc import MutableSequence
from pathlib import Path
-from typing import Callable
+from typing import Any
from typing import Optional
from typing import TYPE_CHECKING
from typing import TypeVar
@@ -12,7 +13,7 @@
import pytest
if TYPE_CHECKING:
- from pytest_datadir import LazyDataDir
+ from pytest_datadir.plugin import LazyDataDir
def import_error_message(libname: str) -> str:
@@ -23,7 +24,7 @@
obtained_fn: "os.PathLike[str]",
expected_fn: "os.PathLike[str]",
fix_callback: Callable[[list[str]], list[str]] = lambda x: x,
- encoding: Optional[str] = None,
+ encoding: str | None = None,
) -> None:
"""
Compare two files contents. If the files differ, show the diff and write a
nice HTML
@@ -92,7 +93,7 @@
check_fn: Callable[[Path, Path], None],
dump_fn: Callable[[Path], None],
extension: str,
- basename: Optional[str] = None,
+ basename: str | None = None,
fullpath: Optional["os.PathLike[str]"] = None,
force_regen: bool = False,
with_test_class_names: bool = False,
@@ -197,7 +198,7 @@
raise
-T = TypeVar("T", bound=Union[MutableSequence, MutableMapping])
+T = TypeVar("T", bound=Union[MutableSequence[Any], MutableMapping[Any, Any]])
def round_digits_in_data(data: T, digits: int) -> T:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions/data_regression.py
new/pytest_regressions-2.9.1/src/pytest_regressions/data_regression.py
--- old/pytest_regressions-2.8.3/src/pytest_regressions/data_regression.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions/data_regression.py
2026-01-09 17:47:28.000000000 +0100
@@ -1,8 +1,9 @@
import os
+from collections.abc import Callable
+from collections.abc import MutableMapping
from functools import partial
from pathlib import Path
from typing import Any
-from typing import Callable
from typing import Optional
from typing import TYPE_CHECKING
@@ -14,7 +15,7 @@
from .common import round_digits_in_data
if TYPE_CHECKING:
- from pytest_datadir import LazyDataDir
+ from pytest_datadir.plugin import LazyDataDir
class DataRegressionFixture:
@@ -36,10 +37,10 @@
def check(
self,
- data_dict: dict[str, Any],
- basename: Optional[str] = None,
+ data_dict: MutableMapping[Any, Any],
+ basename: str | None = None,
fullpath: Optional["os.PathLike[str]"] = None,
- round_digits: Optional[int] = None,
+ round_digits: int | None = None,
) -> None:
"""
Checks the given dict against a previously recorded version, or
generate a new file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions/dataframe_regression.py
new/pytest_regressions-2.9.1/src/pytest_regressions/dataframe_regression.py
--- old/pytest_regressions-2.8.3/src/pytest_regressions/dataframe_regression.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions/dataframe_regression.py
2026-01-09 17:47:28.000000000 +0100
@@ -10,7 +10,7 @@
from .common import perform_regression_check
if TYPE_CHECKING:
- from pytest_datadir import LazyDataDir
+ from pytest_datadir.plugin import LazyDataDir
class DataFrameRegressionFixture:
@@ -191,10 +191,10 @@
def check(
self,
data_frame: Any,
- basename: Optional[str] = None,
+ basename: str | None = None,
fullpath: Optional["os.PathLike[str]"] = None,
- tolerances: Optional[dict[str, dict[str, float]]] = None,
- default_tolerance: Optional[dict[str, float]] = None,
+ tolerances: dict[str, dict[str, float]] | None = None,
+ default_tolerance: dict[str, float] | None = None,
) -> None:
"""
Checks a pandas dataframe, containing only numeric data, against a
previously recorded version, or generate a new file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions/file_regression.py
new/pytest_regressions-2.9.1/src/pytest_regressions/file_regression.py
--- old/pytest_regressions-2.8.3/src/pytest_regressions/file_regression.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions/file_regression.py
2026-01-09 17:47:28.000000000 +0100
@@ -1,10 +1,9 @@
import os
+from collections.abc import Callable
from functools import partial
from pathlib import Path
-from typing import Callable
from typing import Optional
from typing import TYPE_CHECKING
-from typing import Union
import pytest
@@ -12,7 +11,7 @@
from .common import perform_regression_check
if TYPE_CHECKING:
- from pytest_datadir import LazyDataDir
+ from pytest_datadir.plugin import LazyDataDir
class FileRegressionFixture:
@@ -34,15 +33,15 @@
def check(
self,
- contents: Union[str, bytes],
- encoding: Optional[str] = None,
+ contents: str | bytes,
+ encoding: str | None = None,
extension: str = ".txt",
- newline: Optional[str] = None,
- basename: Optional[str] = None,
+ newline: str | None = None,
+ basename: str | None = None,
fullpath: Optional["os.PathLike[str]"] = None,
binary: bool = False,
obtained_filename: Optional["os.PathLike[str]"] = None,
- check_fn: Optional[Callable[[Path, Path], None]] = None,
+ check_fn: Callable[[Path, Path], None] | None = None,
) -> None:
"""
Checks the contents against a previously recorded version, or generate
a new file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions/image_regression.py
new/pytest_regressions-2.9.1/src/pytest_regressions/image_regression.py
--- old/pytest_regressions-2.8.3/src/pytest_regressions/image_regression.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions/image_regression.py
2026-01-09 17:47:28.000000000 +0100
@@ -5,6 +5,7 @@
from typing import Any
from typing import Optional
from typing import TYPE_CHECKING
+from typing import Union
import pytest
@@ -12,7 +13,8 @@
from .common import perform_regression_check
if TYPE_CHECKING:
- from pytest_datadir import LazyDataDir
+ from pytest_datadir.plugin import LazyDataDir
+ from PIL import Image
class ImageRegressionFixture:
@@ -117,7 +119,7 @@
obtained_img = self._load_image(obtained_file)
expected_img = self._load_image(expected_file)
- def check_result(equal: bool, manhattan_distance: Optional[float]) ->
None:
+ def check_result(equal: bool, manhattan_distance: float | None) ->
None:
if equal != expect_equal:
if expect_equal:
assert (
@@ -140,16 +142,16 @@
def check(
self,
- image_data: bytes,
+ image_data: Union[bytes, "Image.Image"],
diff_threshold: float = 0.1,
expect_equal: bool = True,
- basename: Optional[str] = None,
+ basename: str | None = None,
fullpath: Optional["os.PathLike[str]"] = None,
) -> None:
"""
Checks that the given image contents are comparable with the ones
stored in the data directory.
- :param image_data: image data
+ :param image_data: image data bytes which can be read with PIL, or
directly a PIL image object.
:param basename: basename to store the information in the data
directory. If none, use the name
of the test function.
:param expect_equal: if the image should considered equal below of the
given threshold. If False, the
@@ -170,7 +172,11 @@
raise ModuleNotFoundError(import_error_message("Pillow"))
def dump_fn(target: Path) -> None:
- image = Image.open(io.BytesIO(image_data))
+ if isinstance(image_data, Image.Image):
+ image = image_data
+ else:
+ image = Image.open(io.BytesIO(image_data))
+
image.save(str(target), "PNG")
perform_regression_check(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions/ndarrays_regression.py
new/pytest_regressions-2.9.1/src/pytest_regressions/ndarrays_regression.py
--- old/pytest_regressions-2.8.3/src/pytest_regressions/ndarrays_regression.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions/ndarrays_regression.py
2026-01-09 17:47:28.000000000 +0100
@@ -11,7 +11,7 @@
from .common import perform_regression_check
if TYPE_CHECKING:
- from pytest_datadir import LazyDataDir
+ from pytest_datadir.plugin import LazyDataDir
class NDArraysRegressionFixture:
@@ -280,10 +280,10 @@
def check(
self,
data_dict: dict[str, Any],
- basename: Optional[str] = None,
+ basename: str | None = None,
fullpath: Optional["os.PathLike[str]"] = None,
- tolerances: Optional[dict[str, dict[str, float]]] = None,
- default_tolerance: Optional[dict[str, float]] = None,
+ tolerances: dict[str, dict[str, float]] | None = None,
+ default_tolerance: dict[str, float] | None = None,
) -> None:
"""
Checks a dictionary of NumPy ndarrays, containing only numeric data,
against a previously recorded version, or generate a new file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions/num_regression.py
new/pytest_regressions-2.9.1/src/pytest_regressions/num_regression.py
--- old/pytest_regressions-2.8.3/src/pytest_regressions/num_regression.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions/num_regression.py
2026-01-09 17:47:28.000000000 +0100
@@ -15,11 +15,11 @@
def check(
self,
data_dict: dict[str, Any],
- basename: Optional[str] = None,
+ basename: str | None = None,
fullpath: Optional["os.PathLike[str]"] = None,
- tolerances: Optional[dict[str, dict[str, float]]] = None,
- default_tolerance: Optional[dict[str, float]] = None,
- data_index: Optional[Sequence[int]] = None,
+ tolerances: dict[str, dict[str, float]] | None = None,
+ default_tolerance: dict[str, float] | None = None,
+ data_index: Sequence[int] | None = None,
fill_different_shape_with_nan: bool = True,
) -> None:
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions/plugin.py
new/pytest_regressions-2.9.1/src/pytest_regressions/plugin.py
--- old/pytest_regressions-2.8.3/src/pytest_regressions/plugin.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions/plugin.py
2026-01-09 17:47:28.000000000 +0100
@@ -11,7 +11,7 @@
from .file_regression import FileRegressionFixture
from .num_regression import NumericRegressionFixture
from .image_regression import ImageRegressionFixture
- from pytest_datadir import LazyDataDir
+ from pytest_datadir.plugin import LazyDataDir
def pytest_addoption(parser: Any) -> None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions/testing.py
new/pytest_regressions-2.9.1/src/pytest_regressions/testing.py
--- old/pytest_regressions-2.8.3/src/pytest_regressions/testing.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions/testing.py
2026-01-09 17:47:28.000000000 +0100
@@ -1,6 +1,5 @@
+from collections.abc import Callable
from typing import Any
-from typing import Callable
-from typing import Optional
import pytest
@@ -12,7 +11,7 @@
data_modifier: Callable[[], Any],
expected_data_1: Any,
expected_data_2: Any,
- compare_fn: Optional[Callable[[object, object], None]] = None,
+ compare_fn: Callable[[object, object], None] | None = None,
) -> None:
"""
Helper method to test regression fixtures like `data_regression`. Offers a
basic template/script
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions.egg-info/PKG-INFO
new/pytest_regressions-2.9.1/src/pytest_regressions.egg-info/PKG-INFO
--- old/pytest_regressions-2.8.3/src/pytest_regressions.egg-info/PKG-INFO
2025-09-05 14:51:05.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions.egg-info/PKG-INFO
2026-01-09 17:47:32.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: pytest-regressions
-Version: 2.8.3
+Version: 2.9.1
Summary: Easy to use fixtures to write regression tests.
Home-page: https://github.com/ESSS/pytest-regressions
Author: ESSS
@@ -13,15 +13,15 @@
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Testing
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
+Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
-Requires-Python: >=3.9
+Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: pytest-datadir>=1.7.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/src/pytest_regressions.egg-info/SOURCES.txt
new/pytest_regressions-2.9.1/src/pytest_regressions.egg-info/SOURCES.txt
--- old/pytest_regressions-2.8.3/src/pytest_regressions.egg-info/SOURCES.txt
2025-09-05 14:51:05.000000000 +0200
+++ new/pytest_regressions-2.9.1/src/pytest_regressions.egg-info/SOURCES.txt
2026-01-09 17:47:32.000000000 +0100
@@ -50,6 +50,7 @@
tests/test_data_regression/case.normal.yml
tests/test_data_regression/test_custom_object.yml
tests/test_data_regression/test_example.yml
+tests/test_data_regression/test_integer_keys.yml
tests/test_data_regression/test_round_digits.yml
tests/test_dataframe_regression/test_arrays_of_same_size.csv
tests/test_dataframe_regression/test_arrays_with_different_sizes.csv
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/tests/test_data_regression/test_integer_keys.yml
new/pytest_regressions-2.9.1/tests/test_data_regression/test_integer_keys.yml
---
old/pytest_regressions-2.8.3/tests/test_data_regression/test_integer_keys.yml
1970-01-01 01:00:00.000000000 +0100
+++
new/pytest_regressions-2.9.1/tests/test_data_regression/test_integer_keys.yml
2026-01-09 17:47:28.000000000 +0100
@@ -0,0 +1,4 @@
+1: first
+2: second
+10: tenth
+100: hundredth
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/tests/test_data_regression.py
new/pytest_regressions-2.9.1/tests/test_data_regression.py
--- old/pytest_regressions-2.8.3/tests/test_data_regression.py 2025-09-05
14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/tests/test_data_regression.py 2026-01-09
17:47:28.000000000 +0100
@@ -4,22 +4,34 @@
import pytest
import yaml
+from pytest_regressions.data_regression import DataRegressionFixture
from pytest_regressions.testing import check_regression_fixture_workflow
-def test_example(data_regression):
+def test_example(data_regression: DataRegressionFixture) -> None:
"""Basic example"""
contents = {"contents": "Foo", "value": 11}
data_regression.check(contents)
-def test_basename(data_regression):
+def test_basename(data_regression: DataRegressionFixture) -> None:
"""Basic example using basename parameter"""
contents = {"contents": "Foo", "value": 11}
data_regression.check(contents, basename="case.normal")
-def test_custom_object(data_regression):
+def test_integer_keys(data_regression: DataRegressionFixture) -> None:
+ """Test that integer keys are supported in data dictionaries."""
+ contents = {
+ 1: "first",
+ 2: "second",
+ 10: "tenth",
+ 100: "hundredth",
+ }
+ data_regression.check(contents)
+
+
+def test_custom_object(data_regression: DataRegressionFixture) -> None:
"""Basic example where we register a custom conversion to dump objects"""
class Scalar:
@@ -39,7 +51,7 @@
data_regression.check(contents)
-def test_round_digits(data_regression):
+def test_round_digits(data_regression: DataRegressionFixture) -> None:
"""Example including float numbers and check rounding capabilities."""
contents = {
"content": {"value1": "toto", "value": 1.123456789},
@@ -63,7 +75,7 @@
)
source = """
import sys
- def test_1(data_regression):
+ def test_1(data_regression) -> None:
contents = sys.testing_get_data()
data_regression.check(contents)
"""
@@ -98,7 +110,7 @@
assert not fullpath.is_file()
source = """
- def test(data_regression):
+ def test(data_regression) -> None:
contents = {'data': [1, 2]}
data_regression.check(contents, fullpath=%s)
""" % (
@@ -127,7 +139,7 @@
This test makes sure data regression never uses aliases when dumping
expected file to YAML.
"""
source = """
- def test(data_regression):
+ def test(data_regression) -> None:
red = (255, 0, 0)
green = (0, 255, 0)
blue = (0, 0, 255)
@@ -184,7 +196,7 @@
"""Basic example where we serializing the object should throw an error and
should not create the file"""
source = """
- def test(data_regression):
+ def test(data_regression) -> None:
class Scalar:
def __init__(self, value, unit):
self.value = value
@@ -204,14 +216,14 @@
def test_regen_all(pytester, tmp_path):
source = """
- def test_1(data_regression):
+ def test_1(data_regression) -> None:
contents = {"contents": "Foo", "value": 11}
data_regression.check(contents, basename="test_1_a")
contents = {"contents": "Bar", "value": 12}
data_regression.check(contents, basename="test_1_b")
- def test_2(data_regression):
+ def test_2(data_regression) -> None:
contents = {"contents": "Baz", "value": 33}
data_regression.check(contents, basename="test_2_a")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/tests/test_dataframe_regression.py
new/pytest_regressions-2.9.1/tests/test_dataframe_regression.py
--- old/pytest_regressions-2.8.3/tests/test_dataframe_regression.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/tests/test_dataframe_regression.py
2026-01-09 17:47:28.000000000 +0100
@@ -11,7 +11,7 @@
@pytest.fixture
-def no_regen(dataframe_regression, request):
+def no_regen(dataframe_regression: DataFrameRegressionFixture, request):
if dataframe_regression._force_regen or
request.config.getoption("force_regen"):
pytest.fail("--force-regen should not be used on this test.")
@@ -49,7 +49,7 @@
)
-def test_common_cases(dataframe_regression, no_regen):
+def test_common_cases(dataframe_regression: DataFrameRegressionFixture,
no_regen):
# Most common case: Data is valid, is present and should pass
data1 = 1.1 * np.ones(5000)
data2 = 2.2 * np.ones(5000)
@@ -152,7 +152,9 @@
)
-def test_different_data_types(dataframe_regression, no_regen):
+def test_different_data_types(
+ dataframe_regression: DataFrameRegressionFixture, no_regen
+):
# Original CSV file contains integer data
data1 = np.array([True] * 10)
with pytest.raises(
@@ -170,7 +172,9 @@
@pytest.mark.parametrize(
"array", [[np.random.randint(10, 99, 6)] * 6, [Foo(i) for i in range(4)]]
)
-def test_non_numeric_data(dataframe_regression, array, no_regen):
+def test_non_numeric_data(
+ dataframe_regression: DataFrameRegressionFixture, array, no_regen
+):
data1 = pd.DataFrame()
data1["data1"] = array
with pytest.raises(
@@ -181,7 +185,9 @@
dataframe_regression.check(data1)
-def test_arrays_with_different_sizes(dataframe_regression, no_regen):
+def test_arrays_with_different_sizes(
+ dataframe_regression: DataFrameRegressionFixture, no_regen
+):
data1 = np.ones(10, dtype=np.float64)
with pytest.raises(
AssertionError, match="Obtained and expected data shape are not the
same."
@@ -189,22 +195,24 @@
dataframe_regression.check(pd.DataFrame.from_dict({"data1": data1}))
-def test_nonrange_index(dataframe_regression, no_regen):
+def test_nonrange_index(dataframe_regression: DataFrameRegressionFixture,
no_regen):
data1 = pd.DataFrame({"b": ["a", "b", "c"]}, index=pd.Index([90, 91, 92],
name="a"))
dataframe_regression.check(data1)
-def test_integer_values_smoke_test(dataframe_regression, no_regen):
+def test_integer_values_smoke_test(
+ dataframe_regression: DataFrameRegressionFixture, no_regen
+):
data1 = np.ones(11, dtype=int)
dataframe_regression.check(pd.DataFrame.from_dict({"data1": data1}))
-def test_number_formats(dataframe_regression, no_regen):
+def test_number_formats(dataframe_regression: DataFrameRegressionFixture,
no_regen):
data1 = np.array([1.2345678e50, 1.2345678e-50, 0.0])
dataframe_regression.check(pd.DataFrame.from_dict({"data1": data1}))
-def test_bool_array(dataframe_regression, no_regen):
+def test_bool_array(dataframe_regression: DataFrameRegressionFixture,
no_regen):
data1 = np.array([True, True, True], dtype=bool)
with pytest.raises(AssertionError) as excinfo:
dataframe_regression.check(pd.DataFrame.from_dict({"data1": data1}))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/tests/test_file_regression.py
new/pytest_regressions-2.9.1/tests/test_file_regression.py
--- old/pytest_regressions-2.8.3/tests/test_file_regression.py 2025-09-05
14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/tests/test_file_regression.py 2026-01-09
17:47:28.000000000 +0100
@@ -3,10 +3,11 @@
import pytest
+from pytest_regressions.file_regression import FileRegressionFixture
from pytest_regressions.testing import check_regression_fixture_workflow
-def test_simple_text_file(file_regression):
+def test_simple_text_file(file_regression: FileRegressionFixture):
contents = textwrap.dedent(
"""\
# Title
@@ -16,12 +17,12 @@
file_regression.check(contents, encoding="latin1", extension=".md")
-def test_simple_bin_file(file_regression):
+def test_simple_bin_file(file_regression: FileRegressionFixture):
contents = b"binary contents \xff\xff\xde"
file_regression.check(contents, binary=True, extension=".bin")
-def test_binary_and_text_error(file_regression):
+def test_binary_and_text_error(file_regression: FileRegressionFixture):
with pytest.raises(ValueError):
file_regression.check("", encoding="UTF-8", binary=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_regressions-2.8.3/tests/test_filenames.py
new/pytest_regressions-2.9.1/tests/test_filenames.py
--- old/pytest_regressions-2.8.3/tests/test_filenames.py 2025-09-05
14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/tests/test_filenames.py 2026-01-09
17:47:28.000000000 +0100
@@ -1,7 +1,9 @@
import pytest
+from pytest_regressions.num_regression import NumericRegressionFixture
-def test_foo(lazy_datadir, num_regression):
+
+def test_foo(lazy_datadir, num_regression: NumericRegressionFixture):
"""
Dumb test, just to generate a expected csv file that must be different
from the one gathered
from `TestClass::test_foo`.
@@ -16,7 +18,7 @@
class TestClass:
- def test_foo(self, lazy_datadir, num_regression):
+ def test_foo(self, lazy_datadir, num_regression: NumericRegressionFixture):
"""
Since 2.2.1, pytest-regressions use the test class name to compose the
name of the datafiles, by default.
This tests asserts this behavior.
@@ -36,7 +38,7 @@
class TestClassWithIgnoredName:
- def test_foo(self, lazy_datadir, num_regression):
+ def test_foo(self, lazy_datadir, num_regression: NumericRegressionFixture):
"""
Specifies to not use the class name to compose the expected data
filename. The filename coincides with the
expected data filename used by `test_foo` function. The regression
test then fails because the expected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_regressions-2.8.3/tests/test_grids.py
new/pytest_regressions-2.9.1/tests/test_grids.py
--- old/pytest_regressions-2.8.3/tests/test_grids.py 2025-09-05
14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/tests/test_grids.py 2026-01-09
17:47:28.000000000 +0100
@@ -1,4 +1,7 @@
-def summary_grids():
+from typing import Any
+
+
+def summary_grids() -> dict[str, Any]:
return {
"Main Grid": {
"id": 0,
@@ -21,7 +24,7 @@
}
-def test_grids():
+def test_grids() -> None:
data = summary_grids()
assert data["Main Grid"]["id"] == 0
assert data["Main Grid"]["cell_count"] == 1000
@@ -32,6 +35,6 @@
]
-def test_grids2(data_regression):
+def test_grids2(data_regression) -> None:
data = summary_grids()
data_regression.check(data)
Binary files
old/pytest_regressions-2.8.3/tests/test_image_regression/test_image_regression.png
and
new/pytest_regressions-2.9.1/tests/test_image_regression/test_image_regression.png
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/tests/test_image_regression.py
new/pytest_regressions-2.9.1/tests/test_image_regression.py
--- old/pytest_regressions-2.8.3/tests/test_image_regression.py 2025-09-05
14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/tests/test_image_regression.py 2026-01-09
17:47:28.000000000 +0100
@@ -1,10 +1,17 @@
import io
from functools import partial
+import pytest
+from PIL import Image
+
+from pytest_regressions.image_regression import ImageRegressionFixture
from pytest_regressions.testing import check_regression_fixture_workflow
-def test_image_regression(image_regression, lazy_datadir):
[email protected]("image_type", ["pil", "bytes"])
+def test_image_regression(
+ image_regression: ImageRegressionFixture, lazy_datadir, image_type
+):
import matplotlib
# this ensures matplot lib does not use a GUI backend (such as Tk)
@@ -29,19 +36,29 @@
image_filename = lazy_datadir / "test.png"
fig.savefig(str(image_filename))
- image_regression.check(image_filename.read_bytes(), diff_threshold=1.0)
+ if image_type == "bytes":
+ image_data = image_filename.read_bytes()
+ else:
+ image_data = Image.open(image_filename)
+ image_regression.check(
+ image_data, diff_threshold=1.0, basename="test_image_regression"
+ )
-def test_image_regression_workflow(pytester, monkeypatch):
[email protected]("image_type", ["pil", "bytes"])
+def test_image_regression_workflow(pytester, monkeypatch, image_type):
import sys
from PIL import Image
def get_image(color):
- f = io.BytesIO()
img = Image.new("RGB", (100, 100), color)
- img.save(f, "PNG")
- return f.getvalue()
+ if image_type == "pil":
+ return img
+ else:
+ f = io.BytesIO()
+ img.save(f, "PNG")
+ return f.getvalue()
monkeypatch.setattr(sys, "get_image", partial(get_image, "white"),
raising=False)
source = """
@@ -54,7 +71,11 @@
def get_file_contents():
fn = pytester.path / "test_file" / "test_1.png"
assert fn.is_file()
- return fn.read_bytes()
+ if image_type == "pil":
+ # Copy is necessary because Image.open returns a ImageFile class
+ return Image.open(fn).copy()
+ else:
+ return fn.read_bytes()
check_regression_fixture_workflow(
pytester,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/tests/test_ndarrays_regression.py
new/pytest_regressions-2.9.1/tests/test_ndarrays_regression.py
--- old/pytest_regressions-2.8.3/tests/test_ndarrays_regression.py
2025-09-05 14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/tests/test_ndarrays_regression.py
2026-01-09 17:47:28.000000000 +0100
@@ -3,11 +3,12 @@
import numpy as np
import pytest
+from pytest_regressions.ndarrays_regression import NDArraysRegressionFixture
from pytest_regressions.testing import check_regression_fixture_workflow
@pytest.fixture
-def no_regen(ndarrays_regression, request):
+def no_regen(ndarrays_regression: NDArraysRegressionFixture, request):
if ndarrays_regression._force_regen or
request.config.getoption("force_regen"):
pytest.fail("--force-regen should not be used on this test.")
@@ -43,7 +44,7 @@
)
-def test_common_case(ndarrays_regression, no_regen):
+def test_common_case(ndarrays_regression: NDArraysRegressionFixture, no_regen):
# Most common case: Data is valid, is present and should pass
data1 = np.full(5000, 1.1, dtype=float)
data2 = np.arange(5000, dtype=int)
@@ -140,7 +141,7 @@
assert expected in obtained_error_msg
-def test_common_case_nd(ndarrays_regression, no_regen):
+def test_common_case_nd(ndarrays_regression: NDArraysRegressionFixture,
no_regen):
# Most common case: Data is valid, is present and should pass
data1 = np.full((50, 20), 1.1, dtype=float)
data2 = np.arange(60, dtype=int).reshape((3, 4, 5))
@@ -238,7 +239,9 @@
assert expected in obtained_error_msg
-def test_common_case_zero_expected(ndarrays_regression, no_regen):
+def test_common_case_zero_expected(
+ ndarrays_regression: NDArraysRegressionFixture, no_regen
+):
# Most common case: Data is valid, is present and should pass
data = {"data1": np.array([0, 0, 2, 3, 0, 5, 0, 7])}
ndarrays_regression.check(data)
@@ -276,7 +279,7 @@
assert expected in obtained_error_msg
-def test_different_data_types(ndarrays_regression, no_regen):
+def test_different_data_types(ndarrays_regression: NDArraysRegressionFixture,
no_regen):
# Generate data with integer array.
data = {"data1": np.array([1] * 10)}
ndarrays_regression.check(data)
@@ -302,7 +305,7 @@
self.bar = bar
-def test_object_dtype(ndarrays_regression, no_regen):
+def test_object_dtype(ndarrays_regression: NDArraysRegressionFixture,
no_regen):
data1 = {"data1": np.array([Foo(i) for i in range(4)], dtype=object)}
with pytest.raises(TypeError) as excinfo:
ndarrays_regression.check(data1)
@@ -316,7 +319,9 @@
assert expected in obtained_error_msg
-def test_integer_values_smoke_test(ndarrays_regression, no_regen):
+def test_integer_values_smoke_test(
+ ndarrays_regression: NDArraysRegressionFixture, no_regen
+):
data1 = np.ones(11, dtype=int)
ndarrays_regression.check({"data1": data1})
@@ -326,7 +331,7 @@
ndarrays_regression.check({"data1": data1})
-def test_bool_array(ndarrays_regression, no_regen):
+def test_bool_array(ndarrays_regression: NDArraysRegressionFixture, no_regen):
# Correct data
data1 = np.array([False, False, False], dtype=bool)
ndarrays_regression.check({"data1": data1})
@@ -357,7 +362,7 @@
assert expected in obtained_error_msg
-def test_complex_array(ndarrays_regression, no_regen):
+def test_complex_array(ndarrays_regression: NDArraysRegressionFixture,
no_regen):
# Correct data
data1 = np.array([3.0 + 2.5j, -0.5, -1.879j])
ndarrays_regression.check({"data1": data1})
@@ -397,7 +402,9 @@
ndarrays_regression.check(data)
-def test_arrays_with_different_sizes_1d(ndarrays_regression, no_regen):
+def test_arrays_with_different_sizes_1d(
+ ndarrays_regression: NDArraysRegressionFixture, no_regen
+):
data = {"data1": np.ones(11, dtype=np.float64)}
ndarrays_regression.check(data)
@@ -616,7 +623,7 @@
@pytest.mark.parametrize("prefix", [True, False])
-def test_corrupt_npz(ndarrays_regression, tmp_path, prefix):
+def test_corrupt_npz(ndarrays_regression: NDArraysRegressionFixture, tmp_path,
prefix):
data = {"data1": np.array([4, 5])}
fn_npz = tmp_path / "corrupt.npz"
# Write random bytes to a file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest_regressions-2.8.3/tests/test_num_regression.py
new/pytest_regressions-2.9.1/tests/test_num_regression.py
--- old/pytest_regressions-2.8.3/tests/test_num_regression.py 2025-09-05
14:51:02.000000000 +0200
+++ new/pytest_regressions-2.9.1/tests/test_num_regression.py 2026-01-09
17:47:28.000000000 +0100
@@ -4,11 +4,12 @@
import pandas as pd
import pytest
+from pytest_regressions.num_regression import NumericRegressionFixture
from pytest_regressions.testing import check_regression_fixture_workflow
@pytest.fixture
-def no_regen(num_regression, request):
+def no_regen(num_regression: NumericRegressionFixture, request):
if num_regression._force_regen or request.config.getoption("force_regen"):
pytest.fail("--force-regen should not be used on this test.")
@@ -45,7 +46,7 @@
)
-def test_common_cases(num_regression, no_regen):
+def test_common_cases(num_regression: NumericRegressionFixture, no_regen):
# Most common case: Data is valid, is present and should pass
data1 = 1.1 * np.ones(5000)
data2 = 2.2 * np.ones(5000)
@@ -149,7 +150,7 @@
)
-def test_different_data_types(num_regression, no_regen):
+def test_different_data_types(num_regression: NumericRegressionFixture,
no_regen):
data1 = np.ones(10)
# Smoke test: Should not raise any exception
num_regression.check({"data1": data1})
@@ -162,7 +163,7 @@
num_regression.check({"data1": data2})
-def test_n_dimensions(num_regression, no_regen):
+def test_n_dimensions(num_regression: NumericRegressionFixture, no_regen):
data1 = np.ones(shape=(10, 10), dtype=int)
with pytest.raises(
AssertionError,
@@ -171,7 +172,9 @@
num_regression.check({"data1": data1})
-def test_arrays_with_different_sizes(num_regression, no_regen):
+def test_arrays_with_different_sizes(
+ num_regression: NumericRegressionFixture, no_regen
+):
data1 = np.ones(10, dtype=np.float64)
with pytest.raises(
AssertionError, match="Obtained and expected data shape are not the
same."
@@ -179,24 +182,28 @@
num_regression.check({"data1": data1})
-def test_integer_values_smoke_test(num_regression, no_regen):
+def test_integer_values_smoke_test(num_regression: NumericRegressionFixture,
no_regen):
data1 = np.ones(11, dtype=int)
num_regression.check({"data1": data1})
-def test_number_formats(num_regression, no_regen):
+def test_number_formats(num_regression: NumericRegressionFixture, no_regen):
data1 = np.array([1.2345678e50, 1.2345678e-50, 0.0])
num_regression.check({"data1": data1})
-def test_fill_different_shape_with_nan(num_regression, no_regen):
+def test_fill_different_shape_with_nan(
+ num_regression: NumericRegressionFixture, no_regen
+):
data1 = np.ones(5, dtype=np.float64)
data2 = np.ones(2, dtype=np.float32)
data3 = np.ones(6, dtype=np.float16)
num_regression.check({"data1": data1, "data2": data2, "data3": data3})
-def test_fill_different_shape_with_nan_false(num_regression, no_regen):
+def test_fill_different_shape_with_nan_false(
+ num_regression: NumericRegressionFixture, no_regen
+):
data1 = np.ones(5, dtype=np.float64)
data2 = np.ones(2, dtype=np.float32)
data3 = np.ones(6, dtype=np.float16)
@@ -210,7 +217,9 @@
)
-def test_fill_different_shape_with_nan_for_non_float_array(num_regression,
no_regen):
+def test_fill_different_shape_with_nan_for_non_float_array(
+ num_regression: NumericRegressionFixture, no_regen
+):
data1 = np.ones(5, dtype=np.int32)
data2 = np.ones(2, dtype=np.float64)
data3 = np.ones(6, dtype=np.float64)
@@ -221,7 +230,7 @@
num_regression.check({"data1": data1, "data2": data2, "data3": data3})
-def test_bool_array(num_regression, no_regen):
+def test_bool_array(num_regression: NumericRegressionFixture, no_regen):
data1 = np.array([True, True, True], dtype=bool)
with pytest.raises(AssertionError) as excinfo:
num_regression.check({"data1": data1})
@@ -253,7 +262,7 @@
num_regression.check(same_size_int_arrays)
-def test_simple_numbers(num_regression, data_regression):
+def test_simple_numbers(num_regression: NumericRegressionFixture,
data_regression):
data1 = 1.1
data2 = 2
num_regression.check({"data1": data1, "data2": data2})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest_regressions-2.8.3/tox.ini
new/pytest_regressions-2.9.1/tox.ini
--- old/pytest_regressions-2.8.3/tox.ini 2025-09-05 14:51:02.000000000
+0200
+++ new/pytest_regressions-2.9.1/tox.ini 2026-01-09 17:47:28.000000000
+0100
@@ -1,5 +1,5 @@
[tox]
-envlist = py39,py310,py311,py312,py313,pytest6
+envlist = py310,py311,py312,py313,py314,pytest6
[testenv]
download = true