summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-10-20 07:44:29 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-10-20 07:44:29 (GMT)
commit10f29c903751f80c3f53be433dcbbba6f1382048 (patch)
treecc2f35cd4dc9377d3e611cb019fe9e8c308e0d81 /Lib/test/test_socket.py
parent53478f8c6d9370fc37b377d91d79002823cf8ea0 (diff)
downloadcpython-10f29c903751f80c3f53be433dcbbba6f1382048.zip
cpython-10f29c903751f80c3f53be433dcbbba6f1382048.tar.gz
cpython-10f29c903751f80c3f53be433dcbbba6f1382048.tar.bz2
Issue #28471: Avoid ResourceWarning by detaching test socket
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 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)