diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2016-06-10 14:04:02 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2016-06-10 14:04:02 -0700 |
commit | 0fe676eff57cc7d170dcc827c7fb6afee71ed88d (patch) | |
tree | 524aacf02d4517f6674a6a6a55cfcf47fb78a5f6 /tests/test_transport.py | |
parent | 26e4adfa7a4d6821d97d4915d9fce3d0676881be (diff) | |
parent | 50de173becde7446fc725422bbf2f8aa3b2708da (diff) |
Merge branch '2.0'
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) |