INNER CODE UNIT · Python

child_text

dotnet/sdk · .github/ci-quality-monitor/parse-test-results.py:10

def child_text(element, name):
    if element is None:
        return ""
    for child in element.iter():
        if local_name(child) == name:
            return child.text or ""
    return ""


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", "")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…