Prechádzať zdrojové kódy

minor fixes

Signed-off-by: Chiang <[email protected]>
Chiang 2 rokov pred
rodič
commit
ea298db291

+ 1 - 1
scripts/metrics/pytest_metrics_xml_to_csv.py

@@ -148,7 +148,7 @@ def parse_pytest_xmls_to_csv(full_xml_path, writer):
             logger.exception(f"KeyError when parsing xml file: {full_xml_path}. Check xml keys for changes. Printing"
                              f"attribs:\n{test.attrib}", exc)
             continue
-        if sig_owner in SIG_OWNER_CACHE:
+        if test_file_path in SIG_OWNER_CACHE:
             sig_owner = SIG_OWNER_CACHE[test_file_path]
         else:
             # Index 1 is the sig owner

+ 1 - 1
scripts/metrics/tests/test_pytest_metrics_xml_to_csv.py

@@ -73,7 +73,7 @@ class TestMetricsXMLtoCSV(unittest.TestCase):
             mock_entry
         ]
         mock_xml.findall.return_value = mock_testcases
-        mock_get_codeowners.return_value = [None, 'mock_codeowner']
+        mock_get_codeowners.return_value = (None, 'mock_codeowner', None)
         mock_parse.return_value.getroot.return_value = mock_xml
         mock_writer = mock.MagicMock()
         mock_xml_path = mock.MagicMock()