From 537e7f5764b2a86bc4bbd838fdcf27a807fc52bc Mon Sep 17 00:00:00 2001 From: Alinson S Xavier Date: Tue, 18 Aug 2020 10:56:57 -0500 Subject: [PATCH] ObjectiveValueComponent: Fix failing test --- src/python/miplearn/components/tests/test_objective.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/miplearn/components/tests/test_objective.py b/src/python/miplearn/components/tests/test_objective.py index 6a9bc5d..41a0e6c 100644 --- a/src/python/miplearn/components/tests/test_objective.py +++ b/src/python/miplearn/components/tests/test_objective.py @@ -16,8 +16,8 @@ def test_usage(): comp.fit(instances) assert instances[0].lower_bound == 1183.0 assert instances[0].upper_bound == 1183.0 - assert comp.predict(instances).tolist() == [[1183.0, 1183.0], - [1070.0, 1070.0]] + assert np.round(comp.predict(instances), 2).tolist() == [[1183.0, 1183.0], + [1070.0, 1070.0]] def test_obj_evaluate():