polish
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user