Ethan Furman <ethan at stoneleaf.us> 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? > > Maybe composition instead of inheritance is the answer (in this case, > anyway ;). 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 achieved in a better way. How can composition add test cases detectable by Python 2's ‘unittest’ and Python 3's ‘unittest2’? -- \ “The userbase for strong cryptography declines by half with | `\ every additional keystroke or mouseclick required to make it | _o__) work.” —Carl Ellison | Ben Finney
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4