Message78467
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.) |
|
Date |
User |
Action |
Args |
2008-12-29 17:39:34 | benjamin.peterson | set | recipients:
+ benjamin.peterson, georg.brandl, rhettinger, calvin, purcell, ncoghlan, pitrou, rblank, giampaolo.rodola, pupeno |
2008-12-29 17:39:33 | benjamin.peterson | set | messageid: <1230572373.95.0.924444197531.issue1034053@psf.upfronthosting.co.za> |
2008-12-29 17:39:33 | benjamin.peterson | link | issue1034053 messages |
2008-12-29 17:39:32 | benjamin.peterson | create | |
|