예제 #1
0
 def test_time_set_from_outside(self):
     """Test setting the current time from outside."""
     travelcalculator = TravelCalculator(25, 50)
     travelcalculator.time_set_from_outside = 1000
     self.assertEqual(travelcalculator.current_time(), 1000)
예제 #2
0
 def test_time_set_from_outside(self):
     """Test setting the current time from outside."""
     travelcalculator = TravelCalculator(25, 50)
     travelcalculator.time_set_from_outside = 1000
     self.assertEqual(travelcalculator.current_time(), 1000)
예제 #3
0
 def test_time_default(self):
     """Test default time settings (no time set from outside)."""
     travelcalculator = TravelCalculator(25, 50)
     self.assertLess(
         abs(time.time()-travelcalculator.current_time()),
         0.001)
예제 #4
0
 def test_time_default(self):
     """Test default time settings (no time set from outside)."""
     travelcalculator = TravelCalculator(25, 50)
     self.assertLess(abs(time.time() - travelcalculator.current_time()),
                     0.001)