コード例 #1
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']")
    )
コード例 #2
0
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"))
コード例 #3
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']")
    )
コード例 #4
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']")
    )
コード例 #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']"))
コード例 #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']"))
コード例 #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']"))