Ejemplo n.º 1
0
 def anchor_get_fixture(self, request):
     anchor, mso_anchor_idx = request.param
     tc_bldr = a_tc().with_nsdecls()
     if anchor is not None:
         tcPr_bldr = a_tcPr().with_anchor(anchor)
         tc_bldr.with_child(tcPr_bldr)
     tc = tc_bldr.element
     cell = _Cell(tc, None)
     return cell, mso_anchor_idx
Ejemplo n.º 2
0
 def anchor_get_fixture(self, request):
     anchor, mso_anchor_idx = request.param
     tc_bldr = a_tc().with_nsdecls()
     if anchor is not None:
         tcPr_bldr = a_tcPr().with_anchor(anchor)
         tc_bldr.with_child(tcPr_bldr)
     tc = tc_bldr.element
     cell = _Cell(tc, None)
     return cell, mso_anchor_idx
Ejemplo n.º 3
0
 def anchor_set_fixture(self, request):
     def tc_with_anchor_bldr(anchor):
         tc_bldr = a_tc().with_nsdecls()
         if anchor is not None:
             tcPr_bldr = a_tcPr()
             if anchor != '':
                 tcPr_bldr.with_anchor(anchor)
             tc_bldr.with_child(tcPr_bldr)
         return tc_bldr
     before_anchor, mso_anchor_idx, after_anchor = request.param
     tc = tc_with_anchor_bldr(before_anchor).element
     cell = _Cell(tc, None)
     tc_with_anchor_xml = tc_with_anchor_bldr(after_anchor).xml()
     return cell, mso_anchor_idx, tc_with_anchor_xml
Ejemplo n.º 4
0
 def anchor_set_fixture(self, request):
     def tc_with_anchor_bldr(anchor):
         tc_bldr = a_tc().with_nsdecls()
         if anchor is not None:
             tcPr_bldr = a_tcPr()
             if anchor != '':
                 tcPr_bldr.with_anchor(anchor)
             tc_bldr.with_child(tcPr_bldr)
         return tc_bldr
     before_anchor, mso_anchor_idx, after_anchor = request.param
     tc = tc_with_anchor_bldr(before_anchor).element
     cell = _Cell(tc, None)
     tc_with_anchor_xml = tc_with_anchor_bldr(after_anchor).xml()
     return cell, mso_anchor_idx, tc_with_anchor_xml
Ejemplo n.º 5
0
 def margin_get_fixture(self, request):
     mar_vals, expected_vals = request.param
     marL, marR, marT, marB = mar_vals
     margin_left, margin_right, margin_top, margin_bottom = expected_vals
     tcPr_bldr = a_tcPr()
     if marL is not None:
         tcPr_bldr.with_marL(marL)
     if marR is not None:
         tcPr_bldr.with_marR(marR)
     if marT is not None:
         tcPr_bldr.with_marT(marT)
     if marB is not None:
         tcPr_bldr.with_marB(marB)
     tc = a_tc().with_nsdecls().with_child(tcPr_bldr).element
     cell = _Cell(tc, None)
     return cell, margin_left, margin_right, margin_top, margin_bottom
Ejemplo n.º 6
0
 def margin_get_fixture(self, request):
     mar_vals, expected_vals = request.param
     marL, marR, marT, marB = mar_vals
     margin_left, margin_right, margin_top, margin_bottom = expected_vals
     tcPr_bldr = a_tcPr()
     if marL is not None:
         tcPr_bldr.with_marL(marL)
     if marR is not None:
         tcPr_bldr.with_marR(marR)
     if marT is not None:
         tcPr_bldr.with_marT(marT)
     if marB is not None:
         tcPr_bldr.with_marB(marB)
     tc = a_tc().with_nsdecls().with_child(tcPr_bldr).element
     cell = _Cell(tc, None)
     return cell, margin_left, margin_right, margin_top, margin_bottom
Ejemplo n.º 7
0
    def margin_set_fixture(self, request):

        def tc_bldr_with(marX):
            marL, marR, marT, marB = marX
            tcPr_bldr = a_tcPr()
            if marL is not None:
                tcPr_bldr.with_marL(marL)
            if marR is not None:
                tcPr_bldr.with_marR(marR)
            if marT is not None:
                tcPr_bldr.with_marT(marT)
            if marB is not None:
                tcPr_bldr.with_marB(marB)
            return a_tc().with_nsdecls().with_child(tcPr_bldr)

        before_vals, after_vals = request.param
        tc = tc_bldr_with(before_vals).element
        cell = _Cell(tc, None)

        marL, marR, marT, marB = after_vals

        tc_with_marX_xml = tc_bldr_with(after_vals).xml()

        return cell, marL, marR, marT, marB, tc_with_marX_xml
