summaryrefslogtreecommitdiff
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 01d0bb9eac..53ace04e4f 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -4569,6 +4569,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)