summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2008-03-22 19:07:09 -0700
committerRobey Pointer <robey@lag.net>2008-03-22 19:07:09 -0700
commit7854d600a74179d5f92a2f382f01da10da99d4d5 (patch)
tree0888b4896fd57ec0a1c136530fe0b23864d8645b /tests
parentc0fc67acc9d5365c706057223880ba3f0c775d95 (diff)
[project @ robey@lag.net-20080323020709-ub8ya3xkh1ebywfa]
add exit_status_ready for justin cook.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_transport.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py
index 894c69d3..f46fda7f 100644
--- a/tests/test_transport.py
+++ b/tests/test_transport.py
@@ -283,6 +283,7 @@ class TransportTest (unittest.TestCase):
schan = self.ts.accept(1.0)
chan.exec_command('yes')
schan.send('Hello there.\n')
+ self.assert_(not chan.exit_status_ready())
# trigger an EOF
schan.shutdown_read()
schan.shutdown_write()
@@ -292,6 +293,12 @@ class TransportTest (unittest.TestCase):
f = chan.makefile()
self.assertEquals('Hello there.\n', f.readline())
self.assertEquals('', f.readline())
+ count = 0
+ while not chan.exit_status_ready():
+ time.sleep(0.1)
+ count += 1
+ if count > 50:
+ raise Exception("timeout")
self.assertEquals(23, chan.recv_exit_status())
chan.close()