]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
test_multiprocessing removes temporary files (GH-15421)
authorVictor Stinner <vstinner@redhat.com>
Fri, 23 Aug 2019 12:59:40 +0000 (13:59 +0100)
committerGitHub <noreply@github.com>
Fri, 23 Aug 2019 12:59:40 +0000 (13:59 +0100)
(cherry picked from commit d0b10a64351069aa9246d40cb8bd207cc9209cee)

Lib/test/test_multiprocessing.py

index ff299feed8948ee6328e73df1445fab66af4093e..c82ccfa7f0bf674a0ace485523aad0edb3660fc0 100644 (file)
@@ -1809,6 +1809,7 @@ class _TestConnection(BaseTestCase):
         p = self.Process(target=self._writefd, args=(child_conn, b"foo"))
         p.daemon = True
         p.start()
+        self.addCleanup(support.unlink, support.TESTFN)
         with open(support.TESTFN, "wb") as f:
             fd = f.fileno()
             if msvcrt:
@@ -1834,6 +1835,7 @@ class _TestConnection(BaseTestCase):
         p = self.Process(target=self._writefd, args=(child_conn, b"bar", True))
         p.daemon = True
         p.start()
+        self.addCleanup(support.unlink, support.TESTFN)
         with open(support.TESTFN, "wb") as f:
             fd = f.fileno()
             for newfd in range(256, MAXFD):