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