(self)
| 3083 | self.assertIsSubclass(C, P2) |
| 3084 | |
| 3085 | def test_subprotocols_merging(self): |
| 3086 | class P1(Protocol): |
| 3087 | def meth1(self): |
| 3088 | pass |
| 3089 | |
| 3090 | class P2(Protocol): |
| 3091 | def meth2(self): |
| 3092 | pass |
| 3093 | |
| 3094 | @runtime_checkable |
| 3095 | class P(P1, P2, Protocol): |
| 3096 | pass |
| 3097 | |
| 3098 | class C: |
| 3099 | def meth1(self): |
| 3100 | pass |
| 3101 | |
| 3102 | def meth2(self): |
| 3103 | pass |
| 3104 | |
| 3105 | class C1: |
| 3106 | def meth1(self): |
| 3107 | pass |
| 3108 | |
| 3109 | class C2: |
| 3110 | def meth2(self): |
| 3111 | pass |
| 3112 | |
| 3113 | self.assertNotIsInstance(C1(), P) |
| 3114 | self.assertNotIsInstance(C2(), P) |
| 3115 | self.assertNotIsSubclass(C1, P) |
| 3116 | self.assertNotIsSubclass(C2, P) |
| 3117 | self.assertIsInstance(C(), P) |
| 3118 | self.assertIsSubclass(C, P) |
| 3119 | |
| 3120 | def test_protocols_issubclass(self): |
| 3121 | T = TypeVar('T') |
nothing calls this directly
no test coverage detected