summaryrefslogtreecommitdiff
path: root/tests/test_selector_events.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2015-07-20 17:18:59 +0200
committerVictor Stinner <vstinner@redhat.com>2015-07-20 17:36:41 +0200
commit13b71a16ee9d5af4939a7e214e92fa89cb96f6a3 (patch)
treecb9525ce018206804591e7e255c5745a044018c6 /tests/test_selector_events.py
parent9bb67431adc916d9d4b4e23ca257658c980d035d (diff)
downloadtrollius-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.py4
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'