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, zach.ware
Date 2013-06-19.21:00:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1371675654.81.0.262540951411.issue18266@psf.upfronthosting.co.za>
In-reply-to
Content
This one is another inheritance issue.  The patch removes unittest.TestCase as a base for LargeFileTest and converts test_main into setUpModule, load_tests, and tearDownModule.  This seems like the way to go due to the fact that the order of test execution matters: test_seek must be first and test_truncate must be last.  The only way around that restriction would be to create a new copy of the file for test_truncate, which would make the test take even longer and use even more resources.

Also, the programmatic creation of the C and Py variants of the test has been changed from creating an empty subclass of LargeFileTest which is then renamed and assigned an 'open' attr, to using the three-arg form of type to create a subclass of LargeFileTest and unittest.TestCase with name set and an 'open' attr pointing to the correct function.

Lastly, the superfluous check on whether f.truncate is available that had been in test_main is now removed so that the test is properly marked as skipped if skipped.
History
Date User Action Args
2013-06-19 21:00:54zach.waresetrecipients: + zach.ware, brett.cannon, ezio.melotti
2013-06-19 21:00:54zach.waresetmessageid: <1371675654.81.0.262540951411.issue18266@psf.upfronthosting.co.za>
2013-06-19 21:00:54zach.warelinkissue18266 messages
2013-06-19 21:00:54zach.warecreate