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)
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"])
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)
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)