[Python-Dev] fixing tests on windows
"Martin v. Löwis"
martin at v.loewis.de
Wed Apr 2 20:59:40 CEST 2008
> 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?
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.
More information about the Python-Dev