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/078367.html below:

[Python-Dev] fixing tests on windows

[Python-Dev] fixing tests on windows [Python-Dev] fixing tests on windowsNick Coghlan ncoghlan at gmail.com
Wed Apr 2 11:13:24 CEST 2008
Tim Golden wrote:
> I admit: this did occur to me on the train this am. While I
> try to think of a robust way to handle this, other people have
> proposed variations on pid-based / tempdir based filenames instead
> of the same name for each test. In principle this sounds good to me,
> but I'm not at all well-placed to assess the impact it might have
> on the unit tests in general.

Personally, I've never really understood the purpose of 
test_support.TESTFN. Whenever I've needed a temporary file for a test, I 
just use the tempfile module (e.g. test_cmd_line_script, test_runpy). 
Tests using that module don't care if the old files take 'a while' to 
get deleted on Windows, as tempfile uses a different name each time anyway.

Is using a fixed TESTFN just an old approach that predates the existence 
of a robust tempfile module in the standard library?

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
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