def find_level_returns_none_if_num_with_id_cannot_be_found():
    numbering = read_numbering_xml_element(xml_element("w:numbering"))
    assert_equal(None, numbering.find_level("47", "0"))
def list_is_ordered_if_formatted_as_decimal():
    numbering = read_numbering_xml_element(_sample_numbering_xml)
    assert_equal(True, numbering.find_level("47", "1").is_ordered)
def list_is_not_ordered_if_formatted_as_bullet():
    numbering = read_numbering_xml_element(_sample_numbering_xml)
    assert_equal(False, numbering.find_level("47", "0").is_ordered)
def level_includes_level_index():
    numbering = read_numbering_xml_element(_sample_numbering_xml)
    assert_equal("0", numbering.find_level("47", "0").level_index)
    assert_equal("1", numbering.find_level("47", "1").level_index)
Beispiel #5
0
def find_level_returns_none_if_level_cannot_be_found():
    numbering = read_numbering_xml_element(_sample_numbering_xml)
    assert_equal(None, numbering.find_level("47", "2"))
def _read_numbering_xml_element(element, styles=None):
    if styles is None:
        styles = Styles.EMPTY

    return read_numbering_xml_element(element, styles=styles)