def test_as_text(mock_revision, mock_task): """ Test text export for ClangTidyIssue """ issue = ClangTidyIssue( mock_task(ClangTidyTask, "clang-tidy"), mock_revision, "test.cpp", "42", "51", "dummy-check", "dummy message withUppercaseChars", ) assert (issue.as_text( ) == "Warning: Dummy message withUppercaseChars [clang-tidy: dummy-check]")
def test_as_text(mock_revision): """ Test text export for ClangTidyIssue """ from code_review_bot.tasks.clang_tidy import ClangTidyIssue issue = ClangTidyIssue( "clang-tidy", mock_revision, "test.cpp", "42", "51", "dummy-check", "dummy message withUppercaseChars", ) assert (issue.as_text( ) == "Warning: Dummy message withUppercaseChars [clang-tidy: dummy-check]")
def test_as_text(mock_revision): """ Test text export for ClangTidyIssue """ from code_review_bot.tasks.clang_tidy import ClangTidyIssue issue = ClangTidyIssue( mock_revision, "test.cpp", "42", "51", "dummy-check", "dummy message withUppercaseChars", "error", ) issue.body = "Dummy body withUppercaseChars" assert ( issue.as_text() == "Error: Dummy message withUppercaseChars [clang-tidy: dummy-check]\n```\nDummy body withUppercaseChars\n```" )