def reads_run_with_style_name():
    assert_equal(
        document_matchers.run(style_name=document_matchers.equal_to("Emphasis")),
        read_document_matcher("r[style-name='Emphasis']")
    )
def equal_to_matcher_is_case_insensitive():
    matcher = document_matchers.equal_to("Heading 1")
    assert_equal(True, matcher.matches("heaDING 1"))
    assert_equal(False, matcher.matches("heaDING 2"))
def reads_paragraph_with_exact_style_name():
    assert_equal(
        document_matchers.paragraph(style_name=document_matchers.equal_to("Heading 1")),
        read_document_matcher("p[style-name='Heading 1']")
    )
def reads_table_with_style_name():
    assert_equal(
        document_matchers.table(style_name=document_matchers.equal_to("Normal Table")),
        read_document_matcher("table[style-name='Normal Table']")
    )
Beispiel #5
0
def reads_run_with_style_name():
    assert_equal(
        document_matchers.run(
            style_name=document_matchers.equal_to("Emphasis")),
        read_document_matcher("r[style-name='Emphasis']"))
Beispiel #6
0
def reads_paragraph_with_exact_style_name():
    assert_equal(
        document_matchers.paragraph(
            style_name=document_matchers.equal_to("Heading 1")),
        read_document_matcher("p[style-name='Heading 1']"))
Beispiel #7
0
def reads_table_with_style_name():
    assert_equal(
        document_matchers.table(
            style_name=document_matchers.equal_to("Normal Table")),
        read_document_matcher("table[style-name='Normal Table']"))