summaryrefslogtreecommitdiff
path: root/tests/interact.py
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2015-09-18 12:38:58 -0700
committerJeff Quast <contact@jeffquast.com>2015-09-18 12:38:58 -0700
commitfaff3e605b2e1d6d30d3f9ded95473ccfbb8daf0 (patch)
tree9d0347210f6b2fc31b1b330b2ba27dd24eb7c90a /tests/interact.py
parentcde8e15893edd87c61acf0515fd217554d21ce51 (diff)
downloadpexpect-git-faff3e605b2e1d6d30d3f9ded95473ccfbb8daf0.tar.gz
Allow {p}.interact(escape_character=None)
For those who wish to disable the ability to escape using escape_character until normal process termination, they may now set the value of escape_character to None. Some of the related docstring on escape_character was made more brief and clear about its related value behavior. This closes #131 #132 #167
Diffstat (limited to 'tests/interact.py')
-rwxr-xr-xtests/interact.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/interact.py b/tests/interact.py
index 9f8e672..2c1c1b7 100755
--- a/tests/interact.py
+++ b/tests/interact.py
@@ -33,7 +33,10 @@ import sys
def main():
p = pexpect.spawn(sys.executable + ' echo_w_prompt.py',
env=no_coverage_env())
- p.interact()
+ escape_character = chr(29) # default matches api
+ if len(sys.argv) > 1 and sys.argv[1] == '--no-escape':
+ escape_character = None
+ p.interact(escape_character=escape_character)
print("Escaped interact")
if __name__ == '__main__':