Beispiel #1
0
 def test_add_get_reactant(self):
     reaction = Reaction()
     reaction.add_limiting_reactant(self._limiting)
     reaction.add_reactant(self._reactant2, 2)
     reaction.add_reactant(self._reactant3, 3)
     self.assertEqual(reaction.get_non_limiting_reactants()[0].n(), 0.002)
     self.assertEqual(reaction.get_non_limiting_reactants()[1].n(), 0.003)
Beispiel #2
0
 def test_get_yield(self):
     reaction = Reaction()
     reaction.add_limiting_reactant(self._limiting)
     reaction.add_product(self._product, 0.3)
     self.assertEqual(reaction.get_yield(), 75)
Beispiel #3
0
 def test_add_get_limiting_reactant(self):
     reaction = Reaction()
     reaction.add_limiting_reactant(self._limiting)
     self.assertEqual(reaction.get_limiting_reactant().n(), 0.001)