[issue18266] Fix test discovery for test_largefile.py

Zachary Ware report at bugs.python.org
Fri Jul 5 20:58:44 CEST 2013


Zachary Ware added the comment:

After testing on Windows, here's version 3.  This version changes tearDownClass to truncate the file rather than unlink it, and adds a check to make sure the file is properly truncated to 0 length.  Unlinking the file makes the test take an extra 40 seconds on my machine, I suspect due to Windows trying to simultaneously deallocate one 2GB file and build another.  To go with that change, tearDownModule is added, which does unlink TESTFN.

Also changed in this version, I've removed the "use_resources = ['largefile',]" assignment I had added to the "if __name__ == '__main__'" stanza; I've since learned that it has no effect (support.requires lets anything pass if the test module's __name__ is 
"__main__").

----------
Added file: http://bugs.python.org/file30780/test_largefile_discovery.v3-3.3.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18266>
_______________________________________


More information about the Python-bugs-list mailing list