summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_base_events.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2018-01-19 20:04:29 +0200
committerGitHub <noreply@github.com>2018-01-19 20:04:29 +0200
commit7464e87a6511d3626b04c9833a262a77b1f21e23 (patch)
tree4d7bc17260536bd3d91902b521cbf30957cdc1c8 /Lib/test/test_asyncio/test_base_events.py
parent2507e29a9e4e9dcac6eab46546bd3d34a69342ba (diff)
downloadcpython-git-7464e87a6511d3626b04c9833a262a77b1f21e23.tar.gz
bpo-32410: Make SendfileNotAvailableError exception public (#5243)
Diffstat (limited to 'Lib/test/test_asyncio/test_base_events.py')
-rw-r--r--Lib/test/test_asyncio/test_base_events.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index 085124f537..fc3b81096d 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -14,6 +14,7 @@ from unittest import mock
import asyncio
from asyncio import base_events
from asyncio import constants
+from asyncio import events
from test.test_asyncio import utils as test_utils
from test import support
from test.support.script_helper import assert_python_ok
@@ -1860,7 +1861,7 @@ class BaseLoopSendfileTests(test_utils.TestCase):
def test__sock_sendfile_native_failure(self):
sock, proto = self.prepare()
- with self.assertRaisesRegex(base_events._SendfileNotAvailable,
+ with self.assertRaisesRegex(events.SendfileNotAvailableError,
"sendfile is not available"):
self.run_loop(self.loop._sock_sendfile_native(sock, self.file,
0, None))
@@ -1871,7 +1872,7 @@ class BaseLoopSendfileTests(test_utils.TestCase):
def test_sock_sendfile_no_fallback(self):
sock, proto = self.prepare()
- with self.assertRaisesRegex(RuntimeError,
+ with self.assertRaisesRegex(events.SendfileNotAvailableError,
"sendfile is not available"):
self.run_loop(self.loop.sock_sendfile(sock, self.file,
fallback=False))