(self)
| 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): |
nothing calls this directly
no test coverage detected