bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)

This commit is contained in:
Andrew Svetlov 2018-09-11 10:13:04 -07:00 committed by GitHub
parent 7c7605ff11
commit 0baa72f4b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 148 additions and 110 deletions

View file

@ -1946,7 +1946,7 @@ class BaseLoopSockSendfileTests(test_utils.TestCase):
def test__sock_sendfile_native_failure(self):
sock, proto = self.prepare()
with self.assertRaisesRegex(events.SendfileNotAvailableError,
with self.assertRaisesRegex(asyncio.SendfileNotAvailableError,
"sendfile is not available"):
self.run_loop(self.loop._sock_sendfile_native(sock, self.file,
0, None))
@ -1957,7 +1957,7 @@ class BaseLoopSockSendfileTests(test_utils.TestCase):
def test_sock_sendfile_no_fallback(self):
sock, proto = self.prepare()
with self.assertRaisesRegex(events.SendfileNotAvailableError,
with self.assertRaisesRegex(asyncio.SendfileNotAvailableError,
"sendfile is not available"):
self.run_loop(self.loop.sock_sendfile(sock, self.file,
fallback=False))