MCPcopy Index your code
hub / github.com/python/cpython / test_update_multi_inheritance

Method test_update_multi_inheritance

Lib/test/test_abc.py:634–657  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

632 self.assertRaisesRegex(TypeError, msg, C)
633
634 def test_update_multi_inheritance(self):
635 class A(metaclass=abc_ABCMeta):
636 @abc.abstractmethod
637 def foo(self):
638 pass
639
640 class B(metaclass=abc_ABCMeta):
641 def foo(self):
642 pass
643
644 class C(B, A):
645 @abc.abstractmethod
646 def foo(self):
647 pass
648
649 self.assertEqual(C.__abstractmethods__, {'foo'})
650
651 del C.foo
652
653 abc.update_abstractmethods(C)
654
655 self.assertEqual(C.__abstractmethods__, set())
656
657 C()
658
659
660 class TestABCWithInitSubclass(unittest.TestCase):

Callers

nothing calls this directly

Calls 3

setFunction · 0.85
CClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected