[issue39029] TestMaildir.test_clean fails randomly under parallel tests

Karthikeyan Singaravelan report at bugs.python.org
Thu Jan 9 05:49:37 EST 2020


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

> You wrote "I guess the file is not really deleted in some cases." I think that this should be investigated first.

Sorry, I wanted to mean that as the test deletes the file and goes on to assert it's not present the other test that runs in parallel creates the same file in setup code. Thus I wanted to imply that during assertion and parallel test's setup code the directory is again created.

I tried printing os.getpid() and support.TESTFN values in the setup and they are the same for all the tests.


./python.exe -Wall -m test -R 4:4 -j 4 test_mailbox -m test_clean
0:00:00 load avg: 2.91 Run tests in parallel using 4 child processes
0:00:00 load avg: 2.91 [1/1/1] test_mailbox failed
os.getpid() = 27901
support.TESTFN = '@test_27901_tmp'
os.getpid() = 27901
support.TESTFN = '@test_27901_tmp'
beginning 8 repetitions
12345678
.test test_mailbox failed -- Traceback (most recent call last):
  File "/Users/kasingar/stuff/python/cpython/Lib/test/test_mailbox.py", line 740, in test_clean
    self.assertFalse(os.path.exists(foo_path))
AssertionError: True is not false

== Tests result: FAILURE ==

1 test failed:
    test_mailbox

Total duration: 789 ms
Tests result: FAILURE

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39029>
_______________________________________


More information about the Python-bugs-list mailing list