pytest-regtest 2.3.0__py2.py3-none-any.whl → 2.3.1__py2.py3-none-any.whl
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/polars_handler.py +4 -4
- pytest_regtest/snapshot_handler.py +2 -2
- {pytest_regtest-2.3.0.dist-info → pytest_regtest-2.3.1.dist-info}/METADATA +4 -4
- {pytest_regtest-2.3.0.dist-info → pytest_regtest-2.3.1.dist-info}/RECORD +7 -7
- {pytest_regtest-2.3.0.dist-info → pytest_regtest-2.3.1.dist-info}/WHEEL +0 -0
- {pytest_regtest-2.3.0.dist-info → pytest_regtest-2.3.1.dist-info}/entry_points.txt +0 -0
- {pytest_regtest-2.3.0.dist-info → pytest_regtest-2.3.1.dist-info}/licenses/LICENSE.txt +0 -0
pytest_regtest/polars_handler.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import difflib
|
|
2
2
|
import io
|
|
3
3
|
import os
|
|
4
|
-
from typing import Any
|
|
4
|
+
from typing import Any, Union
|
|
5
5
|
|
|
6
6
|
import polars as pl
|
|
7
7
|
from polars.testing import assert_frame_equal
|
|
@@ -19,13 +19,13 @@ class PolarsHandler(BaseSnapshotHandler):
|
|
|
19
19
|
self.rtol = handler_options.get("rtol", 0.0)
|
|
20
20
|
self.display_options = handler_options.get("display_options", None)
|
|
21
21
|
|
|
22
|
-
def _filename(self, folder: str
|
|
22
|
+
def _filename(self, folder: Union[str, os.PathLike[Any]]) -> str:
|
|
23
23
|
return os.path.join(folder, "polars.parquet")
|
|
24
24
|
|
|
25
|
-
def save(self, folder: str
|
|
25
|
+
def save(self, folder: Union[str, os.PathLike[Any]], obj: pl.DataFrame):
|
|
26
26
|
obj.write_parquet(self._filename(folder))
|
|
27
27
|
|
|
28
|
-
def load(self, folder: str
|
|
28
|
+
def load(self, folder: Union[str, os.PathLike[Any]]) -> pl.DataFrame:
|
|
29
29
|
return pl.read_parquet(self._filename(folder))
|
|
30
30
|
|
|
31
31
|
def show(self, obj: pl.DataFrame) -> list[str]:
|
|
@@ -30,7 +30,7 @@ class BaseSnapshotHandler(abc.ABC):
|
|
|
30
30
|
"""
|
|
31
31
|
|
|
32
32
|
@abc.abstractmethod
|
|
33
|
-
def save(self, folder: Union[str, os.PathLike], obj: Any) -> None:
|
|
33
|
+
def save(self, folder: Union[str, os.PathLike[Any]], obj: Any) -> None:
|
|
34
34
|
"""
|
|
35
35
|
This method is called when a snapshot is reset, and a subclass must store the
|
|
36
36
|
given object in the given folder. How this folder is managed internally is
|
|
@@ -45,7 +45,7 @@ class BaseSnapshotHandler(abc.ABC):
|
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
47
|
@abc.abstractmethod
|
|
48
|
-
def load(self, folder: Union[str, os.PathLike]) -> Any:
|
|
48
|
+
def load(self, folder: Union[str, os.PathLike[Any]]) -> Any:
|
|
49
49
|
"""
|
|
50
50
|
This method loads an existing snapshot from the given folder and must
|
|
51
51
|
be consistent with the `save` method.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pytest-regtest
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: pytest plugin for snapshot regression testing
|
|
5
5
|
Project-URL: Source, https://gitlab.com/uweschmitt/pytest-regtest
|
|
6
6
|
Project-URL: Documentation, https://pytest-regtest.readthedocs.org
|
|
@@ -25,10 +25,10 @@ Requires-Dist: mkdocs-awesome-pages-plugin; extra == 'dev'
|
|
|
25
25
|
Requires-Dist: mkdocs-material; extra == 'dev'
|
|
26
26
|
Requires-Dist: mkdocstrings[python]; extra == 'dev'
|
|
27
27
|
Requires-Dist: numpy; extra == 'dev'
|
|
28
|
-
Requires-Dist: numpy>=2
|
|
28
|
+
Requires-Dist: numpy>=2; extra == 'dev'
|
|
29
29
|
Requires-Dist: pandas; extra == 'dev'
|
|
30
|
-
Requires-Dist: pandas>=2
|
|
31
|
-
Requires-Dist: polars>=1.9
|
|
30
|
+
Requires-Dist: pandas>=2; extra == 'dev'
|
|
31
|
+
Requires-Dist: polars>=1.9; extra == 'dev'
|
|
32
32
|
Requires-Dist: pre-commit; extra == 'dev'
|
|
33
33
|
Requires-Dist: pytest-cov; extra == 'dev'
|
|
34
34
|
Requires-Dist: ruff; extra == 'dev'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
pytest_regtest/__init__.py,sha256=q3wEEi3ZZXaN5CXc0jKCeupbAl73t64Fz1pFNcYYPYo,2536
|
|
2
2
|
pytest_regtest/numpy_handler.py,sha256=hKrVY9dId-45rUR_83w9jbUWgUhd0ABk8uLbOhgm0IM,7173
|
|
3
3
|
pytest_regtest/pandas_handler.py,sha256=7vKaHyODcKMltgn9MbbbL1FsOBQK994dEY5fVlDoQ1g,4528
|
|
4
|
-
pytest_regtest/polars_handler.py,sha256=
|
|
4
|
+
pytest_regtest/polars_handler.py,sha256=G25GmzZo95MzHoehvKXiv-SV8TkKA4TnLEqQ-nZa3d8,3796
|
|
5
5
|
pytest_regtest/pytest_regtest.py,sha256=umtd97AIpY4FpaYJCd741mTlJbrToWkUfrkoKCvHDAE,22135
|
|
6
6
|
pytest_regtest/register_third_party_handlers.py,sha256=mfmcyeMKuxFykkKLO7T1Tz5RPitn1pKLYRM7B9lA1Kg,1132
|
|
7
|
-
pytest_regtest/snapshot_handler.py,sha256=
|
|
7
|
+
pytest_regtest/snapshot_handler.py,sha256=MbWpNYOSkhQRs6U0qLT1kz5CV6JCay26yHntju8h9uU,6046
|
|
8
8
|
pytest_regtest/utils.py,sha256=2jYTlV_qL5hH6FCeg7T1HJJvKual-Kux2scJ9_aB1lY,811
|
|
9
|
-
pytest_regtest-2.3.
|
|
10
|
-
pytest_regtest-2.3.
|
|
11
|
-
pytest_regtest-2.3.
|
|
12
|
-
pytest_regtest-2.3.
|
|
13
|
-
pytest_regtest-2.3.
|
|
9
|
+
pytest_regtest-2.3.1.dist-info/METADATA,sha256=16asDzUZLiNEDdtGYRvqz9bp_XAk4uEbbqxmtkwLT90,4087
|
|
10
|
+
pytest_regtest-2.3.1.dist-info/WHEEL,sha256=fl6v0VwpzfGBVsGtkAkhILUlJxROXbA3HvRL6Fe3140,105
|
|
11
|
+
pytest_regtest-2.3.1.dist-info/entry_points.txt,sha256=4VuIhXeMGhDo0ATbaUfyjND0atofmZjV_P-o6_uEk2s,36
|
|
12
|
+
pytest_regtest-2.3.1.dist-info/licenses/LICENSE.txt,sha256=Tue36uAzpW79-9WAqzkwPhsDDVd1X-VWUmdZ0MfGYvk,1068
|
|
13
|
+
pytest_regtest-2.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|