summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 0cf7bfe..a56d8a4 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -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)