Пример #1
0
 def test_ctor(self, Level):
     level = Level()
     xml = tostring(level.to_tree())
     expected = """
     <lvl />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #2
0
 def test_ctor(self, SystemColor):
     colors = SystemColor()
     xml = tostring(colors.to_tree())
     expected = """
     <sysClr xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" val="windowText"></sysClr>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #3
0
 def test_ctor(self, RGBPercent):
     colors = RGBPercent(r=30, g=40, b=20)
     xml = tostring(colors.to_tree())
     expected = """
     <rgbClr b="20" g="40" r="30" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #4
0
 def test_ctor(self, SmartTagList):
     smart_tags = SmartTagList()
     xml = tostring(smart_tags.to_tree())
     expected = """
     <smartTagTypes />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #5
0
 def test_ctor(self, TrendlineLabel):
     trendline = TrendlineLabel()
     xml = tostring(trendline.to_tree())
     expected = """
     <trendlineLbl></trendlineLbl>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #6
0
 def test_ctor(self, ChartRelation):
     rel = ChartRelation('rId1')
     xml = tostring(rel.to_tree())
     expected = """
     <c:chart xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:id="rId1"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #7
0
 def test_ctor(self, WebPublishObjectList):
     objs = WebPublishObjectList()
     xml = tostring(objs.to_tree())
     expected = """
     <webPublishingObjects />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #8
0
 def test_ctor(self, IconFilter):
     flt = IconFilter(iconSet="3Flags")
     xml = tostring(flt.to_tree())
     expected = """
     <iconFilter iconSet="3Flags"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #9
0
 def test_ctor(self, ColorFilter):
     flt = ColorFilter()
     xml = tostring(flt.to_tree())
     expected = """
     <colorFilter />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #10
0
 def test_ctor(self, TableColumn):
     col = TableColumn(id=1, name="Column1")
     xml = tostring(col.to_tree())
     expected = """
     <tableColumn id="1" name="Column1"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #11
0
 def test_ctor(self, SortState):
     sort = SortState(ref="A1:D5")
     xml = tostring(sort.to_tree())
     expected = """
     <sortState ref="A1:D5" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #12
0
 def test_ctor(self, TableStyleInfo):
     info = TableStyleInfo(name="TableStyleMedium12")
     xml = tostring(info.to_tree())
     expected = """
     <tableStyleInfo name="TableStyleMedium12" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #13
0
 def test_ctor(self, FileExtension):
     ext = FileExtension(ContentType="application/xml", Extension="xml")
     xml = tostring(ext.to_tree())
     expected = """
     <Default ContentType="application/xml" Extension="xml"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #14
0
 def test_ctor(self, MultiLevelStrData):
     multidata = MultiLevelStrData()
     xml = tostring(multidata.to_tree())
     expected = """
     <multiLvlStrData />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #15
0
 def test_ctor(self, CellStyleList):
     cell_style = CellStyleList()
     xml = tostring(cell_style.to_tree())
     expected = """
     <cellXfs count="0"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #16
0
 def test_ctor(self, DynamicFilter):
     flt = DynamicFilter(type="aboveAverage")
     xml = tostring(flt.to_tree())
     expected = """
     <dynamicFilter type="aboveAverage"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #17
0
 def test_ctor(self, CellStyle):
     cell_style = CellStyle(xfId=0)
     xml = tostring(cell_style.to_tree())
     expected = """
     <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #18
0
 def test_ctor(self, CustomFilter):
     fut = CustomFilter(operator="greaterThanOrEqual", val="0.2")
     xml = tostring(fut.to_tree())
     expected = """
     <customFilter operator="greaterThanOrEqual" val="0.2" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #19
0
 def test_ctor(self, WebPublishObject):
     obj = WebPublishObject(id=1, divId="main", destinationFile="www")
     xml = tostring(obj.to_tree())
     expected = """
     <webPublishingObject destinationFile="www" divId="main" id="1" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #20
0
 def test_ctor(self, CustomFilters):
     fut = CustomFilters(_and=True)
     xml = tostring(fut.to_tree())
     expected = """
     <customFilters and="1" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #21
0
 def test_ctor(self, WebPublishing):
     web = WebPublishing()
     xml = tostring(web.to_tree())
     expected = """
     <webPublishing targetScreenSize="800x600" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #22
0
 def test_ctor(self, Top10):
     flt = Top10(percent=1, val=5, filterVal=6)
     xml = tostring(flt.to_tree())
     expected = """
     <top10 percent="1" val="5" filterVal="6"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #23
0
 def test_ctor(self, SmartTagProperties):
     smart_tags = SmartTagProperties()
     xml = tostring(smart_tags.to_tree())
     expected = """
     <smartTagPr />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #24
0
 def test_ctor(self, DateGroupItem):
     flt = DateGroupItem(dateTimeGrouping="day", year=2006, month=1, day=2)
     xml = tostring(flt.to_tree())
     expected = """
     <dateGroupItem year="2006" month="1" day="2" dateTimeGrouping="day"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #25
0
 def test_ctor(self, SchemeColor):
     sclr = SchemeColor(val="tx1")
     xml = tostring(sclr.to_tree())
     expected = """
     <schemeClr xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" val="tx1" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #26
0
 def test_ctor(self, Filters):
     flt = Filters(calendarType="gregorian")
     xml = tostring(flt.to_tree())
     expected = """
     <filters calendarType="gregorian"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #27
0
 def test_ctor(self, HSLColor):
     colors = HSLColor(hue=50, sat=10, lum=90)
     xml = tostring(colors.to_tree())
     expected = """
     <hslClr hue="50" lum="90" sat="10" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #28
0
 def test_ctor(self, AutoFilter):
     af = AutoFilter('A2:A3')
     expected = """
     <autoFilter ref="A2:A3" />
     """
     xml = tostring(af.to_tree())
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #29
0
 def test_ctor(self, WorkbookProtection):
     propt = WorkbookProtection()
     xml = tostring(propt.to_tree())
     expected = """
     <workbookPr />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
Пример #30
0
 def test_ctor(self, RelativeRect):
     fill = RelativeRect(10, 15, 20, 25)
     xml = tostring(fill.to_tree())
     expected = """
     <rect xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" b="25" l="10" r="20" t="15" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff