diff options
author | Guido van Rossum <guido@python.org> | 2014-05-06 21:45:39 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2014-05-06 21:45:39 (GMT) |
commit | 5dcad2c8f3fe5055fc808d79bde005d0b741fb24 (patch) | |
tree | b25b8d4eb031f27ab97f942670c8f3161e419d72 /Lib/test | |
parent | bca9694ac1cc41f091fb78badbc1d1673b35077a (diff) | |
parent | 3d139d8ed6712f39f4e91dc084ed421b76af09ae (diff) | |
download | cpython-5dcad2c8f3fe5055fc808d79bde005d0b741fb24.zip cpython-5dcad2c8f3fe5055fc808d79bde005d0b741fb24.tar.gz cpython-5dcad2c8f3fe5055fc808d79bde005d0b741fb24.tar.bz2 |
Merge 3.4->default: asyncio: Fix the second half of issue #21447: race in _write_to_self().
Diffstat (limited to 'Lib/test')
-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() |