def it_can_change_its_text(self, text_set_fixture):
        r, new_value, expected_xml = text_set_fixture
        run = _Run(r, None)

        run.text = new_value

        print("run._r.xml == %s" % repr(run._r.xml))
        print("expected_xml == %s" % repr(expected_xml))
        assert run._r.xml == expected_xml
예제 #2
0
 def insert_run_after(r, p, original_r):
     new_r = copy.deepcopy(original_r)
     r._r.addnext(new_r)
     return _Run(new_r, p)
예제 #3
0
 def text_set_fixture(self, request):
     r_cxml, new_value, expected_r_cxml = request.param
     run = _Run(element(r_cxml), None)
     expected_xml = xml(expected_r_cxml)
     return run, new_value, expected_xml
예제 #4
0
 def text_get_fixture(self):
     r = element('a:r/a:t"foobar"')
     run = _Run(r, None)
     return run, 'foobar'
예제 #5
0
 def hyperlink_fixture(self, _Hyperlink_, hlink_):
     r = element('a:r/a:rPr')
     rPr = r.rPr
     run = _Run(r, None)
     return run, rPr, _Hyperlink_, hlink_
예제 #6
0
 def font_fixture(self, Font_, font_):
     r = element('a:r/a:rPr')
     rPr = r.rPr
     run = _Run(r, None)
     return run, rPr, Font_, font_
예제 #7
0
 def it_can_change_its_text(self, r_cxml, new_value, expected_r_cxml):
     run = _Run(element(r_cxml), None)
     run.text = new_value
     assert run._r.xml == xml(expected_r_cxml)
예제 #8
0
 def text_get_fixture(self):
     r = element('a:r/a:t"foobar"')
     run = _Run(r, None)
     return run, "foobar"
예제 #9
0
 def hyperlink_fixture(self, _Hyperlink_, hlink_):
     r = element("a:r/a:rPr")
     rPr = r.rPr
     run = _Run(r, None)
     return run, rPr, _Hyperlink_, hlink_
예제 #10
0
 def font_fixture(self, Font_, font_):
     r = element("a:r/a:rPr")
     rPr = r.rPr
     run = _Run(r, None)
     return run, rPr, Font_, font_
예제 #11
0
 def text_set_fixture(self, request):
     r_cxml, new_value, expected_r_cxml = request.param
     run = _Run(element(r_cxml), None)
     expected_xml = xml(expected_r_cxml)
     return run, new_value, expected_xml