diff options
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | pint/testsuite/test_issues.py | 11 |
2 files changed, 11 insertions, 1 deletions
@@ -20,6 +20,7 @@ Pint Changelog - Support percent and ppm units. Support the `%` symbol. (Issue #1277) + 0.20.1 (2022-10-27) ------------------- diff --git a/pint/testsuite/test_issues.py b/pint/testsuite/test_issues.py index 1643bfc..0c1155c 100644 --- a/pint/testsuite/test_issues.py +++ b/pint/testsuite/test_issues.py @@ -1041,6 +1041,15 @@ def test_backcompat_speed_velocity(func_registry): assert get("[speed]") == UnitsContainer({"[length]": 1, "[time]": -1}) +def test_issue1527(): + ureg = UnitRegistry(non_int_type=decimal.Decimal) + x = ureg.parse_expression("2 microliter milligram/liter") + assert x.magnitude.as_tuple()[1] == (2,) + assert x.to_compact().as_tuple()[1] == (2,) + assert x.to_base_units().as_tuple()[1] == (2,) + assert x.to("ng").as_tuple()[1] == (2,) + + def test_issue1621(): ureg = UnitRegistry(non_int_type=decimal.Decimal) digits = ureg.Quantity("5.0 mV/m").to_base_units().magnitude.as_tuple()[1] @@ -1065,4 +1074,4 @@ def test_issue1631(): q = 2 * ureg.meter assert isinstance(q, ureg.Quantity) - assert isinstance(q, pint.Quantity)
\ No newline at end of file + assert isinstance(q, pint.Quantity) |