Esempio n. 1
0
    def it_can_change_its_text(self, text_set_fixture):
        p, value, expected_xml = text_set_fixture
        paragraph = _Paragraph(p, None)

        paragraph.text = value

        assert paragraph._element.xml == expected_xml
Esempio n. 2
0
    def it_can_change_its_text(self, text_set_fixture):
        p, value, expected_xml = text_set_fixture
        paragraph = _Paragraph(p, None)

        paragraph.text = value

        assert paragraph._element.xml == expected_xml
Esempio n. 3
0
    def it_knows_what_text_it_contains(self, text_get_fixture):
        p, expected_value = text_get_fixture
        paragraph = _Paragraph(p, None)

        text = paragraph.text

        assert text == expected_value
        assert is_unicode(text)
Esempio n. 4
0
    def it_knows_what_text_it_contains(self, text_get_fixture):
        p, expected_value = text_get_fixture
        paragraph = _Paragraph(p, None)

        text = paragraph.text

        assert text == expected_value
        assert is_unicode(text)
Esempio n. 5
0
 def paragraph(self, p_bldr):
     return _Paragraph(p_bldr.element, None)
Esempio n. 6
0
 def text_set_fixture(self, request):
     p_cxml, new_value, expected_p_cxml = request.param
     paragraph = _Paragraph(element(p_cxml), None)
     expected_xml = xml(expected_p_cxml)
     return paragraph, new_value, expected_xml
Esempio n. 7
0
 def text_get_fixture(self, request):
     p_cxml, expected_value = request.param
     paragraph = _Paragraph(element(p_cxml), None)
     return paragraph, expected_value
Esempio n. 8
0
 def runs_fixture(self):
     p_cxml = 'a:p/(a:r/a:t"Foo",a:r/a:t"Bar",a:r/a:t"Baz")'
     paragraph = _Paragraph(element(p_cxml), None)
     expected_text = ('Foo', 'Bar', 'Baz')
     return paragraph, expected_text
Esempio n. 9
0
 def clear_fixture(self, request):
     p_cxml, expected_p_cxml = request.param
     paragraph = _Paragraph(element(p_cxml), None)
     expected_xml = xml(expected_p_cxml)
     return paragraph, expected_xml
Esempio n. 10
0
 def line_break_fixture(self, request):
     cxml, expected_cxml = request.param
     paragraph = _Paragraph(element(cxml), None)
     expected_xml = xml(expected_cxml)
     return paragraph, expected_xml
Esempio n. 11
0
 def before_set_fixture(self, request):
     p_cxml, new_value, expected_p_cxml = request.param
     paragraph = _Paragraph(element(p_cxml), None)
     expected_xml = xml(expected_p_cxml)
     return paragraph, new_value, expected_xml
Esempio n. 12
0
 def before_get_fixture(self, request):
     p_cxml, expected_value = request.param
     paragraph = _Paragraph(element(p_cxml), None)
     return paragraph, expected_value
Esempio n. 13
0
 def paragraph(self, p_bldr):
     return _Paragraph(p_bldr.element, None)
Esempio n. 14
0
 def runs_fixture(self):
     p_cxml = 'a:p/(a:r/a:t"Foo",a:r/a:t"Bar",a:r/a:t"Baz")'
     paragraph = _Paragraph(element(p_cxml), None)
     expected_text = ("Foo", "Bar", "Baz")
     return paragraph, expected_text
Esempio n. 15
0
 def line_break_fixture(self, request):
     cxml, expected_cxml = request.param
     paragraph = _Paragraph(element(cxml), None)
     expected_xml = xml(expected_cxml)
     return paragraph, expected_xml
Esempio n. 16
0
 def clear_fixture(self, request):
     p_cxml, expected_p_cxml = request.param
     paragraph = _Paragraph(element(p_cxml), None)
     expected_xml = xml(expected_p_cxml)
     return paragraph, expected_xml