Exemple #1
0
 def test_average_miles_per_hour_returns_none_when_no_finish(self):
     # Arrange
     start = datetime.now(pytz.utc)
     # Act
     avg_mph = compute.average_miles_per_hour(start, None, 10)
     # Assert
     self.assertEqual(None, avg_mph)
Exemple #2
0
 def test_average_miles_per_hour_returns_expected_6_8182mph_50y_in_15s(self):
     # Arrange
     start = datetime.now(pytz.utc)
     finish = start + timedelta(seconds=15)
     # Act
     avg_mph = compute.average_miles_per_hour(start, finish, 50)
     # Assert
     self.assertEqual(6.8182, avg_mph)