[FIX] add psutil to requirements; [FIX] test_buffer_interface: the assertion should have been delayed

This commit is contained in:
Benedek Racz 2020-01-22 12:23:01 +01:00
parent 54d961489a
commit 9998875dd9
3 changed files with 8 additions and 4 deletions

View File

@ -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')

View File

@ -1 +1,2 @@
pywin32>=220
pywin32>=220
psutil>=5.0.0

View File

@ -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 ()