diff options
author | Jared Crapo <jared@kotfu.net> | 2017-08-23 23:15:47 -0600 |
---|---|---|
committer | Jared Crapo <jared@kotfu.net> | 2017-08-23 23:15:47 -0600 |
commit | 411ef56f5007f4b19039238e9f5d8313a2316ca9 (patch) | |
tree | a440eaa09cb120ab3667ba3cbd84cf1472725280 /examples/environment.py | |
parent | 503ea9838d07a8737768e0694fb577d89d0280c2 (diff) | |
download | cmd2-git-411ef56f5007f4b19039238e9f5d8313a2316ca9.tar.gz |
Use context managers and decorators for mocks
Mocks of six.moves.input() and sys.stdin.isatty() now use either a context manager or a decorator. These wrappers make sure to put the functions back to their unmocked values when the test is done.
This change appears to have solved the undeterministic test results.
Diffstat (limited to 'examples/environment.py')
0 files changed, 0 insertions, 0 deletions