Commit 10f29c90 authored by Martin Panter's avatar Martin Panter

Issue #28471: Avoid ResourceWarning by detaching test socket

parent 53478f8c
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment