A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-April/078383.html below:

[Python-Dev] fixing tests on windows

[Python-Dev] fixing tests on windows [Python-Dev] fixing tests on windowsScott Dial scott+python-dev at scottdial.com
Wed Apr 2 22:58:03 CEST 2008
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
scott at scottdial.com
scodial at cs.indiana.edu
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4