def test_singleline_comments_many_python(code_string, expected_count): """Checks that it finds many singleline comments""" assert comments.count_singleline_python_comment(code_string) == expected_count
def test_singleline_comments_zero_or_one_python(code_string, expected_count): """Checks that it finds zero or one Python comments""" assert comments.count_singleline_python_comment(code_string) == expected_count
def test_singleline_python_comments_mixed(code_string, expected_count): """Check that it can find singleline Python comments in mixtures.""" count_of_singleline_python_comments, _ = comments.count_singleline_python_comment( code_string ) assert count_of_singleline_python_comments == expected_count
def test_singleline_python_comments_many(code_string, expected_count): """Check that it finds many Python singleline comments.""" count_of_singleline_python_comments, _ = comments.count_singleline_python_comment( code_string ) assert count_of_singleline_python_comments == expected_count
def test_singleline_python_comments_zero_or_one(code_string, expected_count): """Check that it finds zero or one Python comments.""" count_of_singleline_python_comments, _ = comments.count_singleline_python_comment( code_string ) assert count_of_singleline_python_comments == expected_count
def test_singleline_python_comments_mixed(code_string, expected_count): """Checks that it can find multiline comments in mixtures""" assert comments.count_singleline_python_comment(code_string) == expected_count