예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #9
0
 def cell(self):
     return _Cell(element('a:tc'), None)
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #15
0
 def cell(self):
     return _Cell(element('a:tc'), None)
예제 #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
예제 #17
0
 def cell(self):
     tc = a_tc().with_nsdecls().element
     return _Cell(tc, None)
예제 #18
0
 def cell(self):
     return _Cell(test_table_elements.cell, None)
예제 #19
0
 def cell(self):
     tc = a_tc().with_nsdecls().element
     return _Cell(tc, None)
예제 #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
예제 #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
예제 #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
예제 #23
0
 def anchor_get_fixture(self, request):
     tc_cxml, expected_value = request.param
     cell = _Cell(element(tc_cxml), None)
     return cell, expected_value
예제 #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
예제 #25
0
 def cell(self):
     return _Cell(test_table_elements.cell, None)
예제 #26
0
 def anchor_get_fixture(self, request):
     tc_cxml, expected_value = request.param
     cell = _Cell(element(tc_cxml), None)
     return cell, expected_value