diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-09-17 20:09:40 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-09-17 20:09:40 -0400 |
commit | ed3f9094c013cce618571a8718c76f5e0dbaba3d (patch) | |
tree | bfb7bbce00bad232a643c550f95b01831f7c0dc0 /tests/test_utils.py | |
parent | cf9516e5d25df5e4e330f75ab0f800ba8b4217c8 (diff) | |
parent | 92b8a38d66d255027a0440c45582d319f2694aab (diff) | |
download | cmd2-git-ed3f9094c013cce618571a8718c76f5e0dbaba3d.tar.gz |
Merge branch 'master' into silence
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r-- | tests/test_utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py index 27bf4743..2c94466c 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -154,6 +154,13 @@ def test_stdsim_read(stdout_sim): assert stdout_sim.read() == my_str assert stdout_sim.getvalue() == '' + stdout_sim.write(my_str) + + assert stdout_sim.getvalue() == my_str + assert stdout_sim.read(2) == my_str[:2] + assert stdout_sim.getvalue() == my_str[2:] + + def test_stdsim_read_bytes(stdout_sim): b_str = b'Hello World' stdout_sim.buffer.write(b_str) |