Created
April 12, 2013 20:33
-
-
Save hub-cap/5374926 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Now make sure the time is ahead by more than a few millis,¬ | |
# This a good indicator that it has elapsed time more than a¬ | |
# few clock cycles¬ | |
fuzzy_delta = event.created + datetime.timedelta(milliseconds=200)¬ | |
self.assertTrue(fuzzy_delta < event.finish_time)¬ | |
# Now to make doubly sure, lets add a bunch of extra time to it to!¬ | |
# make sure its before the tiem¬ | |
fuzzy_delta = event.created + datetime.timedelta(milliseconds=400)¬ | |
self.assertTrue(fuzzy_delta > event.finish_time)¬ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment