X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/d7a28dd78631fb962da95fb2d2de0e18ca6754a4..9b2b048692f0bd642f38230b4e61c778a4653f91:/tests/test_format.py diff --git a/tests/test_format.py b/tests/test_format.py index 3a6cbc9..5a7b3bb 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -196,3 +196,10 @@ def test_power_op_newline() -> None: # requires line_length=0 source, expected = read_data("miscellaneous", "power_op_newline") assert_format(source, expected, mode=black.Mode(line_length=0)) + + +def test_type_comment_syntax_error() -> None: + """Test that black is able to format python code with type comment syntax errors.""" + source, expected = read_data("type_comments", "type_comment_syntax_error") + assert_format(source, expected) + black.assert_equivalent(source, expected)