Skip to content

Commit

Permalink
Small fix in test_pfba
Browse files Browse the repository at this point in the history
  • Loading branch information
phantomas1234 committed Jan 21, 2015
1 parent baaccb0 commit e4bfc7c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/test_flux_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,14 @@ def setUp(self):

def test_fba(self):
solution = fba(self.model)
print self.model.objective
print self.model.solver
self.assertAlmostEqual(solution.f, 0.873921, delta=0.000001)

def test_pfba(self):
fba_solution = fba(self.model)
fba_flux_sum = sum((abs(val) for val in fba_solution.x_dict.values()))
pfba_solution = pfba(self.model)
pfba_flux_sum = sum((abs(val) for val in pfba_solution.x_dict.values()))
print pfba_flux_sum
self.assertTrue(pfba_flux_sum <= fba_flux_sum) # looks like GLPK finds a parsimonious solution without the flux minimization objective
self.assertTrue((pfba_flux_sum - fba_flux_sum) < 1e-6) # looks like GLPK finds a parsimonious solution without the flux minimization objective

def test_pfba_iJO(self):
fba_solution = fba(iJO_MODEL)
Expand Down

0 comments on commit e4bfc7c

Please sign in to comment.