コード例 #1
0
 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)
コード例 #2
0
    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)
コード例 #3
0
 def test_discover_subclass(self):
     subs = list(subclasses(BaseClass))
     self.assertEqual(len(subs), 1)
     self.assertIs(subs[0], SubClass)
コード例 #4
0
 def test_discover_subclass(self):
     subs = list(subclasses(BaseClass))
     self.assertEqual(len(subs), 1)
     self.assertIs(subs[0], SubClass)