Esempio n. 1
0
def test_passed():
    xml_tree = structures.parse_xunit_report(xunit_report_with_failure)
    root = xml_tree.getroot()
    good_testcase_el = structures.find_cases(root)[0]
    assert passed(good_testcase_el)

    bad_testcase_el = structures.find_cases(root)[1]
    assert not passed(bad_testcase_el)
Esempio n. 2
0
def _get_test_id(path):
    xml_tree = structures.parse_xunit_report(path)
    root = xml_tree.getroot()
    first_testcase = structures.find_cases(root)[0]
    test_id = structures.case_id(first_testcase)
    assert test_id.label == "cat[0]"
    expected_id = "functional.test_toolbox.TestForTool_cat.test_tool_000000"
    assert test_id.id == expected_id
    assert test_id.num == 0
Esempio n. 3
0
def _get_test_id(path):
    xml_tree = structures.parse_xunit_report(path)
    root = xml_tree.getroot()
    first_testcase = structures.find_cases(root)[0]
    test_id = structures.case_id(first_testcase)
    assert test_id.label == "cat[0]"
    expected_id = "functional.test_toolbox.TestForTool_cat.test_tool_000000"
    assert test_id.id == expected_id
    assert test_id.num == 0