Search in sources :

Example 1 with BlazeIssueParser

use of com.google.idea.blaze.base.issueparser.BlazeIssueParser in project intellij by bazelbuild.

the class PyIssueParserProviderTest method testParsePyTypeError.

@Test
public void testParsePyTypeError() {
    BlazeIssueParser blazeIssueParser = new BlazeIssueParser(parsers);
    IssueOutput issue = blazeIssueParser.parseIssue("File \"dataset.py\", line 109, in Dataset: " + "Name 'function' is not defined [name-error]");
    assertThat(issue).isNotNull();
    assertThat(issue.getCategory()).isEqualTo(Category.ERROR);
    assertThat(issue.getNavigatable()).isNotNull();
    assertThat(issue.getConsoleHyperlinkRange()).isEqualTo(TextRange.create("File \"".length(), "File \"dataset.py\", line 109".length()));
}
Also used : BlazeIssueParser(com.google.idea.blaze.base.issueparser.BlazeIssueParser) IssueOutput(com.google.idea.blaze.base.scope.output.IssueOutput) Test(org.junit.Test)

Aggregations

BlazeIssueParser (com.google.idea.blaze.base.issueparser.BlazeIssueParser)1 IssueOutput (com.google.idea.blaze.base.scope.output.IssueOutput)1 Test (org.junit.Test)1