(self)
| 1188 | self.assert_meet(self.fx.t, self.fx.s, UninhabitedType()) |
| 1189 | |
| 1190 | def test_none(self) -> None: |
| 1191 | self.assert_meet(NoneType(), NoneType(), NoneType()) |
| 1192 | |
| 1193 | self.assert_meet(NoneType(), self.fx.anyt, NoneType()) |
| 1194 | |
| 1195 | # Any type t joined with None results in None, unless t is Any. |
| 1196 | with state.strict_optional_set(False): |
| 1197 | for t in [ |
| 1198 | self.fx.a, |
| 1199 | self.fx.o, |
| 1200 | UnboundType("x"), |
| 1201 | self.fx.t, |
| 1202 | self.tuple(), |
| 1203 | self.callable(self.fx.a, self.fx.b), |
| 1204 | ]: |
| 1205 | self.assert_meet(t, NoneType(), NoneType()) |
| 1206 | |
| 1207 | with state.strict_optional_set(True): |
| 1208 | self.assert_meet(self.fx.o, NoneType(), NoneType()) |
| 1209 | for t in [ |
| 1210 | self.fx.a, |
| 1211 | UnboundType("x"), |
| 1212 | self.fx.t, |
| 1213 | self.tuple(), |
| 1214 | self.callable(self.fx.a, self.fx.b), |
| 1215 | ]: |
| 1216 | self.assert_meet(t, NoneType(), UninhabitedType()) |
| 1217 | |
| 1218 | def test_unbound_type(self) -> None: |
| 1219 | self.assert_meet(UnboundType("x"), UnboundType("x"), self.fx.anyt) |
nothing calls this directly
no test coverage detected