Exemplo n.º 1
0
    def test_pfba_benchmark(self, large_model, benchmark, solver):
        convert_to_irreversible(large_model)

        def do_pfba(solver):
            pfba(large_model, solver=solver, already_irreversible=True)

        benchmark(do_pfba, solver)
Exemplo n.º 2
0
 def setUp(self):
     self.model = Model("test model")
     A = Metabolite("A")
     r = Reaction("r")
     r.add_metabolites({A: -1})
     r.lower_bound = -1000
     r.upper_bound = 1000
     self.model.add_reaction(r)
     convert_to_irreversible(self.model)
     self.model.remove_reactions(["r"])
Exemplo n.º 3
0
 def test_remove_breaks(self):
     model = Model("test model")
     A = Metabolite("A")
     r = Reaction("r")
     r.add_metabolites({A: -1})
     r.lower_bound = -1000
     r.upper_bound = 1000
     model.add_reaction(r)
     convert_to_irreversible(model)
     model.remove_reactions(["r"])
     with pytest.raises(KeyError):
         revert_to_reversible(model)
Exemplo n.º 4
0
 def test_remove_breaks(self):
     model = Model("test model")
     A = Metabolite("A")
     r = Reaction("r")
     r.add_metabolites({A: -1})
     r.lower_bound = -1000
     r.upper_bound = 1000
     model.add_reaction(r)
     convert_to_irreversible(model)
     model.remove_reactions(["r"])
     with pytest.raises(KeyError):
         revert_to_reversible(model)