Skip to content

Commit

Permalink
Faking proc.poll.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolobio committed May 22, 2014
1 parent aa74dca commit badee0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sshm/test/test_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ def test_stdin(self):
orig = lib.popen
lib.popen = sub.popen

# Fake the process's poll to be None once
c = [1, None]
def none_once():
return c.pop()
proc.poll = none_once

from io import BytesIO
stdin_contents = b'foobar'
stdin = BytesIO(stdin_contents)
Expand Down

0 comments on commit badee0b

Please sign in to comment.