X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/dba3c2695c59fdb11825dbdf8f3b0ab6e0b368b2..53c23e62df9b182edf9e7ccf726acdcf8c25846f:/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)