dycw-utilities 0.138.6__py3-none-any.whl → 0.138.7__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.
- {dycw_utilities-0.138.6.dist-info → dycw_utilities-0.138.7.dist-info}/METADATA +1 -1
- {dycw_utilities-0.138.6.dist-info → dycw_utilities-0.138.7.dist-info}/RECORD +8 -6
- dycw_utilities-0.138.7.dist-info/entry_points.txt +2 -0
- utilities/__init__.py +1 -1
- utilities/pytest_regressions.py +1 -38
- utilities/pytest_regressions_plugin.py +51 -0
- {dycw_utilities-0.138.6.dist-info → dycw_utilities-0.138.7.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.138.6.dist-info → dycw_utilities-0.138.7.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
utilities/__init__.py,sha256=
|
1
|
+
utilities/__init__.py,sha256=Y_4wr1MFLRZ5ZwdjuZ0h_gSie-eMamrUJhqXhpN6Eo4,60
|
2
2
|
utilities/aiolimiter.py,sha256=mD0wEiqMgwpty4XTbawFpnkkmJS6R4JRsVXFUaoitSU,628
|
3
3
|
utilities/altair.py,sha256=HeZBVUocjkrTNwwKrClppsIqgNFF-ykv05HfZSoHYno,9104
|
4
4
|
utilities/asyncio.py,sha256=dcGeKQzjLBXxKzZkVIk5oZsFXEcynVbRB9iNB5XEDZk,38526
|
@@ -55,7 +55,8 @@ utilities/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
55
|
utilities/pydantic.py,sha256=CmxCi4sukeHM3JGjJ1Rbp8UAvcx4MZapLg10mFYJ-nk,1771
|
56
56
|
utilities/pyinstrument.py,sha256=HrTGJ2niUAHUFMSN3im9BeedC0faq2DqoFccDxPpsP8,884
|
57
57
|
utilities/pytest.py,sha256=f6Yl2vHimin2Ulg0aUsNhdWmf6dC1Hs6nDTFOCOpRJI,8029
|
58
|
-
utilities/pytest_regressions.py,sha256=
|
58
|
+
utilities/pytest_regressions.py,sha256=X5fN5MjRyTHWV_xe-K5a3f01I1FX0qcCMvtIQeQ93yE,4176
|
59
|
+
utilities/pytest_regressions_plugin.py,sha256=kIuQx36EzamLmakQruZjd4ak9PUKcRnrnoBJvgYCiFo,1412
|
59
60
|
utilities/python_dotenv.py,sha256=dYooRYwqrvhSoZWuiVbCiKUWiS-M5b5yv2zDWGYPEvI,3209
|
60
61
|
utilities/random.py,sha256=YWYzWxQDeyJRiuHGnO1OxF6dDucpq7qc1tH_ealwCRg,4130
|
61
62
|
utilities/re.py,sha256=6qxeV0rQZaBDKWcB7apSBmxtg_XzoGY-EdegTkMn-ZY,4578
|
@@ -87,7 +88,8 @@ utilities/warnings.py,sha256=un1LvHv70PU-LLv8RxPVmugTzDJkkGXRMZTE2-fTQHw,1771
|
|
87
88
|
utilities/whenever.py,sha256=R5d9UCNCdAOyjwLUmfH2Vn8Ykee8OHQi2skRTFfbZMM,20492
|
88
89
|
utilities/zipfile.py,sha256=24lQc9ATcJxHXBPc_tBDiJk48pWyRrlxO2fIsFxU0A8,699
|
89
90
|
utilities/zoneinfo.py,sha256=oEH-nL3t4h9uawyZqWDtNtDAl6M-CLpLYGI_nI6DulM,1971
|
90
|
-
dycw_utilities-0.138.
|
91
|
-
dycw_utilities-0.138.
|
92
|
-
dycw_utilities-0.138.
|
93
|
-
dycw_utilities-0.138.
|
91
|
+
dycw_utilities-0.138.7.dist-info/METADATA,sha256=6Xtr3iRQVgzBZqhlaQk5tw2c0Dnpt51AU2A86z1qdAE,1638
|
92
|
+
dycw_utilities-0.138.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
93
|
+
dycw_utilities-0.138.7.dist-info/entry_points.txt,sha256=uLj5QWWVXv8tnMaRX3ZGYpt7w1xzLWU6LxbFhELEpkc,68
|
94
|
+
dycw_utilities-0.138.7.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
95
|
+
dycw_utilities-0.138.7.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/pytest_regressions.py
CHANGED
@@ -6,13 +6,10 @@ from pathlib import Path
|
|
6
6
|
from shutil import copytree
|
7
7
|
from typing import TYPE_CHECKING, Any, assert_never
|
8
8
|
|
9
|
-
from pytest import fixture
|
10
9
|
from pytest_regressions.file_regression import FileRegressionFixture
|
11
10
|
|
12
11
|
from utilities.functions import ensure_str
|
13
12
|
from utilities.operator import is_equal
|
14
|
-
from utilities.pathlib import get_root
|
15
|
-
from utilities.pytest import node_id_to_path
|
16
13
|
|
17
14
|
if TYPE_CHECKING:
|
18
15
|
from polars import DataFrame, Series
|
@@ -21,9 +18,6 @@ if TYPE_CHECKING:
|
|
21
18
|
from utilities.types import PathLike, StrMapping
|
22
19
|
|
23
20
|
|
24
|
-
_PATH_TESTS = Path("src", "tests")
|
25
|
-
|
26
|
-
|
27
21
|
##
|
28
22
|
|
29
23
|
|
@@ -84,15 +78,6 @@ class OrjsonRegressionFixture:
|
|
84
78
|
assert is_equal(left, right), f"{left=}, {right=}"
|
85
79
|
|
86
80
|
|
87
|
-
@fixture
|
88
|
-
def orjson_regression(
|
89
|
-
*, request: FixtureRequest, tmp_path: Path
|
90
|
-
) -> OrjsonRegressionFixture:
|
91
|
-
"""Instance of the `OrjsonRegressionFixture`."""
|
92
|
-
path = _get_path(request)
|
93
|
-
return OrjsonRegressionFixture(path, request, tmp_path)
|
94
|
-
|
95
|
-
|
96
81
|
##
|
97
82
|
|
98
83
|
|
@@ -139,26 +124,4 @@ class PolarsRegressionFixture:
|
|
139
124
|
self._fixture.check(data, suffix=suffix)
|
140
125
|
|
141
126
|
|
142
|
-
|
143
|
-
def polars_regression(
|
144
|
-
*, request: FixtureRequest, tmp_path: Path
|
145
|
-
) -> PolarsRegressionFixture:
|
146
|
-
"""Instance of the `PolarsRegressionFixture`."""
|
147
|
-
path = _get_path(request)
|
148
|
-
return PolarsRegressionFixture(path, request, tmp_path)
|
149
|
-
|
150
|
-
|
151
|
-
##
|
152
|
-
|
153
|
-
|
154
|
-
def _get_path(request: FixtureRequest, /) -> Path:
|
155
|
-
tail = node_id_to_path(request.node.nodeid, head=_PATH_TESTS)
|
156
|
-
return get_root().joinpath(_PATH_TESTS, "regressions", tail)
|
157
|
-
|
158
|
-
|
159
|
-
__all__ = [
|
160
|
-
"OrjsonRegressionFixture",
|
161
|
-
"PolarsRegressionFixture",
|
162
|
-
"orjson_regression",
|
163
|
-
"polars_regression",
|
164
|
-
]
|
127
|
+
__all__ = ["OrjsonRegressionFixture", "PolarsRegressionFixture"]
|
@@ -0,0 +1,51 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from pathlib import Path
|
4
|
+
from typing import TYPE_CHECKING
|
5
|
+
|
6
|
+
if TYPE_CHECKING:
|
7
|
+
from pytest import FixtureRequest
|
8
|
+
|
9
|
+
from utilities.pytest_regressions import (
|
10
|
+
OrjsonRegressionFixture,
|
11
|
+
PolarsRegressionFixture,
|
12
|
+
)
|
13
|
+
|
14
|
+
|
15
|
+
try:
|
16
|
+
from pytest import fixture
|
17
|
+
except ModuleNotFoundError:
|
18
|
+
pass
|
19
|
+
else:
|
20
|
+
|
21
|
+
@fixture
|
22
|
+
def orjson_regression(
|
23
|
+
*, request: FixtureRequest, tmp_path: Path
|
24
|
+
) -> OrjsonRegressionFixture:
|
25
|
+
"""Instance of the `OrjsonRegressionFixture`."""
|
26
|
+
from utilities.pytest_regressions import OrjsonRegressionFixture
|
27
|
+
|
28
|
+
path = _get_path(request)
|
29
|
+
return OrjsonRegressionFixture(path, request, tmp_path)
|
30
|
+
|
31
|
+
@fixture
|
32
|
+
def polars_regression(
|
33
|
+
*, request: FixtureRequest, tmp_path: Path
|
34
|
+
) -> PolarsRegressionFixture:
|
35
|
+
"""Instance of the `PolarsRegressionFixture`."""
|
36
|
+
from utilities.pytest_regressions import PolarsRegressionFixture
|
37
|
+
|
38
|
+
path = _get_path(request)
|
39
|
+
return PolarsRegressionFixture(path, request, tmp_path)
|
40
|
+
|
41
|
+
|
42
|
+
def _get_path(request: FixtureRequest, /) -> Path:
|
43
|
+
from utilities.pathlib import get_root
|
44
|
+
from utilities.pytest import node_id_to_path
|
45
|
+
|
46
|
+
head = Path("src", "tests")
|
47
|
+
tail = node_id_to_path(request.node.nodeid, head=head)
|
48
|
+
return get_root().joinpath(head, "regressions", tail)
|
49
|
+
|
50
|
+
|
51
|
+
__all__ = ["orjson_regression", "polars_regression"]
|
File without changes
|
File without changes
|