diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-11-16 17:43:21 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-11-16 17:43:21 (GMT) |
commit | 5bb1afb3322ecf370cf328d40fb95eb0a3ddab7c (patch) | |
tree | 6c9e387872b2ffb45429ee4c3e516f8b59c3b483 /Lib/test/test_asyncio/test_unix_events.py | |
parent | da32d26ab98cdb3fe27ee8d61460592fc1cae335 (diff) | |
download | cpython-5bb1afb3322ecf370cf328d40fb95eb0a3ddab7c.zip cpython-5bb1afb3322ecf370cf328d40fb95eb0a3ddab7c.tar.gz cpython-5bb1afb3322ecf370cf328d40fb95eb0a3ddab7c.tar.bz2 |
asyncio: Add Transport.is_closing()
See https://github.com/python/asyncio/pull/291 for details.
Diffstat (limited to 'Lib/test/test_asyncio/test_unix_events.py')
-rw-r--r-- | Lib/test/test_asyncio/test_unix_events.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py index dc0835c..22dc688 100644 --- a/Lib/test/test_asyncio/test_unix_events.py +++ b/Lib/test/test_asyncio/test_unix_events.py @@ -440,7 +440,7 @@ class UnixReadPipeTransportTests(test_utils.TestCase): tr = self.read_pipe_transport() err = object() tr._close(err) - self.assertTrue(tr._closing) + self.assertTrue(tr.is_closing()) self.assertFalse(self.loop.readers) test_utils.run_briefly(self.loop) self.protocol.connection_lost.assert_called_with(err) @@ -598,7 +598,7 @@ class UnixWritePipeTransportTests(test_utils.TestCase): tr._read_ready() self.assertFalse(self.loop.readers) self.assertFalse(self.loop.writers) - self.assertTrue(tr._closing) + self.assertTrue(tr.is_closing()) test_utils.run_briefly(self.loop) self.protocol.connection_lost.assert_called_with(None) @@ -658,7 +658,7 @@ class UnixWritePipeTransportTests(test_utils.TestCase): self.assertFalse(self.loop.writers) self.assertFalse(self.loop.readers) self.assertEqual([], tr._buffer) - self.assertTrue(tr._closing) + self.assertTrue(tr.is_closing()) m_logexc.assert_called_with( test_utils.MockPattern( 'Fatal write error on pipe transport' @@ -694,7 +694,7 @@ class UnixWritePipeTransportTests(test_utils.TestCase): self.assertFalse(self.loop.readers) self.assertFalse(self.loop.writers) self.assertEqual([], tr._buffer) - self.assertTrue(tr._closing) + self.assertTrue(tr.is_closing()) test_utils.run_briefly(self.loop) self.protocol.connection_lost.assert_called_with(None) @@ -743,7 +743,7 @@ class UnixWritePipeTransportTests(test_utils.TestCase): def test_write_eof(self): tr = self.write_pipe_transport() tr.write_eof() - self.assertTrue(tr._closing) + self.assertTrue(tr.is_closing()) self.assertFalse(self.loop.readers) test_utils.run_briefly(self.loop) self.protocol.connection_lost.assert_called_with(None) @@ -752,7 +752,7 @@ class UnixWritePipeTransportTests(test_utils.TestCase): tr = self.write_pipe_transport() tr._buffer = [b'data'] tr.write_eof() - self.assertTrue(tr._closing) + self.assertTrue(tr.is_closing()) self.assertFalse(self.protocol.connection_lost.called) |