X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/d7a28dd78631fb962da95fb2d2de0e18ca6754a4..3decbd6db9f120e8d7c8fa86b5b2f64f7861da0c:/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)