diff options
author | Charlie Zhao <zhaoyu_hit@qq.com> | 2022-10-31 18:22:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 18:22:02 (GMT) |
commit | d3d1738acd4f62869d7f1e119c257e2ee46fd16f (patch) | |
tree | 207129f5f81a0ad2d5b02c44f863723771a95da3 /Lib | |
parent | 1907e5a7cca9b7348f76c3f1128058ddc4623f22 (diff) | |
download | cpython-d3d1738acd4f62869d7f1e119c257e2ee46fd16f.zip cpython-d3d1738acd4f62869d7f1e119c257e2ee46fd16f.tar.gz cpython-d3d1738acd4f62869d7f1e119c257e2ee46fd16f.tar.bz2 |
[3.10] gh-98793: Fix typecheck in `overlapped.c` (GH-98835) (#98890)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 3ac8c0ab6ee819a14b1c8e0992acbaf376a46058)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_asyncio/test_windows_events.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_windows_events.py b/Lib/test/test_asyncio/test_windows_events.py index f276cd2..afd3028 100644 --- a/Lib/test/test_asyncio/test_windows_events.py +++ b/Lib/test/test_asyncio/test_windows_events.py @@ -239,6 +239,17 @@ class ProactorTests(test_utils.TestCase): self.close_loop(self.loop) self.assertFalse(self.loop.call_exception_handler.called) + def test_address_argument_type_error(self): + # Regression test for https://github.com/python/cpython/issues/98793 + proactor = self.loop._proactor + sock = socket.socket(type=socket.SOCK_DGRAM) + bad_address = None + with self.assertRaises(TypeError): + proactor.connect(sock, bad_address) + with self.assertRaises(TypeError): + proactor.sendto(sock, b'abc', addr=bad_address) + sock.close() + class WinPolicyTests(test_utils.TestCase): |