Пример #1
0
def test_parse_refid_non_str():
    with pytest.raises(AssertionError):
        find_structs.parse_ref_id(1)
Пример #2
0
def test_parse_refid_empty_line():
    line = ""
    assert find_structs.parse_ref_id(line) == ""
Пример #3
0
def test_parse_refid_valid_close_function_double():
    line = '.refid= <ref xmlns:xsi="" refid="at91rm9200__wdt_8c_1a0f82b8fa55a637eab5b42397bb13ae6c"> refid</ref>,'
    assert (find_structs.parse_ref_id(line) ==
            "at91rm9200__wdt_8c_1a0f82b8fa55a637eab5b42397bb13ae6c")
Пример #4
0
def test_parse_refid_empty():
    line = '.refid= <ref xmlns:xsi="" refid</ref>,'
    assert find_structs.parse_ref_id(line) == ""
Пример #5
0
def test_parse_refid_valid_no_kind_ref():
    line = '.unlocked_ioctl = <ref xmlns:xsi="" refid="at91rm9200__wdt_8c_1a0f82b8fa55a637eab5b42397bb13ae6c"> at91_wdt_ioctl</ref>,'
    assert (find_structs.parse_ref_id(line) ==
            "at91rm9200__wdt_8c_1a0f82b8fa55a637eab5b42397bb13ae6c")