diff options
author | Victor Stinner <vstinner@redhat.com> | 2015-07-20 17:18:59 +0200 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2015-07-20 17:36:41 +0200 |
commit | 13b71a16ee9d5af4939a7e214e92fa89cb96f6a3 (patch) | |
tree | cb9525ce018206804591e7e255c5745a044018c6 /tests/test_selector_events.py | |
parent | 9bb67431adc916d9d4b4e23ca257658c980d035d (diff) | |
download | trollius-git-13b71a16ee9d5af4939a7e214e92fa89cb96f6a3.tar.gz |
Add closing read-only property to transportsclosing
* Disallow write() on closing transports
* Disallow aslo calling pause_writing() and resume_writing() on
StreamReaderProtocol if the transport is closing
Diffstat (limited to 'tests/test_selector_events.py')
-rw-r--r-- | tests/test_selector_events.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_selector_events.py b/tests/test_selector_events.py index f0fcdd2..80f93ec 100644 --- a/tests/test_selector_events.py +++ b/tests/test_selector_events.py @@ -1000,8 +1000,8 @@ class SelectorSocketTransportTests(test_utils.TestCase): transport = self.socket_transport() transport.close() self.assertEqual(transport._conn_lost, 1) - transport.write(b'data') - self.assertEqual(transport._conn_lost, 2) + # write() is disallowed after close() + self.assertRaises(RuntimeError, transport.write, b'data') def test_write_ready(self): data = b'data' |