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

Method test_update_layered_implementation

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

Source from the content-addressed store, hash-verified

611 self.assertRaisesRegex(TypeError, msg, B)
612
613 def test_update_layered_implementation(self):
614 class A(metaclass=abc_ABCMeta):
615 @abc.abstractmethod
616 def foo(self):
617 pass
618
619 class B(A):
620 pass
621
622 class C(B):
623 def foo(self):
624 pass
625
626 C()
627
628 del C.foo
629
630 abc.update_abstractmethods(C)
631
632 msg = "class C without an implementation for abstract method 'foo'"
633 self.assertRaisesRegex(TypeError, msg, C)
634
635 def test_update_multi_inheritance(self):
636 class A(metaclass=abc_ABCMeta):

Callers

nothing calls this directly

Calls 2

assertRaisesRegexMethod · 0.80
CClass · 0.70

Tested by

no test coverage detected