()
| 84 | |
| 85 | |
| 86 | def test_patma_invalid() -> None: |
| 87 | source, expected = read_data("miscellaneous", "pattern_matching_invalid") |
| 88 | mode = black.Mode(target_versions={black.TargetVersion.PY310}) |
| 89 | with pytest.raises(black.parsing.InvalidInput) as exc_info: |
| 90 | assert_format(source, expected, mode, minimum_version=(3, 10)) |
| 91 | |
| 92 | exc_info.match( |
| 93 | re.escape( |
| 94 | "Cannot parse for target version Python 3.10: 10:11\n" |
| 95 | " case a := b:\n" |
| 96 | " ^\n" |
| 97 | "ParseError: bad input" |
| 98 | ) |
| 99 | ) |
nothing calls this directly
no test coverage detected