Ejemplo n.º 8
0
    def margin_set_fixture(self, request):

        def tc_bldr_with(marX):
            marL, marR, marT, marB = marX
            tcPr_bldr = a_tcPr()
            if marL is not None:
                tcPr_bldr.with_marL(marL)
            if marR is not None:
                tcPr_bldr.with_marR(marR)
            if marT is not None:
                tcPr_bldr.with_marT(marT)
            if marB is not None:
                tcPr_bldr.with_marB(marB)
            return a_tc().with_nsdecls().with_child(tcPr_bldr)

        before_vals, after_vals = request.param
        tc = tc_bldr_with(before_vals).element
        cell = _Cell(tc, None)

        marL, marR, marT, marB = after_vals

        tc_with_marX_xml = tc_bldr_with(after_vals).xml()

        return cell, marL, marR, marT, marB, tc_with_marX_xml
Ejemplo n.º 9
0
 def cell(self):
     return _Cell(element('a:tc'), None)
Ejemplo n.º 10
0
 def text_set_fixture(self, request):
     tc_cxml, new_text, expected_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_cxml)
     return cell, new_text, expected_xml
Ejemplo n.º 11
0
 def margin_raises_fixture(self, request):
     margin_prop_name = request.param
     cell = _Cell(element('a:tc'), None)
     val_of_invalid_type = 'foobar'
     return cell, margin_prop_name, val_of_invalid_type
Ejemplo n.º 12
0
 def margin_set_fixture(self, request):
     tc_cxml, margin_prop_name, new_value, expected_tc_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_tc_cxml)
     return cell, margin_prop_name, new_value, expected_xml
Ejemplo n.º 13
0
 def margin_get_fixture(self, request):
     tc_cxml, margin_prop_name, expected_value = request.param
     cell = _Cell(element(tc_cxml), None)
     return cell, margin_prop_name, expected_value
Ejemplo n.º 14
0
 def anchor_set_fixture(self, request):
     tc_cxml, new_value, expected_tc_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_tc_cxml)
     return cell, new_value, expected_xml
Ejemplo n.º 15
0
 def cell(self):
     return _Cell(element('a:tc'), None)
Ejemplo n.º 16
0
 def margin_get_fixture(self, request):
     tc_cxml, margin_prop_name, expected_value = request.param
     cell = _Cell(element(tc_cxml), None)
     return cell, margin_prop_name, expected_value
Ejemplo n.º 17
0
 def cell(self):
     tc = a_tc().with_nsdecls().element
     return _Cell(tc, None)
Ejemplo n.º 18
0
 def cell(self):
     return _Cell(test_table_elements.cell, None)
Ejemplo n.º 19
0
 def cell(self):
     tc = a_tc().with_nsdecls().element
     return _Cell(tc, None)
Ejemplo n.º 20
0
 def margin_raises_fixture(self, request):
     margin_prop_name = request.param
     cell = _Cell(element('a:tc'), None)
     val_of_invalid_type = 'foobar'
     return cell, margin_prop_name, val_of_invalid_type
Ejemplo n.º 21
0
 def anchor_set_fixture(self, request):
     tc_cxml, new_value, expected_tc_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_tc_cxml)
     return cell, new_value, expected_xml
Ejemplo n.º 22
0
 def text_set_fixture(self, request):
     tc_cxml, new_text, expected_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_cxml)
     return cell, new_text, expected_xml
Ejemplo n.º 23
0
 def anchor_get_fixture(self, request):
     tc_cxml, expected_value = request.param
     cell = _Cell(element(tc_cxml), None)
     return cell, expected_value
Ejemplo n.º 24
0
 def margin_set_fixture(self, request):
     tc_cxml, margin_prop_name, new_value, expected_tc_cxml = request.param
     cell = _Cell(element(tc_cxml), None)
     expected_xml = xml(expected_tc_cxml)
     return cell, margin_prop_name, new_value, expected_xml
Ejemplo n.º 25
0
 def cell(self):
     return _Cell(test_table_elements.cell, None)
Ejemplo n.º 26
0
 def anchor_get_fixture(self, request):
     tc_cxml, expected_value = request.param
     cell = _Cell(element(tc_cxml), None)
     return cell, expected_value