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

Method test_update_del_implementation

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

Source from the content-addressed store, hash-verified

592 self.assertNotHasAttr(A, '__abstractmethods__')
593
594 def test_update_del_implementation(self):
595 class A(metaclass=abc_ABCMeta):
596 @abc.abstractmethod
597 def foo(self):
598 pass
599
600 class B(A):
601 def foo(self):
602 pass
603
604 B()
605
606 del B.foo
607
608 abc.update_abstractmethods(B)
609
610 msg = "class B without an implementation for abstract method 'foo'"
611 self.assertRaisesRegex(TypeError, msg, B)
612
613 def test_update_layered_implementation(self):
614 class A(metaclass=abc_ABCMeta):

Callers

nothing calls this directly

Calls 2

assertRaisesRegexMethod · 0.80
BClass · 0.70

Tested by

no test coverage detected