mirror of
https://github.com/clearml/wexpect-venv
synced 2025-01-31 02:46:59 +00:00
[FIX] add psutil to requirements; [FIX] test_buffer_interface: the assertion should have been delayed
This commit is contained in:
parent
54d961489a
commit
9998875dd9
@ -12,7 +12,8 @@ child = wexpect.spawn('cmd.exe')
|
|||||||
child.expect('>')
|
child.expect('>')
|
||||||
|
|
||||||
# Prints the cmd's start message
|
# Prints the cmd's start message
|
||||||
print(child.before)
|
print(child.before, end='')
|
||||||
|
print(child.after, end='')
|
||||||
|
|
||||||
# run list directory command
|
# run list directory command
|
||||||
child.sendline('ls')
|
child.sendline('ls')
|
||||||
@ -21,7 +22,8 @@ child.sendline('ls')
|
|||||||
child.expect('>')
|
child.expect('>')
|
||||||
|
|
||||||
# Prints content of the directory
|
# Prints content of the directory
|
||||||
print(child.before)
|
print(child.before, end='')
|
||||||
|
print(child.after, end='')
|
||||||
|
|
||||||
# Exit from cmd
|
# Exit from cmd
|
||||||
child.sendline('exit')
|
child.sendline('exit')
|
||||||
|
@ -1 +1,2 @@
|
|||||||
pywin32>=220
|
pywin32>=220
|
||||||
|
psutil>=5.0.0
|
||||||
|
@ -267,7 +267,8 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase):
|
|||||||
def test_buffer_interface(self):
|
def test_buffer_interface(self):
|
||||||
p = wexpect.spawn('cat', timeout=5)
|
p = wexpect.spawn('cat', timeout=5)
|
||||||
p.sendline ('Hello')
|
p.sendline ('Hello')
|
||||||
p.expect ('Hello')
|
p.expect('Hello')
|
||||||
|
p.expect('lo')
|
||||||
assert len(p.buffer)
|
assert len(p.buffer)
|
||||||
p.buffer = 'Testing'
|
p.buffer = 'Testing'
|
||||||
p.sendeof ()
|
p.sendeof ()
|
||||||
|
Loading…
Reference in New Issue
Block a user