def test_comment_skip_common_indent(): prefix = CommentPrefix('#') got = prefix.comment([' foo', ' bar']) assert got == [' #foo', ' # bar']
def test_comment_idempotent(): prefix = CommentPrefix('#') got = prefix.comment(['#foo', '#bar']) assert got == ['#foo', '#bar']