summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-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 0cf7bfe293..a56d8a4101 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)