We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 114028e commit ba8df08Copy full SHA for ba8df08
Lib/test/test_abc.py
@@ -590,6 +590,28 @@ def foo(self):
590
msg = "class B with abstract method foo"
591
self.assertRaisesRegex(TypeError, msg, B)
592
593
+ def test_update_layered_implementation(self):
594
+ class A(metaclass=abc_ABCMeta):
595
+ @abc.abstractmethod
596
+ def foo(self):
597
+ pass
598
+
599
+ class B(A):
600
601
602
+ class C(B):
603
604
605
606
+ C()
607
608
+ del C.foo
609
610
+ abc.update_abstractmethods(C)
611
612
+ msg = "class C with abstract method foo"
613
+ self.assertRaisesRegex(TypeError, msg, C)
614
615
616
617
class TestABCWithInitSubclass(unittest.TestCase):
0 commit comments