Skip to content

Commit

Permalink
Add a classname of pylint for testcases
Browse files Browse the repository at this point in the history
Quick fix for salabs/pylint_junit#8
  • Loading branch information
themanifold authored and rasjani committed Oct 27, 2020
1 parent 103035c commit 0316130
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pylint_junit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def on_set_current_module(self, module, filepath):
if self.current_module is not None and self.items[self.current_module].test_cases is not None:
stdout_line = "All checks passed for: {0}".format(self.current_filepath)
testcase_name = "{0}:0:0".format(self.current_module)
testcase = TestCase(testcase_name, stdout=stdout_line, file=self.current_filepath, line=0)
testcase = TestCase(testcase_name, classname='pylint', stdout=stdout_line, file=self.current_filepath, line=0)
self.items[self.current_module].test_cases.append(testcase)

self.current_module = module
Expand All @@ -43,7 +43,7 @@ def handle_message(self, msg):
stdout_line = u"{0}:{1}:{2}:{3}".format(msg.path, msg.line, msg.column, source_line)
stderr_line = u"{0}:{1}\n{2}".format(msg.msg_id, msg.msg, stdout_line)
testcase_name = u"{0}:{1}:{2}".format(msg.module, msg.line, msg.column)
testcase = TestCase(testcase_name, stdout=stdout_line, stderr=stderr_line, file=msg.path, line=msg.line, category=msg.category)
testcase = TestCase(testcase_name, classname='pylint', stdout=stdout_line, stderr=stderr_line, file=msg.path, line=msg.line, category=msg.category)
testcase.add_failure_info(message=msg.symbol, output=stderr_line)
self.items[self.current_module].test_cases.append(testcase)

Expand Down

0 comments on commit 0316130

Please sign in to comment.