[Python-3000] Py3k_struni additional test failures under cygwin (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Mon Jul 30 23:39:40 CEST 2007


Guido van Rossum schrieb:

I found that in many cases, this is a virus scanner or the indexing service interfering. They open the file, and then the test suite cannot delete it. Oh darn. I remember running into that in a completely different context. What's the solution? Turn off the virus scanner? Wait until it's done?

I never found the time to properly research the official solution.

Looking at the DeleteFile documentation, the problem is slightly different, still: "The DeleteFile function marks a file for deletion on close. Therefore, the file deletion does not occur until the last handle to the file is closed. Subsequent calls to CreateFile to open the file fail with ERROR_ACCESS_DENIED."

So it is not the DeleteFile that fails, but the subsequent attempt to create a new file in the same place.

For the test suite, the solution would be to always use a fresh file name for temporary files. Of course, it is then more important that all files created actually do get removed in the fixture.

Regards, Martin



More information about the Python-3000 mailing list