Skip to content

Commit

Permalink
add test for Fix #1950
Browse files Browse the repository at this point in the history
  • Loading branch information
biagiodistefano committed Mar 9, 2024
1 parent 5009770 commit d68d6e2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pint/testsuite/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,3 +1200,12 @@ def test_issues_1841_xfail():

# this prints "2*pi hour * radian", not "2*pi radian * hour" unless sort_dims is True
# print(q)


def test_issue_1950():
from decimal import Decimal

ureg = UnitRegistry()
qt_celsius = ureg.Quantity(Decimal("0.00"), "°C")
qt_kelvin = ureg.Quantity(Decimal("273.15"), "°K")
assert qt_celsius.to_base_units() == qt_kelvin.to_base_units()

0 comments on commit d68d6e2

Please sign in to comment.