]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
test_largefile can leave its temp file open if one of many tests fail. On
authorJason Tishler <jason@tishler.net>
Tue, 26 Aug 2003 11:59:41 +0000 (11:59 +0000)
committerJason Tishler <jason@tishler.net>
Tue, 26 Aug 2003 11:59:41 +0000 (11:59 +0000)
commitc519f015f2e1c24b5a2360dd69277bd8cfa1434c
treea0c17cfedee1aec5f393e92ad23858409f7c0502
parentf84d20ac734233ae606f6bbd70764edb51cb8472
test_largefile can leave its temp file open if one of many tests fail. On
platforms (e.g., Cygwin) that are "particular" about open files, this will
cause other regression tests that use the same temp file to fail:

    $ ./python.exe -E -tt Lib/test/regrtest.py -l
    test_largefile test_mmap test_mutants
    test_largefile
    test test_largefile failed -- got -1794967295L, but expected 2500000001L
    test_mmap
    test test_mmap crashed -- exceptions.IOError: [Errno 13] Permission denied: '@test'
    test_mutants
    test test_mutants crashed -- exceptions.IOError: [Errno 13] Permission denied: '@test'

This patch solves the problem by adding missing "try/finally" blocks. Note
that the "large" size of this patch is due to many white space changes --
otherwise, the patch is small.

I tested this patch under Red Hat Linux 8.0 too.
Lib/test/test_largefile.py