Many thanks for that!
It looks like it's time to learn about metaclasses. :)
--
http://mail.python.org/mailman/listinfo/python-list
Bruce Cropley wrote:
> I'm trying to generate test methods in a unittest TestCase
> subclass, using decorators. I'd like to be able to say:
>
> class MyTestCase(unittest.TestCase):
> @genTests(["Buy", "Sell"], [1,2,3], [True, False])
> def something(self, side, price, someFlag):
>
Bruce Cropley wrote:
> Hi all
>
> I'm trying to generate test methods in a unittest TestCase
> subclass, using decorators. I'd like to be able to say:
>
> class MyTestCase(unittest.TestCase):
> @genTests(["Buy", "Sell"], [1,2,3], [True, False])
> def something(self, side, price, someFla