diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2016-06-09 21:02:32 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2016-06-09 21:02:32 -0700 |
commit | da125c13a09bac42f5565ac24e6ed454629d9aa8 (patch) | |
tree | 8752e0409d3b7ed417c0a320f366308af4758309 /tests/test_transport.py | |
parent | 8ae5ceca48076ad4ee59af813f5a46b12ac555c1 (diff) | |
parent | 20aa3230e32a5018cb5b4245eab1af19dd28acf7 (diff) |
Merge branch '1.16' into 1.17
Diffstat (limited to 'tests/test_transport.py')
-rw-r--r-- | tests/test_transport.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py index 5069e5b0..d81ad8f3 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -828,3 +828,21 @@ class TransportTest(unittest.TestCase): hostkey=public_host_key, username='slowdive', password='pygmalion') + + def test_M_select_after_close(self): + """ + verify that select works when a channel is already closed. + """ + self.setup_test_server() + chan = self.tc.open_session() + chan.invoke_shell() + schan = self.ts.accept(1.0) + schan.close() + + # give client a moment to receive close notification + time.sleep(0.1) + + r, w, e = select.select([chan], [], [], 0.1) + self.assertEqual([chan], r) + self.assertEqual([], w) + self.assertEqual([], e) |