コード例 #1
0
ファイル: test_balancecheck.py プロジェクト: keitht547/psamm
 def test_reaction_formula_none_return(self):
     reaction = parse_reaction('A[e] + (6) B[c] <=> (6) C[e] + (6) D[c]')
     compound_formula = {
         'A': Formula.parse('C6H12O6'),
         'B': Formula.parse('O2'),
         'C': Formula.parse('CO2'),
     }
     result = balancecheck.reaction_formula(reaction, compound_formula)
     self.assertIsNone(result)
コード例 #2
0
 def test_reaction_formula_none_return(self):
     reaction = parse_reaction('A[e] + (6) B[c] <=> (6) C[e] + (6) D[c]')
     compound_formula = {
         'A': Formula.parse('C6H12O6'),
         'B': Formula.parse('O2'),
         'C': Formula.parse('CO2'),
     }
     result = balancecheck.reaction_formula(reaction, compound_formula)
     self.assertIsNone(result)
コード例 #3
0
ファイル: test_balancecheck.py プロジェクト: keitht547/psamm
 def test_reaction_formula_normal_return(self):
     reaction = parse_reaction('A[e] + (6) B[c] <=> (6) C[e] + (6) D[c]')
     compound_formula = {
         'A': Formula.parse('C6H12O6'),
         'B': Formula.parse('O2'),
         'C': Formula.parse('CO2'),
         'D': Formula.parse('H2O')
     }
     left_form, right_form = balancecheck.reaction_formula(
         reaction, compound_formula)
     self.assertEqual(left_form, Formula.parse('C6H12O18'))
     self.assertEqual(right_form, Formula.parse('C6H12O18'))
コード例 #4
0
 def test_reaction_formula_normal_return(self):
     reaction = parse_reaction('A[e] + (6) B[c] <=> (6) C[e] + (6) D[c]')
     compound_formula = {
         'A': Formula.parse('C6H12O6'),
         'B': Formula.parse('O2'),
         'C': Formula.parse('CO2'),
         'D': Formula.parse('H2O')
     }
     left_form, right_form = balancecheck.reaction_formula(
         reaction, compound_formula)
     self.assertEqual(left_form, Formula.parse('C6H12O18'))
     self.assertEqual(right_form, Formula.parse('C6H12O18'))