MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_update_multi_inheritance

Method test_update_multi_inheritance

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

Source from the content-addressed store, hash-verified

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