Ben Finney wrote:
Both interesting, thank you. But Python 3 isn't an option for several
projects where I'd like to use this.
Okay, I took some time to try and figure this out (have I mentioned how
much I love Python 3's clean-up?), and I have something -- lightly
tested with methods, properti
Ethan Furman wrote:
Ben Finney wrote:
Ethan Furman writes:
8<---test_compose.py---
import unittest
ack! There should be an 'import new' here as well. :/
___
Python-Dev mailing list
Python-Dev@python.org
Ben Finney wrote:
Ethan Furman writes:
>> Ben Finney wrote:
>>>
How can composition add test cases detectable by Python's ‘unittest’?
>>
Metaclasses, if's that an option...
[…]
or a class decorator
[…]
Both interesting, thank you. But Python 3 isn't an option for several
projects where I
Ethan Furman writes:
> Ben Finney wrote:
> > TestCase subclasses is a multiple-inheritance use case that I share.
> > The mix-ins add test cases (methods named ‘test_’ on the mix-in
> > class) to the TestCase subclass. I would prefer not to use multiple
> > inheritance for this if it can be achie
Ben Finney wrote:
Ethan Furman writes:
Here we have django's TestCase that does *not* want to call
unittest2.TestCase (assuming that's not a bug), but it gets called
anyway because the Mixin3 sibling has it as a base class. So does
this mean that TestCase and Mixin3 just don't play well toget
Hi,
I just wanted to clear a slight misunderstanding:
How can composition add test cases detectable by Python 2's
‘unittest’
and Python 3's ‘unittest2’?
The package shipped in the stdlib is named unittest in all Python
versions. The codebase that has seen a lot of improvements thanks to
Mic
Ethan Furman writes:
> Here we have django's TestCase that does *not* want to call
> unittest2.TestCase (assuming that's not a bug), but it gets called
> anyway because the Mixin3 sibling has it as a base class. So does
> this mean that TestCase and Mixin3 just don't play well together?
>
> Mayb