(self)
| 251 | self.assertIn(black.TargetVersion.PY312, versions) |
| 252 | |
| 253 | def test_pep_696_version_detection(self) -> None: |
| 254 | source, _ = read_data("cases", "type_param_defaults") |
| 255 | samples = [ |
| 256 | source, |
| 257 | "type X[T=int] = float", |
| 258 | "type X[T:int=int]=int", |
| 259 | "type X[*Ts=int]=int", |
| 260 | "type X[*Ts=*int]=int", |
| 261 | "type X[**P=int]=int", |
| 262 | ] |
| 263 | for sample in samples: |
| 264 | root = black.lib2to3_parse(sample) |
| 265 | features = black.get_features_used(root) |
| 266 | self.assertIn(black.Feature.TYPE_PARAM_DEFAULTS, features) |
| 267 | |
| 268 | def test_python315_version_detection(self) -> None: |
| 269 | source, _ = read_data("cases", "python315") |
nothing calls this directly
no test coverage detected