mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[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 3ac8c0ab6e)
This commit is contained in:
parent
1907e5a7cc
commit
d3d1738acd
4 changed files with 21 additions and 9 deletions
|
|
@ -239,6 +239,17 @@ def test_read_self_pipe_restart(self):
|
|||
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):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue