def test_comment_at_first_character_c_multi_never_ends(): """Expect CommentParseError if the comment never ends.""" text = cleandoc(""" /* * Hello * world /* """) with pytest.raises(CommentParseError): CCommentStyle.comment_at_first_character(text)
def test_comment_at_first_character_c_multi(): """Simple test for a multi-line C comment.""" text = cleandoc(""" /* * Hello * world */ Spam """) expected = cleandoc(""" /* * Hello * world */ """) assert CCommentStyle.comment_at_first_character(text) == expected