Skip to content

Commit

Permalink
- remove deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Jan 11, 2024
1 parent c0732cf commit e5d9349
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions tests/test_model_manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def test_add_function(self):
basico.add_reaction('R1', 'S1 + S2 -> S3; I', function='MassAction_inhibited')
r = basico.get_reactions('R1')
self.assertTrue(r is not None)
self.assertEqual(r['function'][0], 'MassAction_inhibited')
self.assertEqual(r['function'].iloc[0], 'MassAction_inhibited')
basico.remove_datamodel(m)

def test_parameter_mapping(self):
Expand All @@ -288,21 +288,21 @@ def test_parameter_mapping(self):
self.assertTrue(len(params) == 1)
params2 = basico.get_reaction_parameters(r)
self.assertTrue(len(params2) == 1)
self.assertTrue(params2.type[0] == 'local')
self.assertTrue(params2.type.iloc[0] == 'local')
basico.set_reaction(r, mapping={'k1': 'k_global'})
params2 = basico.get_reaction_parameters(r)
self.assertTrue(len(params2) == 1)
self.assertTrue(params2.type[0] == 'global')
self.assertTrue(params2.type.iloc[0] == 'global')

basico.set_reaction(r, mapping={'k1': 1.0})
params2 = basico.get_reaction_parameters(r)
self.assertTrue(len(params2) == 1)
self.assertTrue(params2.type[0] == 'local')
self.assertTrue(params2.type.iloc[0] == 'local')

basico.set_reaction_parameters('(R).k1', mapped_to='k_global')
params2 = basico.get_reaction_parameters(r)
self.assertTrue(len(params2) == 1)
self.assertTrue(params2.type[0] == 'global')
self.assertTrue(params2.type.iloc[0] == 'global')


if __name__ == '__main__':
Expand Down
4 changes: 2 additions & 2 deletions tests/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def test_creation_and_run(self):
basico.save_model_and_data(temp_file)

sol = basico.run_parameter_estimation(method=basico.PE.HOOKE_JEEVES, update_model=True)
self.assertAlmostEqual(sol['sol'][0], 2.27, places=2)
self.assertAlmostEqual(sol['sol'][1], 1.43, places=2)
self.assertAlmostEqual(sol['sol'].iloc[0], 2.27, places=2)
self.assertAlmostEqual(sol['sol'].iloc[1], 1.43, places=2)

temp_file = os.path.join(temp_dir, 'test.cps')
basico.save_model_and_data(temp_file)
Expand Down

0 comments on commit e5d9349

Please sign in to comment.