Beispiel #1
0
 def test_proportion_of_formula_not_matching_capitalization(self):
     fuel = Composition(
         ("S", 0.11),
         ("CH4", 0.10)
     )
     self.assertEqual(0.10, fuel.proportion_of_formula("Ch4"))
Beispiel #2
0
 def test_proportion_of_formula_returns_0_when_nothing_found(self):
     fuel = Composition(
         ("S", 0.11),
         ("CH4", 0.10)
     )
     self.assertEqual(0, fuel.proportion_of_formula("not_existing_formula"))
Beispiel #3
0
 def test_proportion_of_formula(self):
     fuel = Composition(
         ("S", 0.11),
         ("CH4", 0.10)
     )
     self.assertEqual(0.10, fuel.proportion_of_formula("CH4"))