Skip to content

Commit 755304b

Browse files
authored
Fix _q to _m time conversion. (#55)
### What problem do you want to solve? The _q to _m automatic time conversion (and the corresponding test) was incorrect. This PR fixes that.
1 parent 305f4f8 commit 755304b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ttsim/interface_dag_elements/automatically_added_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def q_to_m(value: float) -> float:
155155
-------
156156
Monthly value.
157157
"""
158-
return value * _M_PER_Y / _Q_PER_Y
158+
return value * _Q_PER_Y / _M_PER_Y
159159

160160

161161
def q_to_w(value: float) -> float:

tests/interface_dag_elements/test_automatically_added_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_q_to_y(quarterly_value: float, yearly_value: float) -> None:
103103
("quarterly_value", "monthly_value"),
104104
[
105105
(0, 0),
106-
(1, 3),
106+
(3, 1),
107107
],
108108
)
109109
def test_q_to_m(quarterly_value: float, monthly_value: float) -> None:

0 commit comments

Comments
 (0)