This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients brett.cannon, ezio.melotti, facundobatista, giampaolo.rodola, serhiy.storchaka, zach.ware
Date 2013-07-04.04:34:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1372912500.36.0.0118074671055.issue18266@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-07-04 04:35:00zach.waresetrecipients: + zach.ware, brett.cannon, facundobatista, giampaolo.rodola, ezio.melotti, serhiy.storchaka
2013-07-04 04:35:00zach.waresetmessageid: <1372912500.36.0.0118074671055.issue18266@psf.upfronthosting.co.za>
2013-07-04 04:35:00zach.warelinkissue18266 messages
2013-07-04 04:34:59zach.warecreate