mirror of
https://github.com/python/cpython.git
synced 2024-12-11 10:50:11 +08:00
Fix temporary file not deleted in test_socket
This commit is contained in:
parent
7ae4112649
commit
547c1b9ace
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user