[py-dev] WindowsErrors when removing file (file in use)

Matthew Edwards monopocalypse+py-dev at gmail.com
Sat Aug 16 06:27:02 CEST 2008


Hi,

This kind of relates to my last problem. With my new file-related test
setup, I often get WindowsErrors when removing files, because they are still
in use, because for some reason the file objects refuse to be closed or
deleted, and are still wandering around when teardown_method is called.
Again, I'm not sure whether this is something I'm doing wrong or a bug, but
I've attached a test (simplified, with attempts at debugging), which fails
with the error every second run (every other run the file exists at the
start) on Python 2.5.2, py 0.9.1 or svn 57262, Windows XP.

Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20080816/94da5fde/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_remove.py
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20080816/94da5fde/attachment.ksh>


More information about the Pytest-dev mailing list