]> granicus.if.org Git - python/commitdiff
test_multiprocessing removes temporary files
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 20 Sep 2011 23:10:29 +0000 (01:10 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 20 Sep 2011 23:10:29 +0000 (01:10 +0200)
Lib/test/test_multiprocessing.py

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