Skip to content

Commit 13bfc41

Browse files
committed
fix(energy): Fix Btu/Btu --> kWh/kWh factor error
1 parent 90b6535 commit 13bfc41

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ph_units/unit_types/energy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,12 @@ class KiloWattHourPerKiloWattHour(Base_UnitType):
320320

321321
__symbol__ = "KWH/KWH"
322322
__aliases__ = ["KWH/KWH"]
323-
__factors__ = {"KWH/KWH": "{}*1", "BTU/BTU": "{}*3412.14"}
323+
__factors__ = {"KWH/KWH": "{}*1", "BTU/BTU": "{}*1"}
324324

325325

326326
class BtuPerBtu(Base_UnitType):
327327
"""BTU/BTU"""
328328

329329
__symbol__ = "BTU/BTU"
330330
__aliases__ = ["BTU/BTU"]
331-
__factors__ = {"KWH/KWH": "{}*0.000293071", "BTU/BTU": "{}*1"}
331+
__factors__ = {"KWH/KWH": "{}*1", "BTU/BTU": "{}*1"}

tests/test_energy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ def test_Btu_per_ft2_per_degree_Farenheit():
150150

151151
def test_kWh_per_kWh():
152152
assert convert(1, "KWH/KWH", "KWH/KWH") == 1
153-
assert convert(1, "KWH/KWH", "BTU/BTU") == pytest.approx(3412.14)
153+
assert convert(1, "KWH/KWH", "BTU/BTU") == 1
154154

155155

156156
def test_Btu_per_Btu():
157157
assert convert(1, "BTU/BTU", "BTU/BTU") == 1
158-
assert convert(1, "BTU/BTU", "KWH/KWH") == pytest.approx(0.000293071)
158+
assert convert(1, "BTU/BTU", "KWH/KWH") == 1
159159

160160

0 commit comments

Comments
 (0)