summaryrefslogtreecommitdiff
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-09-17 23:44:07 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-09-17 23:44:07 -0400
commit0f11ffa3b992e3f777b96dfe46d4274bfca0dcc8 (patch)
tree8167147ff11f5c9c7aaf1008555248c9c1cd7850 /tests/test_utils.py
parentc50def1eff00f7f44adcb911d215ace65d16aa8a (diff)
parentd348f09cf848a566a43b30e04aa6d3adbc4de8bc (diff)
downloadcmd2-git-0f11ffa3b992e3f777b96dfe46d4274bfca0dcc8.tar.gz
Merge branch 'master' into 2.0
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py7
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)