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

Method test_update_del_implementation

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

assertRaisesRegexMethod · 0.80
BClass · 0.70

Tested by

no test coverage detected