From 08905f25f566124899dac5abf95f8d59e2d56f33 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 22 Feb 2021 18:42:07 +0100 Subject: [PATCH] Epic bug in json output wtf :| --- package_linter.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package_linter.py b/package_linter.py index 335cec6..09269d6 100755 --- a/package_linter.py +++ b/package_linter.py @@ -271,7 +271,11 @@ class TestSuite(): if "ignore" in options and self.name in options["ignore"]: continue - reports += list(test(self)) + this_test_reports = list(test(self)) + for report in this_test_reports: + report.test_name = test.__qualname__ + + reports += this_test_reports # Display part @@ -297,8 +301,7 @@ class TestSuite(): _print("") for report in reports: - test_name = test.__qualname__ - tests_reports[report_type(report)].append((test_name, report)) + tests_reports[report_type(report)].append((report.test_name, report)) def run_single_test(self, test):