Message168543
| Author |
jeremy.kloth |
| Recipients |
chris.jerdonek, georg.brandl, jeremy.kloth, ncoghlan, pitrou |
| Date |
2012年08月19日.00:29:50 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAGvrs3LL5z6tBkwQ86ZpJxKCSDUYPpY9kyOccB5mjRCh7stqBA@mail.gmail.com> |
| In-reply-to |
<1345330417.43.0.750717613116.issue15526@psf.upfronthosting.co.za> |
| Content |
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. |
|