[Python-checkins] cpython (3.5): Fix temporary file not deleted in test_socket
xavier.degaye
python-checkins at python.org
Sun Nov 13 13:43:04 EST 2016
https://hg.python.org/cpython/rev/d82f43d8927a
changeset: 105083:d82f43d8927a
branch: 3.5
parent: 105078:0efd48d4c47c
user: Xavier de Gaye <xdegaye at users.sourceforge.net>
date: Sun Nov 13 19:39:48 2016 +0100
summary:
Fix temporary file not deleted in test_socket
files:
Lib/test/test_socket.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1442,7 +1442,8 @@
# 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)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list