Commit d55a0e22 authored by Xavier de Gaye's avatar Xavier de Gaye

Fix temporary file not deleted in test_socket

parent 118740e3
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment