Created
April 21, 2017 09:49
-
-
Save stestagg/d58697ba6597c792499d308e03ab4835 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
TIMEOUT = 100 |
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
from constants import TIMEOUT | |
import time | |
def wait(): | |
print('sleeping for {} seconds'.format(TIMEOUT)) | |
time.sleep(TIMEOUT) |
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
from constants import TIMEOUT | |
import time | |
def wait(): | |
print('sleeping for {} seconds'.format(TIMEOUT)) | |
time.sleep(constants.TIMEOUT) |
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
import mock | |
import impl | |
def run_test(): | |
with mock.patch('constants.TIMEOUT', 0.1): | |
impl.wait() | |
def run_test(): | |
with mock.patch('impl.TIMEOUT', 0.1): | |
impl.wait() | |
if __name__ == '__main__': | |
run_test() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment