Zachary Ware added the comment:

Here's a stab at fixing that issue.  It works, but I don't know that it's the 
best solution.

This patch converts test_seek into setUp, and attempts to make sure the test 
file is in the same state at the beginning of each test, with a new 
tearDownClass removing the file after each implementation has been tested.  
setUp also tries not to recreate the file from scratch each time, as doing so 
would make the test take an unreasonably long time on Windows (currently the 
test takes around 5 minutes on my Windows 7 machine, creating the file twice.  
I have not yet tested this patch on Windows, but should be able to before 
Saturday).

With this change, load_tests has been removed, and the Py/C test subclasses are 
created manually.

Since this has moved from strictly test discovery fixes to a bit more of a 
refactor, I made a few other minor changes as well.  I removed the verbose 
prints and wrapped a couple of long lines, changed the filesystem test (which 
is now in setUpModule) to remove its test file, and fixed a couple of comments. 
Also, I removed 'oldhandler' from the issue490453 fix (since it was unused and 
only served to confuse me until I did some research on it), though I suppose if 
preferred, it could be saved to reset the signal handler at the end of the run. 
 Either way, that whole fix was also moved into setUpModule with other setup 
code.

This patch is against 3.3; it does not apply cleanly to default due to a 
conflict between IOError and OSError in two places.  It should merge forward 
fine, though.

----------
Added file: 
http://bugs.python.org/file30764/test_largefile_discovery.v2-3.3.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18266>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to