diff options
Diffstat (limited to 'pint/testing.py')
-rw-r--r-- | pint/testing.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pint/testing.py b/pint/testing.py index 8e4f15f..d99df0b 100644 --- a/pint/testing.py +++ b/pint/testing.py @@ -34,7 +34,7 @@ def _get_comparable_magnitudes(first, second, msg): return m1, m2 -def assert_equal(first, second, msg=None): +def assert_equal(first, second, msg: str | None = None) -> None: if msg is None: msg = f"Comparing {first!r} and {second!r}. " @@ -57,7 +57,9 @@ def assert_equal(first, second, msg=None): assert m1 == m2, msg -def assert_allclose(first, second, rtol=1e-07, atol=0, msg=None): +def assert_allclose( + first, second, rtol: float = 1e-07, atol: float = 0, msg: str | None = None +) -> None: if msg is None: try: msg = f"Comparing {first!r} and {second!r}. " |