summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_selector_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_selector_events.py')
-rw-r--r--Lib/test/test_asyncio/test_selector_events.py5
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 964b2e8ec8..0735237cca 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()