mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
asyncio: sync with Tulip
* Tulip issue 194: Don't use sys.getrefcount() in unit tests * signal.set_wakeup_fd() can now raise an OSError on Python 3.5
This commit is contained in:
parent
8966759b03
commit
c4c464911a
3 changed files with 13 additions and 14 deletions
|
@ -672,6 +672,8 @@ class SelectorTransportTests(test_utils.TestCase):
|
|||
def test_connection_lost(self):
|
||||
exc = OSError()
|
||||
tr = _SelectorTransport(self.loop, self.sock, self.protocol, None)
|
||||
self.assertIsNotNone(tr._protocol)
|
||||
self.assertIsNotNone(tr._loop)
|
||||
tr._call_connection_lost(exc)
|
||||
|
||||
self.protocol.connection_lost.assert_called_with(exc)
|
||||
|
@ -679,8 +681,6 @@ class SelectorTransportTests(test_utils.TestCase):
|
|||
self.assertIsNone(tr._sock)
|
||||
|
||||
self.assertIsNone(tr._protocol)
|
||||
self.assertEqual(2, sys.getrefcount(self.protocol),
|
||||
pprint.pformat(gc.get_referrers(self.protocol)))
|
||||
self.assertIsNone(tr._loop)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue