INNER CODE UNIT · Python
test_definitions
dotnet/sdk · .github/ci-quality-monitor/parse-test-results.py:19
def test_definitions(root):
definitions = {}
for unit_test in root.iter():
if local_name(unit_test) != "UnitTest":
continue
test_id = unit_test.attrib.get("id")
method = next((node for node in unit_test.iter() if local_name(node) == "TestMethod"), None)
if test_id and method is not None:
class_name = method.attrib.get("className", "")
method_name = method.attrib.get("name", "")
definitions[test_id] = ".".join(part for part in (class_name, method_name) if part)
return definitions
def result_summary(root):
counters = next((node for node in root.iter() if local_name(node) == "Counters"), None)
if counters is not None:
return {