Message359661
> yes, the test uses support.TESTFN which has the value of "{}_{}_tmp".format(TESTFN, os.getpid()) in the setUp [0] to create tempdir. Under parallel tests the pid value of TESTFN is initialised with a pid once and used always in the setup calls. So setup acts under parallel tests with same test folder. The tempdir can be dynamically generated but I guess this pattern to use support.TESTFN is common and there could be other flaky tests.
I don't understand. Let's say that test_mailbox and test_os are run in parallel, process 1 runs test_mailbox and process 2 runs test_os. TESTFN should be different in each process but globally unique.
So I don't understand the difference between:
- self._path = support.TESTFN
and:
+ self._tempdir = tempfile.TemporaryDirectory()
+ self._path = self._tempdir.name
Is it because the test currently doesn't remove self._path directory in some cases?
You wrote "I guess the file is not really deleted in some cases." I think that this should be investigated first. |
|
Date |
User |
Action |
Args |
2020-01-09 10:25:09 | vstinner | set | recipients:
+ vstinner, barry, r.david.murray, serhiy.storchaka, maxking, xtreak |
2020-01-09 10:25:09 | vstinner | set | messageid: <1578565509.48.0.553385629885.issue39029@roundup.psfhosted.org> |
2020-01-09 10:25:09 | vstinner | link | issue39029 messages |
2020-01-09 10:25:09 | vstinner | create | |
|