Esempio n. 1
0
 def test_sudensimple_parse_with_decimal(self):
     r = misc.parse_sudensimple_reaction('1 H2 + 0.5 O2 <=> 1 H2O')
     self.assertEqual(r, Reaction(Reaction.Bidir, [(Compound('H2'), 1), (Compound('O2'), Decimal('0.5'))],
                                   [(Compound('H2O'), 1)]))
Esempio n. 2
0
 def test_sudensimple_parse_with_implicit_count(self):
     r = misc.parse_sudensimple_reaction('H2O + PPi <=> 2 Phosphate + 2 proton')
     self.assertEqual(r, Reaction(Reaction.Bidir, [(Compound('H2O'), 1), (Compound('PPi'), 1)],
                                   [(Compound('Phosphate'), 2), (Compound('proton'), 2)]))