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 michael.foord
Recipients anacrolix, eric.araujo, michael.foord, r.david.murray
Date 2012-03-29.13:26:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It still looks weird to see code calling methods that obviously don't exist, and with no indication *at the call site* where they come from. Making it clearer with naming would help: "TestThingMixin" or similar.

There are classes like this in the unittest test suite, and I was very confused by them initially until I found where and how they were used. It is obviously *not* a pattern that is widely known for test base classes, as we have this problem of it not being done even in the standard library tests.

In contrast I think code similar to the following would be clear and readable without knowing about multiple inheritance and the mixin trick:

    class SomeTestBase(TestCase):
Date User Action Args
2012-03-29 13:26:55michael.foordsetrecipients: + michael.foord, eric.araujo, r.david.murray, anacrolix
2012-03-29 13:26:55michael.foordsetmessageid: <>
2012-03-29 13:26:55michael.foordlinkissue14408 messages
2012-03-29 13:26:55michael.foordcreate