Exemple #1
0
 def test_wrong_argument_1(self):
     with self.assertRaises(ValueError):
         havana = City("Havana", 25, 70)
         havana.change_moisture("$")
Exemple #2
0
 def test_wrong_argument_3(self):
     with self.assertRaises(TypeError):
         havana = City("Havana", 25, 70)
         havana.change_moisture([1, 2, "sda"])
Exemple #3
0
 def test_moisture_change(self):
     havana = City("Havana", 25, 70)
     helsinki = City("Helsinki", -10, 50)
     havana.change_moisture(100)
     self.assertEqual(havana.get_moisture() - helsinki.get_moisture(), 50)