mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
[3.11] gh-98793: Fix typecheck in overlapped.c
(GH-98835) (#98889)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 3ac8c0ab6e
)
This commit is contained in:
parent
a4f8db19ad
commit
2b0cbb90c3
4 changed files with 21 additions and 9 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue