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)
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)
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)
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)