summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier de Gaye <xdegaye@users.sourceforge.net>2016-11-13 18:39:48 (GMT)
committerXavier de Gaye <xdegaye@users.sourceforge.net>2016-11-13 18:39:48 (GMT)
commit547c1b9acef2d7adcb8d3540bd969d115073d953 (patch)
treeb29b8f9a80a5250cb0de4d914713f3eeedb6c892
parent7ae411264933bfc845c3647cde478508c7981ad3 (diff)
downloadcpython-547c1b9acef2d7adcb8d3540bd969d115073d953.zip
cpython-547c1b9acef2d7adcb8d3540bd969d115073d953.tar.gz
cpython-547c1b9acef2d7adcb8d3540bd969d115073d953.tar.bz2
Fix temporary file not deleted in test_socket
-rw-r--r--Lib/test/test_socket.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index cce7d52..dbfcab8 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1442,7 +1442,8 @@ class GeneralModuleTests(unittest.TestCase):
# type and populates the socket object.
#
# On Windows this trick won't work, so the test is skipped.
- fd, _ = tempfile.mkstemp()
+ fd, path = tempfile.mkstemp()
+ self.addCleanup(os.unlink, path)
with socket.socket(family=42424, type=13331, fileno=fd) as s:
self.assertEqual(s.family, 42424)
self.assertEqual(s.type, 13331)