Jeremy Kloth added the comment: Unfortunately, this is a legitimate failure of the test. The test (actually the support code) is attempting to remove a directory that is the current directory of an active process. The test has documented this issue and attempted to work around it by adding a sleep().
To fix this test there a few options: 1) increase the sleep timeout 2) change the current working directory before calling os.startfile() (possible that of the Python interpreter itself) 3) code a "wait for child process" function using ctypes and the Toolhelp API (Process32First/Next) 4) change os.startfile() to use ShellExecuteEx and use the hProcess handle as the return value and use that with os.waitpid() #4 is the most accurate, but does introduce an API change (the introduction of a return value to os.startfile) #3 is more work but may be helpful for other tests #2 will definitely work in this case but does violate the testing sandbox #1 is the least disruptive, but is really just avoiding the root cause I would like to see #4 but realize that it may be too late for 3.3. #3 is not bad either as it has impact only on the test suite. But any of the above should fix this particular case. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15526> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com