Skip to content

Commit 6167d3f

Browse files
committed
🐛 Round a value for test. It was occasionally failing
1 parent ad5d5db commit 6167d3f

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

tests/test_optimize.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -257,17 +257,20 @@ def test_model_evaluator(self):
257257
pd.testing.assert_series_equal(res, pd.Series({"res": -10.721167816657914}))
258258

259259
assert (
260-
modev.scipy_obj_function(
261-
np.array([-3.14 / 2, 0, 3.14]),
262-
("res", "mean"),
263-
{
264-
"start": "2009-01-01 00:00:00",
265-
"end": "2009-01-01 00:00:00",
266-
"timestep": "h",
267-
},
268-
None,
260+
round(
261+
modev.scipy_obj_function(
262+
np.array([-3.14 / 2, 0, 3.14]),
263+
("res", "mean"),
264+
{
265+
"start": "2009-01-01 00:00:00",
266+
"end": "2009-01-01 00:00:00",
267+
"timestep": "h",
268+
},
269+
None,
270+
),
271+
3,
269272
)
270-
== -10.721167816657914
273+
== -10.721
271274
)
272275

273276
# Static model test

0 commit comments

Comments
 (0)