New submission from Matthias Braun <matthi...@fb.com>:
The test_listdir test from Lib/test/test_os.py is using os.listdir() twice in the root directory with and without parameters and compares the results. I just had the test fail for me, because an unrelated process happened to create a file in the root directory between the two invocations of os.listdir. In my case it was rsyslog creating '/imjournal.state.tmp', but the problem is a general one. The test failed with: ``` ..test test_os failed -- Traceback (most recent call last): File "/home/matthiasb/dev/fbcpython/Lib/test/test_os.py", line 1914, in test_listdir self.assertEqual(set(os.listdir()), set(os.listdir(os.sep))) AssertionError: Items in the first set but not the second: 'imjournal.state.tmp' ``` ---------- components: Tests messages: 364383 nosy: Matthias Braun priority: normal severity: normal status: open title: test_os / test_listdir failed as root-directory changed during test type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39986> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com