Author benjamin.peterson
Recipients benjamin.peterson, calvin, georg.brandl, giampaolo.rodola, ncoghlan, pitrou, pupeno, purcell, rblank, rhettinger
Date 2008-12-29.17:39:32
SpamBayes Score 4.63518e-14
Marked as misclassified No
Message-id <1230572373.95.0.924444197531.issue1034053@psf.upfronthosting.co.za>
In-reply-to
Content
I think this is a good improvement, and I hope it can make it into 2.7/3.1.

Several comments on patch:

- I don't like the name "SkipException" SkipTest is better IMO.

- TestResult.addSkipped should be changed to TestResult.addSkip.

- I'm not sure why TestResult.addSkipped gets sys.exc_info() pass in. I
think you should just catch the exception and pass the reason ("str(e)")
to addSkipped.

- The patch needs docs before it can be applied.

- As Antoine said, it would be nice to have decorators for skipping.
When I implemented this, I added the skip() (unconditional skip)
skip_if(condition, reason) and skip_unless(condition, reason)
decorators. It should also be easy to extend the mechanism, so that
custom decorators can be written.

- It would nice to be able to skip whole classes, too. This could easily
be done with class decorators.

(Georg, I hope you don't mind if I "steal" this from you.)
History
Date User Action Args
2008-12-29 17:39:34benjamin.petersonsetrecipients: + benjamin.peterson, georg.brandl, rhettinger, calvin, purcell, ncoghlan, pitrou, rblank, giampaolo.rodola, pupeno
2008-12-29 17:39:33benjamin.petersonsetmessageid: <1230572373.95.0.924444197531.issue1034053@psf.upfronthosting.co.za>
2008-12-29 17:39:33benjamin.petersonlinkissue1034053 messages
2008-12-29 17:39:32benjamin.petersoncreate