plexus-python-common 1.1.86__py3-none-any.whl → 1.1.88__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.
- plexus/common/utils/testutils.py +4 -1
- {plexus_python_common-1.1.86.dist-info → plexus_python_common-1.1.88.dist-info}/METADATA +1 -1
- {plexus_python_common-1.1.86.dist-info → plexus_python_common-1.1.88.dist-info}/RECORD +5 -5
- {plexus_python_common-1.1.86.dist-info → plexus_python_common-1.1.88.dist-info}/WHEEL +1 -1
- {plexus_python_common-1.1.86.dist-info → plexus_python_common-1.1.88.dist-info}/top_level.txt +0 -0
plexus/common/utils/testutils.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import abc
|
|
2
|
+
import datetime
|
|
2
3
|
from decimal import Decimal
|
|
3
4
|
from typing import Any, Protocol
|
|
4
5
|
|
|
@@ -69,7 +70,9 @@ def nested_approx(expected, rel: float = None, abs: float = None, nan_ok: bool =
|
|
|
69
70
|
return ApproxNestedSequenceLike(expected, rel, abs, nan_ok)
|
|
70
71
|
if isinstance(expected, Decimal):
|
|
71
72
|
return ApproxDecimal(expected, to_decimal(rel), to_decimal(abs), nan_ok)
|
|
72
|
-
|
|
73
|
+
if isinstance(expected, (datetime.datetime, datetime.date, datetime.time, datetime.timedelta)):
|
|
74
|
+
return pytest.approx(expected, abs=datetime.timedelta(0))
|
|
75
|
+
return pytest.approx(expected, rel=rel, abs=abs, nan_ok=nan_ok)
|
|
73
76
|
|
|
74
77
|
|
|
75
78
|
class MockedCallable(Protocol):
|
|
@@ -15,9 +15,9 @@ plexus/common/utils/randutils.py,sha256=Mkba-g2ZnasuhdtBWoVDsP_VuwKMJ8p2UCf6-GF4
|
|
|
15
15
|
plexus/common/utils/retry.py,sha256=u5t9Nl8GS8f6bRE3QbJFIfTcSIKXRQo03Psn61hk9AA,8981
|
|
16
16
|
plexus/common/utils/span.py,sha256=RqgUuupN01xCjm4l5uxrr8BFFrUrytRVGihmENUawpk,6839
|
|
17
17
|
plexus/common/utils/strutils.py,sha256=PGOSYRgTnQcP0YXORzeTpiU9RweInxd5f6YcIHm6yiY,5096
|
|
18
|
-
plexus/common/utils/testutils.py,sha256=
|
|
18
|
+
plexus/common/utils/testutils.py,sha256=AIuGok17mRackiSXO0ZiWXEwlna6Bv2J8ZFN48nypDY,5638
|
|
19
19
|
plexus/common/utils/typeutils.py,sha256=RVkYkFRgDrx77OHFH7PavMV0AIB0S8ly40rs4g7JWE4,8220
|
|
20
|
-
plexus_python_common-1.1.
|
|
21
|
-
plexus_python_common-1.1.
|
|
22
|
-
plexus_python_common-1.1.
|
|
23
|
-
plexus_python_common-1.1.
|
|
20
|
+
plexus_python_common-1.1.88.dist-info/METADATA,sha256=Iw_PubUqjQH-Ug5FCdQCI8FBbZBcO7oJqvZHd-CImUQ,871
|
|
21
|
+
plexus_python_common-1.1.88.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
22
|
+
plexus_python_common-1.1.88.dist-info/top_level.txt,sha256=ug_g7CVwaMQuas5UzAXbHUrQvKGCn8ezc6ZNvvRlJOE,7
|
|
23
|
+
plexus_python_common-1.1.88.dist-info/RECORD,,
|
{plexus_python_common-1.1.86.dist-info → plexus_python_common-1.1.88.dist-info}/top_level.txt
RENAMED
|
File without changes
|