summaryrefslogtreecommitdiffstats
path: root/lldb/third_party/Python/module/pexpect-4.6/tests/test_delay.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/third_party/Python/module/pexpect-4.6/tests/test_delay.py')
-rw-r--r--lldb/third_party/Python/module/pexpect-4.6/tests/test_delay.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/lldb/third_party/Python/module/pexpect-4.6/tests/test_delay.py b/lldb/third_party/Python/module/pexpect-4.6/tests/test_delay.py
new file mode 100644
index 00000000000..1e4dba687df
--- /dev/null
+++ b/lldb/third_party/Python/module/pexpect-4.6/tests/test_delay.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+
+from . import PexpectTestCase
+import pexpect
+
+
+class TestCaseDelay(PexpectTestCase.PexpectTestCase):
+ """
+ Tests for various delay attributes.
+ """
+ def test_delaybeforesend(self):
+ """
+ Test various values for delaybeforesend.
+ """
+ p = pexpect.spawn("cat")
+
+ p.delaybeforesend = 1
+ p.sendline("line 1")
+ p.expect("line 1")
+
+ p.delaybeforesend = 0.0
+ p.sendline("line 2")
+ p.expect("line 2")
+
+ p.delaybeforesend = None
+ p.sendline("line 3")
+ p.expect("line 3")
+
+ def test_delayafterread(self):
+ """
+ Test various values for delayafterread.
+ """
+ p = pexpect.spawn("cat")
+
+ p.delayafterread = 1
+ p.sendline("line 1")
+ p.expect("line 1")
+
+ p.delayafterread = 0.0
+ p.sendline("line 2")
+ p.expect("line 2")
+
+ p.delayafterread = None
+ p.sendline("line 3")
+ p.expect("line 3")
OpenPOWER on IntegriCloud