pytest-regtest 2.3.4__tar.gz → 2.3.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_regtest-2.3.4/src/pytest_regtest.egg-info → pytest_regtest-2.3.5}/PKG-INFO +2 -24
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/pyproject.toml +25 -9
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest/numpy_handler.py +1 -2
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest/pandas_handler.py +8 -13
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest/pytest_regtest.py +0 -2
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5/src/pytest_regtest.egg-info}/PKG-INFO +2 -24
- pytest_regtest-2.3.5/src/pytest_regtest.egg-info/requires.txt +1 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/tests/conftest.py +1 -0
- pytest_regtest-2.3.4/src/pytest_regtest.egg-info/requires.txt +0 -23
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/LICENSE.txt +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/MANIFEST.in +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/README.md +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/setup.cfg +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest/__init__.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest/polars_handler.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest/register_third_party_handlers.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest/snapshot_handler.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest/utils.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest.egg-info/SOURCES.txt +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest.egg-info/dependency_links.txt +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest.egg-info/entry_points.txt +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest.egg-info/top_level.txt +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/tests/test_cli.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/tests/test_regtest.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/tests/test_snapshot.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/tests/test_snapshot_numpy.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/tests/test_snapshot_pandas.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/tests/test_snapshot_polars.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/tests/test_snapshot_python_types.py +0 -0
- {pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/tests/test_utils.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-regtest
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.5
|
|
4
4
|
Summary: pytest plugin for snapshot regression testing
|
|
5
5
|
Author-email: Uwe Schmitt <uwe.schmitt@id.ethz.ch>
|
|
6
|
-
License: MIT
|
|
6
|
+
License-Expression: MIT
|
|
7
7
|
Project-URL: Source, https://gitlab.com/uweschmitt/pytest-regtest
|
|
8
8
|
Project-URL: Documentation, https://pytest-regtest.readthedocs.org
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
@@ -11,31 +11,9 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.10
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
14
|
Description-Content-Type: text/markdown
|
|
16
15
|
License-File: LICENSE.txt
|
|
17
16
|
Requires-Dist: pytest>7.2
|
|
18
|
-
Provides-Extra: dev
|
|
19
|
-
Requires-Dist: twine; extra == "dev"
|
|
20
|
-
Requires-Dist: build; extra == "dev"
|
|
21
|
-
Requires-Dist: hatchling; extra == "dev"
|
|
22
|
-
Requires-Dist: wheel; extra == "dev"
|
|
23
|
-
Requires-Dist: pre-commit; extra == "dev"
|
|
24
|
-
Requires-Dist: ruff; extra == "dev"
|
|
25
|
-
Requires-Dist: black; extra == "dev"
|
|
26
|
-
Requires-Dist: pytest-cov; extra == "dev"
|
|
27
|
-
Requires-Dist: numpy; extra == "dev"
|
|
28
|
-
Requires-Dist: pandas; extra == "dev"
|
|
29
|
-
Requires-Dist: mkdocs; extra == "dev"
|
|
30
|
-
Requires-Dist: mkdocs-material; extra == "dev"
|
|
31
|
-
Requires-Dist: mistletoe; extra == "dev"
|
|
32
|
-
Requires-Dist: mkdocs-awesome-pages-plugin; extra == "dev"
|
|
33
|
-
Requires-Dist: jinja2-cli; extra == "dev"
|
|
34
|
-
Requires-Dist: mkdocstrings[python]; extra == "dev"
|
|
35
|
-
Requires-Dist: numpy>=2; extra == "dev"
|
|
36
|
-
Requires-Dist: pandas>=2; extra == "dev"
|
|
37
|
-
Requires-Dist: polars>=1.9; extra == "dev"
|
|
38
|
-
Requires-Dist: md-transformer>=0.0.3; extra == "dev"
|
|
39
17
|
Dynamic: license-file
|
|
40
18
|
|
|
41
19
|

|
|
@@ -6,14 +6,14 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "pytest-regtest"
|
|
9
|
-
version = "2.3.
|
|
9
|
+
version = "2.3.5"
|
|
10
10
|
description = "pytest plugin for snapshot regression testing"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
authors = [
|
|
13
13
|
{name = "Uwe Schmitt", email = "uwe.schmitt@id.ethz.ch"}
|
|
14
14
|
]
|
|
15
15
|
|
|
16
|
-
license =
|
|
16
|
+
license = "MIT"
|
|
17
17
|
|
|
18
18
|
classifiers = [
|
|
19
19
|
"Intended Audience :: Developers",
|
|
@@ -21,7 +21,6 @@ classifiers = [
|
|
|
21
21
|
"Programming Language :: Python :: 3.10",
|
|
22
22
|
"Programming Language :: Python :: 3.11",
|
|
23
23
|
"Programming Language :: Python :: 3.12",
|
|
24
|
-
"License :: OSI Approved :: MIT License"
|
|
25
24
|
]
|
|
26
25
|
|
|
27
26
|
dependencies = [
|
|
@@ -43,11 +42,28 @@ exclude = ["_regtest_output"]
|
|
|
43
42
|
[tool.ruff.lint]
|
|
44
43
|
ignore = ["E731", "E203"]
|
|
45
44
|
|
|
46
|
-
[
|
|
45
|
+
[dependency-groups]
|
|
47
46
|
dev = [
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
47
|
+
"pandas>=2.2.3",
|
|
48
|
+
"twine",
|
|
49
|
+
"build",
|
|
50
|
+
"hatchling",
|
|
51
|
+
"wheel",
|
|
52
|
+
"pre-commit",
|
|
53
|
+
"ruff",
|
|
54
|
+
"black",
|
|
55
|
+
"pytest-cov",
|
|
56
|
+
"numpy",
|
|
57
|
+
"pandas",
|
|
58
|
+
"mkdocs",
|
|
59
|
+
"mkdocs-material",
|
|
60
|
+
"mistletoe",
|
|
61
|
+
"mkdocs-awesome-pages-plugin",
|
|
62
|
+
"jinja2-cli",
|
|
63
|
+
"mkdocstrings[python]",
|
|
64
|
+
"numpy>=2",
|
|
65
|
+
"pandas>=2",
|
|
66
|
+
"polars>=1.9",
|
|
67
|
+
"md-transformer>=0.0.3",
|
|
68
|
+
"pdbp>=1.7.1",
|
|
53
69
|
]
|
|
@@ -145,8 +145,7 @@ class NumpyHandler(BaseSnapshotHandler):
|
|
|
145
145
|
" entries"
|
|
146
146
|
)
|
|
147
147
|
lines.append(
|
|
148
|
-
f"up to given precision settings rtol={self.rtol:e} and"
|
|
149
|
-
f" atol={self.atol:e}"
|
|
148
|
+
f"up to given precision settings rtol={self.rtol:e} and atol={self.atol:e}"
|
|
150
149
|
)
|
|
151
150
|
|
|
152
151
|
return lines
|
|
@@ -75,21 +75,16 @@ class DataFrameHandler(BaseSnapshotHandler):
|
|
|
75
75
|
def extract(df, selector):
|
|
76
76
|
return df[[n for (n, t) in zip(df.columns, df.dtypes) if selector(t)]]
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
).to_numpy()
|
|
78
|
+
def is_float(t):
|
|
79
|
+
return t.type in (np.float64, np.float32)
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
current_reduced, lambda t: t.type is not np.float64
|
|
84
|
-
)
|
|
81
|
+
current_reduced_floats = extract(current_reduced, is_float).to_numpy()
|
|
85
82
|
|
|
86
|
-
|
|
87
|
-
recorded_reduced, lambda t: t.type is np.float64
|
|
88
|
-
).to_numpy()
|
|
83
|
+
current_reduced_other = extract(current_reduced, lambda t: not is_float(t))
|
|
89
84
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
)
|
|
85
|
+
recorded_reduced_floats = extract(recorded_reduced, is_float).to_numpy()
|
|
86
|
+
|
|
87
|
+
recorded_reduced_other = extract(recorded_reduced, lambda t: not is_float(t))
|
|
93
88
|
|
|
94
89
|
return np.allclose(
|
|
95
90
|
current_reduced_floats,
|
|
@@ -97,7 +92,7 @@ class DataFrameHandler(BaseSnapshotHandler):
|
|
|
97
92
|
atol=self.atol,
|
|
98
93
|
rtol=self.rtol,
|
|
99
94
|
equal_nan=True,
|
|
100
|
-
) and
|
|
95
|
+
) and current_reduced_other.equals(recorded_reduced_other)
|
|
101
96
|
|
|
102
97
|
def show_differences(self, current, recorded, has_markup):
|
|
103
98
|
lines = []
|
|
@@ -108,7 +108,6 @@ class PytestRegtestPlugin:
|
|
|
108
108
|
if output_exception is not None:
|
|
109
109
|
raise output_exception
|
|
110
110
|
|
|
111
|
-
|
|
112
111
|
def check_recorded_output(self, item):
|
|
113
112
|
test_folder = item.fspath.dirname
|
|
114
113
|
regtest_stream = item.regtest_stream
|
|
@@ -257,7 +256,6 @@ class SnapshotPlugin:
|
|
|
257
256
|
if snapshot_exception is not None:
|
|
258
257
|
raise snapshot_exception
|
|
259
258
|
|
|
260
|
-
|
|
261
259
|
def check_snapshots(self, item):
|
|
262
260
|
results = []
|
|
263
261
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-regtest
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.5
|
|
4
4
|
Summary: pytest plugin for snapshot regression testing
|
|
5
5
|
Author-email: Uwe Schmitt <uwe.schmitt@id.ethz.ch>
|
|
6
|
-
License: MIT
|
|
6
|
+
License-Expression: MIT
|
|
7
7
|
Project-URL: Source, https://gitlab.com/uweschmitt/pytest-regtest
|
|
8
8
|
Project-URL: Documentation, https://pytest-regtest.readthedocs.org
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
@@ -11,31 +11,9 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.10
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
14
|
Description-Content-Type: text/markdown
|
|
16
15
|
License-File: LICENSE.txt
|
|
17
16
|
Requires-Dist: pytest>7.2
|
|
18
|
-
Provides-Extra: dev
|
|
19
|
-
Requires-Dist: twine; extra == "dev"
|
|
20
|
-
Requires-Dist: build; extra == "dev"
|
|
21
|
-
Requires-Dist: hatchling; extra == "dev"
|
|
22
|
-
Requires-Dist: wheel; extra == "dev"
|
|
23
|
-
Requires-Dist: pre-commit; extra == "dev"
|
|
24
|
-
Requires-Dist: ruff; extra == "dev"
|
|
25
|
-
Requires-Dist: black; extra == "dev"
|
|
26
|
-
Requires-Dist: pytest-cov; extra == "dev"
|
|
27
|
-
Requires-Dist: numpy; extra == "dev"
|
|
28
|
-
Requires-Dist: pandas; extra == "dev"
|
|
29
|
-
Requires-Dist: mkdocs; extra == "dev"
|
|
30
|
-
Requires-Dist: mkdocs-material; extra == "dev"
|
|
31
|
-
Requires-Dist: mistletoe; extra == "dev"
|
|
32
|
-
Requires-Dist: mkdocs-awesome-pages-plugin; extra == "dev"
|
|
33
|
-
Requires-Dist: jinja2-cli; extra == "dev"
|
|
34
|
-
Requires-Dist: mkdocstrings[python]; extra == "dev"
|
|
35
|
-
Requires-Dist: numpy>=2; extra == "dev"
|
|
36
|
-
Requires-Dist: pandas>=2; extra == "dev"
|
|
37
|
-
Requires-Dist: polars>=1.9; extra == "dev"
|
|
38
|
-
Requires-Dist: md-transformer>=0.0.3; extra == "dev"
|
|
39
17
|
Dynamic: license-file
|
|
40
18
|
|
|
41
19
|

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pytest>7.2
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
pytest>7.2
|
|
2
|
-
|
|
3
|
-
[dev]
|
|
4
|
-
twine
|
|
5
|
-
build
|
|
6
|
-
hatchling
|
|
7
|
-
wheel
|
|
8
|
-
pre-commit
|
|
9
|
-
ruff
|
|
10
|
-
black
|
|
11
|
-
pytest-cov
|
|
12
|
-
numpy
|
|
13
|
-
pandas
|
|
14
|
-
mkdocs
|
|
15
|
-
mkdocs-material
|
|
16
|
-
mistletoe
|
|
17
|
-
mkdocs-awesome-pages-plugin
|
|
18
|
-
jinja2-cli
|
|
19
|
-
mkdocstrings[python]
|
|
20
|
-
numpy>=2
|
|
21
|
-
pandas>=2
|
|
22
|
-
polars>=1.9
|
|
23
|
-
md-transformer>=0.0.3
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest/register_third_party_handlers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_regtest-2.3.4 → pytest_regtest-2.3.5}/src/pytest_regtest.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|