def test_discover_subsubclass(self): class SubSubClass(SubClass): """Sub class of SubClass""" subs = list(subclasses(BaseClass)) self.assertEqual(len(subs), 2) self.assertIn(SubClass, subs) self.assertIn(SubSubClass, subs)
def test_discover_subclass(self): subs = list(subclasses(BaseClass)) self.assertEqual(len(subs), 1) self.assertIs(subs[0], SubClass)