From fd2e45bc057ff7f4060cf20f9b30fd98b28bcbdb Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Fri, 8 Apr 2022 11:50:29 +0200 Subject: [PATCH] polish --- examples/tests/model_builder_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/tests/model_builder_test.py b/examples/tests/model_builder_test.py index f61d5eb702..28a6fe48e1 100644 --- a/examples/tests/model_builder_test.py +++ b/examples/tests/model_builder_test.py @@ -124,7 +124,8 @@ ENDATA self.assertEqual(model.name, 'SupportedMaximizationProblem') def test_import_from_mps_file(self): - mps_path = f'{os.path.dirname(__file__)}/../data/tests/maximization.mps' + path = os.path.dirname(__file__) + mps_path = f'{path}/../data/tests/maximization.mps' model = model_builder.ModelBuilder() self.assertTrue(model.import_from_mps_file(mps_path)) self.assertEqual(model.name, 'SupportedMaximizationProblem') @@ -147,7 +148,8 @@ ENDATA self.assertEqual('x', model.var_from_index(0).name) def test_import_from_lp_file(self): - lp_path = f'{os.path.dirname(__file__)}/../data/tests/small_model.lp' + path = os.path.dirname(__file__) + lp_path = f'{path}/../data/tests/small_model.lp' model = model_builder.ModelBuilder() self.assertTrue(model.import_from_lp_file(lp_path)) self.assertEqual(6, model.num_variables)