(self)
| 2887 | class Foo[T]: ... |
| 2888 | |
| 2889 | def test_runtime_checkable_generic(self): |
| 2890 | @runtime_checkable |
| 2891 | class Foo[T](Protocol): |
| 2892 | def meth(self) -> T: ... |
| 2893 | |
| 2894 | class Impl: |
| 2895 | def meth(self) -> int: ... |
| 2896 | |
| 2897 | self.assertIsSubclass(Impl, Foo) |
| 2898 | |
| 2899 | class NotImpl: |
| 2900 | def method(self) -> int: ... |
| 2901 | |
| 2902 | self.assertNotIsSubclass(NotImpl, Foo) |
| 2903 | |
| 2904 | def test_pep695_generics_can_be_runtime_checkable(self): |
| 2905 | @runtime_checkable |
nothing calls this directly
no test coverage detected