def test_to_order_second(self): """ Test the conversion of second-order rate coefficient units to an integer reaction order. """ self.assertEqual(2, get_reaction_order_from_rate_coefficient_units('m^3/(mol*s)')) self.assertEqual(2, get_reaction_order_from_rate_coefficient_units('cm^3/(mol*s)')) self.assertEqual(2, get_reaction_order_from_rate_coefficient_units('m^3/(molecule*s)')) self.assertEqual(2, get_reaction_order_from_rate_coefficient_units('cm^3/(molecule*s)'))
def test_to_order_third(self): """ Test the conversion of third-order rate coefficient units to an integer reaction order. """ self.assertEqual(3, get_reaction_order_from_rate_coefficient_units('m^6/(mol^2*s)')) self.assertEqual(3, get_reaction_order_from_rate_coefficient_units('cm^6/(mol^2*s)')) self.assertEqual(3, get_reaction_order_from_rate_coefficient_units('m^6/(molecule^2*s)')) self.assertEqual(3, get_reaction_order_from_rate_coefficient_units('cm^6/(molecule^2*s)'))
def test_to_order_zeroth(self): """ Test the conversion of zeroth-order rate coefficient units to an integer reaction order. """ self.assertEqual(0, get_reaction_order_from_rate_coefficient_units('mol/(m^3*s)')) self.assertEqual(0, get_reaction_order_from_rate_coefficient_units('mol/(cm^3*s)')) self.assertEqual(0, get_reaction_order_from_rate_coefficient_units('molecule/(m^3*s)')) self.assertEqual(0, get_reaction_order_from_rate_coefficient_units('molecule/(cm^3*s)'))
def test_to_order_first(self): """ Test the conversion of first-order rate coefficient units to an integer reaction order. """ self.assertEqual( 1, get_reaction_order_from_rate_coefficient_units('s^-1'))