X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/d7a28dd78631fb962da95fb2d2de0e18ca6754a4..db3668a381e82866269ff25cb4cd11d2a53d009a:/tests/test_format.py?ds=sidebyside 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)