mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue #28471: Avoid ResourceWarning by detaching test socket
This commit is contained in:
parent
53478f8c6d
commit
10f29c9037
1 changed files with 1 additions and 0 deletions
|
@ -4559,6 +4559,7 @@ class TestExceptions(unittest.TestCase):
|
|||
sock = socket.socket(
|
||||
socket.AF_INET, socket.SOCK_STREAM, 0, sock0.fileno())
|
||||
sock0.close()
|
||||
self.addCleanup(sock.detach)
|
||||
|
||||
with self.assertRaises(OSError):
|
||||
sock.setblocking(False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue