Martin v. Löwis wrote:
>> Is using a fixed TESTFN just an old approach that predates the existence 
>> of a robust tempfile module in the standard library?
> 
> No. I believe the rationale for TESTFN is to provide a fixed name,
> precisely so that the test suite doesn't leave tons of garbage around.

I figured this was going to be the answer, and I wonder if it would be 
better to use the tempfile module to generate unique filenames that are 
all contained in a special directory. It would seem functionally 
equivalent in the sense that removing the garbage is easy 
"rmtree(TESTDIR)", and it would also solve the windows problem of files 
that can't be unlinked. I suppose one would have to periodically 
clean-up their temp folder of the files left behind, but that's still an 
improvement over what is currently required if TESTFN is not unlinked.

The only reason I could see the switch being undesirable is if you 
wanted to go read the test file by hand, but I'm not sure anyone is 
doing that.

-Scott

-- 
Scott Dial
[EMAIL PROTECTED]
[EMAIL PROTECTED]
_______________________________________________
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