mirror of
https://github.com/clearml/wexpect-venv
synced 2025-01-30 18:36:57 +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('>')
|
||||
|
||||
# Prints the cmd's start message
|
||||
print(child.before)
|
||||
print(child.before, end='')
|
||||
print(child.after, end='')
|
||||
|
||||
# run list directory command
|
||||
child.sendline('ls')
|
||||
@ -21,7 +22,8 @@ child.sendline('ls')
|
||||
child.expect('>')
|
||||
|
||||
# Prints content of the directory
|
||||
print(child.before)
|
||||
print(child.before, end='')
|
||||
print(child.after, end='')
|
||||
|
||||
# Exit from cmd
|
||||
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):
|
||||
p = wexpect.spawn('cat', timeout=5)
|
||||
p.sendline ('Hello')
|
||||
p.expect ('Hello')
|
||||
p.expect('Hello')
|
||||
p.expect('lo')
|
||||
assert len(p.buffer)
|
||||
p.buffer = 'Testing'
|
||||
p.sendeof ()
|
||||
|
Loading…
Reference in New Issue
Block a user