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 chris.jerdonek, esc24, ezio.melotti, vstinner, zach.ware
Date 2013-06-29.04:59:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1372481999.02.0.246124468992.issue16000@psf.upfronthosting.co.za>
In-reply-to
Content
I had a chance to look at this today and took a stab at writing a patch (attached).  Since moving all of the test functions into a TestCase subclass necessarily means indenting everything another level, the patch is a huge ugly mix of - and + lines that don't really have any relation to each other.  As such, I'll also be attaching another patch which is for review purposes only: it differs from the real patch by only indenting the def statements by 2 spaces instead of the usual 4, allowing the bodies of the methods to not be indented, which makes the changes MUCH easier to keep track of.

As Chris mentioned previously, running the test in verbose mode (under regrtest) causes rendering problems.  I worked around this by adding a "print('')" to the setUp method; it doesn't make things perfect, but it makes it a bit easier to read.  I'm not terribly attached to this hack, though, so I'd be fine with removing it if anyone has a preference.

Also as Chris mentioned, there is an open question of how to do setup, whether to do things in TestCase.setUp, TestCase,setUpClass, or setUpModule.  This patch does initial curses.setupterm() in setUpModule, then initscr and savetty in setUp (with resetty and endwin in tearDown).  However, this is not how the module has been testing; it has been doing initscr/savetty and resetty/endwin only once throughout execution.  I've considered creating a subclass of the TestCurses test class which would do initscr/savetty in setUpClass, to do all the tests again on the same screen (as has been up to now), but I'd like others' opinions on that before I write it.

Also, this patch is against default; I'll make sure it works for 3.3 after a round or two of review.
History
Date User Action Args
2013-06-29 04:59:59zach.waresetrecipients: + zach.ware, vstinner, ezio.melotti, chris.jerdonek, esc24
2013-06-29 04:59:59zach.waresetmessageid: <1372481999.02.0.246124468992.issue16000@psf.upfronthosting.co.za>
2013-06-29 04:59:58zach.warelinkissue16000 messages
2013-06-29 04:59:58zach.warecreate