1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add stones to mass units (#83933)

This commit is contained in:
epenet
2022-12-13 17:35:14 +01:00
committed by GitHub
parent fed308b59d
commit 4a848e8222
3 changed files with 10 additions and 1 deletions

View File

@@ -345,6 +345,11 @@ def test_energy_convert(
(16, UnitOfMass.OUNCES, 453592.37, UnitOfMass.MILLIGRAMS),
(16, UnitOfMass.OUNCES, 453592370, UnitOfMass.MICROGRAMS),
(16, UnitOfMass.OUNCES, 1, UnitOfMass.POUNDS),
(1, UnitOfMass.STONES, pytest.approx(6.350293), UnitOfMass.KILOGRAMS),
(1, UnitOfMass.STONES, pytest.approx(6350.293), UnitOfMass.GRAMS),
(1, UnitOfMass.STONES, pytest.approx(6350293), UnitOfMass.MILLIGRAMS),
(1, UnitOfMass.STONES, pytest.approx(14), UnitOfMass.POUNDS),
(1, UnitOfMass.STONES, pytest.approx(224), UnitOfMass.OUNCES),
],
)
def test_mass_convert(