Swapping out unittest.TestCase super class in other library

I’ve subclassed unittest.TestCase in my code base to add helper functions.

But I’m also using the falcon package which has it’s own TestCase subclass, and I’d like to leverage that for some of my tests.

Can anyone recommend a strategy for reconciling the two?

I’m already running on a falcon fork so I’m not opposed to making changes there and make a PR, but I’m not even sure how I’d go about that?

Why not just… subclass that class instead?

I should have been clearer: I’m using my own TestCase subclass in lots of other tests already (and it seems a bit silly to have them inherit falcon.TestCase when they aren’t exercising any web code.

But! I can move my code to a mixin, then use two subclasses, one can mixin regular unittest.TestCast and the other the falcon.TestCase. That should work.

Thanks :pray:t2:

Why would Falcon and Testtools both choose to break backward compatibility with the core library, that they both clearly mimick? Falcon’s TestCase subclasses testtools.TestCase, and testtools.TestCase subclasses unittest.TestCase for you.

Does Pytest need anything special to run Falcon and testtools tests? Has a Pytest plug-in been made for this?