示例#1
0
 def test_ctor(self, NonVisualPictureProperties):
     graphic = NonVisualPictureProperties()
     xml = tostring(graphic.to_tree())
     expected = """
     <cNvPicPr />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#2
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
示例#3
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
示例#4
0
 def test_ctor(self, CalcProperties):
     calc = CalcProperties()
     xml = tostring(calc.to_tree())
     expected = """
        <calcPr calcId="124519" fullCalcOnLoad="1" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#5
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
示例#6
0
 def test_ctor(self, DataValidationList):
     dvs = DataValidationList()
     xml = tostring(dvs.to_tree())
     expected = """
     <dataValidations count="0" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#7
0
 def test_ctor(self, HyperlinkList):
     fut = HyperlinkList()
     xml = tostring(fut.to_tree())
     expected = """
     <hyperlinks />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#8
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
示例#9
0
 def test_ctor(self, BookView):
     view = BookView()
     xml = tostring(view.to_tree())
     expected = """
     <workbookView />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#10
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
示例#11
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
示例#12
0
 def test_ctor(self, GraphicData):
     graphic = GraphicData()
     xml = tostring(graphic.to_tree())
     expected = """
     <graphicData xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" uri="http://schemas.openxmlformats.org/drawingml/2006/chart" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#13
0
 def test_ctor(self, NonVisualDrawingProps):
     graphic = NonVisualDrawingProps(id=2, name="Chart 1")
     xml = tostring(graphic.to_tree())
     expected = """
      <cNvPr id="2" name="Chart 1"></cNvPr>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#14
0
 def test_ctor(self, ConnectorShape):
     fut = ConnectorShape()
     xml = tostring(fut.to_tree())
     expected = """
     <root />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#15
0
 def test_ctor(self, LineEndProperties):
     line = LineEndProperties()
     xml = tostring(line.to_tree())
     expected = """
     <end xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#16
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
示例#17
0
 def test_ctor(self, DashStop):
     line = DashStop()
     xml = tostring(line.to_tree())
     expected = """
     <ds xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" d="0" sp="0"></ds>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#18
0
 def test_ctor(self, FileSharing):
     share = FileSharing(readOnlyRecommended=True)
     xml = tostring(share.to_tree())
     expected = """
     <fileSharing readOnlyRecommended="1"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#19
0
 def test_ctor(self, DataValidation):
     dv = DataValidation()
     xml = tostring(dv.to_tree())
     expected = """
     <dataValidation allowBlank="0" showErrorMessage="1" showInputMessage="1" sqref="" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#20
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
示例#21
0
 def test_ctor(self, WorkbookProperties):
     props = WorkbookProperties()
     xml = tostring(props.to_tree())
     expected = """
     <workbookPr />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#22
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
示例#23
0
 def test_ctor(self, FileVersion):
     prop = FileVersion()
     xml = tostring(prop.to_tree())
     expected = """
     <fileVersion />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#24
0
 def test_ctor(self, CacheField):
     field = CacheField(name="ID")
     xml = tostring(field.to_tree())
     expected = """
     <cacheField databaseField="1" hierarchy="0" level="0" name="ID" sqlType="0" uniqueList="1"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#25
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
示例#26
0
 def test_ctor(self, WorksheetSource):
     ws = WorksheetSource(name="mydata")
     xml = tostring(ws.to_tree())
     expected = """
     <worksheetSource name="mydata"/>
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#27
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
示例#28
0
 def test_ctor(self, PictureOptions):
     picture = PictureOptions()
     xml = tostring(picture.to_tree())
     expected = """
      <pictureOptions />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff
示例#29
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
示例#30
0
 def test_ctor(self, PictureLocking):
     graphic = PictureLocking(noChangeAspect=True)
     xml = tostring(graphic.to_tree())
     expected = """
     <picLocks xmlns="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1" />
     """
     diff = compare_xml(xml, expected)
     assert diff is None, diff