diff options
author | Guido van Rossum <guido@python.org> | 2014-05-06 21:42:40 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2014-05-06 21:42:40 (GMT) |
commit | 3d139d8ed6712f39f4e91dc084ed421b76af09ae (patch) | |
tree | ba711bde2328d996b11330331e5797afde744bb1 /Lib/test/test_asyncio | |
parent | 9fafc9f79a0510cd7f7357fcbb8cfffb6f967c6c (diff) | |
download | cpython-3d139d8ed6712f39f4e91dc084ed421b76af09ae.zip cpython-3d139d8ed6712f39f4e91dc084ed421b76af09ae.tar.gz cpython-3d139d8ed6712f39f4e91dc084ed421b76af09ae.tar.bz2 |
asyncio: Fix the second half of issue #21447: race in _write_to_self().
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r-- | Lib/test/test_asyncio/test_selector_events.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py index 964b2e8..0735237 100644 --- a/Lib/test/test_asyncio/test_selector_events.py +++ b/Lib/test/test_asyncio/test_selector_events.py @@ -121,8 +121,9 @@ class BaseSelectorEventLoopTests(unittest.TestCase): self.assertIsNone(self.loop._write_to_self()) def test_write_to_self_exception(self): - self.loop._csock.send.side_effect = OSError() - self.assertRaises(OSError, self.loop._write_to_self) + # _write_to_self() swallows OSError + self.loop._csock.send.side_effect = RuntimeError() + self.assertRaises(RuntimeError, self.loop._write_to_self) def test_sock_recv(self): sock = mock.Mock() |