> def rename_and_remove (filename):
>  os.rename (filename, filename + ".deleted")
>  os.remove (filename + ".deleted")

> Isn't this still going to run into problems when the rename
> fails because the earlier tests remove still left the .deleted
> file around due to some other running desktop search service
> that now has the .deleted file open?

I haven't looked into all the various places the tests write temp files to, but 
if we could localise everything to a common root directory, i.e. 
%TEMP%\python-regrtest, we could then attempt to blow this away at the start of 
regrtest.py before any tests run, and refuse to run if this fails.  This would 
be in combination with the unlinking/renaming approach discussed.  This 
approach seems like it would cover all bases a bit more effectively.

        Trent.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to