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 ezio.melotti
Recipients BreamoreBoy, eric.araujo, ezio.melotti, kristjan.jonsson, michael.foord, pitrou, r.david.murray, serhiy.storchaka, stutzbach, zach.ware
Date 2014-06-19.20:41:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403210473.96.0.738902582624.issue14534@psf.upfronthosting.co.za>
In-reply-to
Content
+1 on the idea.

While the mixin method works and it's not overly complex, it might not be immediately obvious to those unfamiliar with it and to those reviewing the code (i.e. there's no clear hint about the reason why the base class doesn't inherit from TestCase directly).  Using mixins also adds duplication and might results in tests not being run if one adds a new class and forgets to add TestCase in the mix.

A decorator would solve these problems nicely, and a bit of magic under the hood seems to me an acceptable price to pay.
History
Date User Action Args
2014-06-19 20:41:14ezio.melottisetrecipients: + ezio.melotti, pitrou, kristjan.jonsson, stutzbach, eric.araujo, r.david.murray, michael.foord, BreamoreBoy, zach.ware, serhiy.storchaka
2014-06-19 20:41:13ezio.melottisetmessageid: <1403210473.96.0.738902582624.issue14534@psf.upfronthosting.co.za>
2014-06-19 20:41:13ezio.melottilinkissue14534 messages
2014-06-19 20:41:13ezio.melotticreate