Deprecate conversion utilities (#78957)

* Deprecate utilities

* Deprecate distance and speed

* Add tests

* Adjust pylint

* Simplify temperature deprecation
This commit is contained in:
epenet 2022-09-28 19:39:44 +02:00 committed by GitHub
parent 3b05bb5b3a
commit 9c3b40dad1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 79 additions and 25 deletions

View file

@ -17,6 +17,12 @@ INVALID_SYMBOL = "bob"
VALID_SYMBOL = VOLUME_LITERS
def test_raise_deprecation_warning(caplog: pytest.LogCaptureFixture) -> None:
"""Ensure that a warning is raised on use of convert."""
assert volume_util.convert(2, VOLUME_LITERS, VOLUME_LITERS) == 2
assert "use unit_conversion.VolumeConverter instead" in caplog.text
@pytest.mark.parametrize(
"function_name, value, expected",
[