Beispiel #1
0
 def test_out(self):
     ''' tests pour_out without supplying into_jug'''
     j = Jug(123)
     j.pour_in(100, 56)
     j.pour_out(6)
     self.assertAlmostEqual(j.water_volume(), 94)
Beispiel #2
0
 def test_over(self):
     ''' tests pour_in overflow'''
     j = Jug(123)
     j.pour_in(249, 56)
     self.assertAlmostEqual(j.water_volume(), 123)
Beispiel #3
0
 def test_temp(self):
     ''' tests pour_in temperature()'''
     j = Jug(123)
     j.pour_in(32, 56)
     self.assertAlmostEqual(j.temperature(), 56)
Beispiel #4
0
 def test_wv(self):
     ''' tests pour_in water_volume()'''
     j = Jug(123)
     j.pour_in(32, 56)
     self.assertAlmostEqual(j.water_volume(), 32)
Beispiel #5
0
 def test_cap(self):
     ''' tests capacity set by __init__ '''
     self.assertAlmostEqual(Jug(123).capacity(), 123)