-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added SLEEP tests and support for python expressions in the SLEEP sta…
…tement
- Loading branch information
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## small wait test | ||
RUN import time | ||
RUN start = time.time() | ||
SLEEP .1 | ||
RUN end = time.time() | ||
RUN delta = end - start | ||
RUN epsilon = abs(delta - .1) | ||
PRINTP epsilon | ||
FAIL epsilon > .001 | ||
## large wait test | ||
RUN start = time.time() | ||
SLEEP 10 | ||
RUN end = time.time() | ||
RUN delta = end - start | ||
RUN epsilon = abs(delta - 10) | ||
PRINTP epsilon | ||
FAIL epsilon > .02 | ||
## very large wait test | ||
RUN start = time.time() | ||
SLEEP 100 | ||
RUN end = time.time() | ||
RUN delta = end - start | ||
RUN epsilon = abs(delta - 100) | ||
PRINTP epsilon | ||
ASSERT epsilon < .15 |
fc84b5c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#48