summaryrefslogtreecommitdiff
path: root/tests/echo_w_prompt.py
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-09-26 13:28:05 -0700
committerThomas Kluyver <takowl@gmail.com>2013-09-26 13:28:27 -0700
commitae3927e16e6c6227766ae76afeb129ac6f603c07 (patch)
tree506021d4c12430dc8b53fb3c6dc96d9bd8558ae3 /tests/echo_w_prompt.py
parent41ef7a7b0b5d049fc88cbde47da76398f4c172c7 (diff)
downloadpexpect-git-ae3927e16e6c6227766ae76afeb129ac6f603c07.tar.gz
Make tests for interact more robust on slow machines
Diffstat (limited to 'tests/echo_w_prompt.py')
-rw-r--r--tests/echo_w_prompt.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/echo_w_prompt.py b/tests/echo_w_prompt.py
new file mode 100644
index 0000000..0706688
--- /dev/null
+++ b/tests/echo_w_prompt.py
@@ -0,0 +1,11 @@
+# -*- coding: utf-8 -*-
+from __future__ import print_function
+
+try:
+ raw_input
+except NameError:
+ raw_input = input
+
+while True:
+ a = raw_input('<in >')
+ print('<out>', a, sep='') \ No newline at end of file