当前位置: 首页>>代码示例>>Python>>正文


Python BarChartWriter.write方法代码示例

本文整理汇总了Python中openpyxl.writer.charts.BarChartWriter.write方法的典型用法代码示例。如果您正苦于以下问题:Python BarChartWriter.write方法的具体用法?Python BarChartWriter.write怎么用?Python BarChartWriter.write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在openpyxl.writer.charts.BarChartWriter的用法示例。


在下文中一共展示了BarChartWriter.write方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_serialised

# 需要导入模块: from openpyxl.writer.charts import BarChartWriter [as 别名]
# 或者: from openpyxl.writer.charts.BarChartWriter import write [as 别名]
 def test_serialised(self, bar_chart_2):
     """Check the serialised file against sample"""
     cw = BarChartWriter(bar_chart_2)
     xml = cw.write()
     tree = fromstring(xml)
     chart_schema.assertValid(tree)
     expected_file = os.path.join(DATADIR, "writer", "expected", "BarChart.xml")
     with open(expected_file) as expected:
         diff = compare_xml(xml, expected.read())
         assert diff is None, diff
开发者ID:adammorris,项目名称:openpyxl,代码行数:12,代码来源:test_chart_writer.py

示例2: test_serialised

# 需要导入模块: from openpyxl.writer.charts import BarChartWriter [as 别名]
# 或者: from openpyxl.writer.charts.BarChartWriter import write [as 别名]
 def test_serialised(self, bar_chart, datadir):
     """Check the serialised file against sample"""
     cw = BarChartWriter(bar_chart)
     xml = cw.write()
     tree = fromstring(xml)
     chart_schema.assertValid(tree)
     datadir.chdir()
     with open("BarChart.xml") as expected:
         diff = compare_xml(xml, expected.read())
         assert diff is None, diff
开发者ID:Hitachi-Data-Systems,项目名称:org-chart-builder,代码行数:12,代码来源:test_bar.py


注:本文中的openpyxl.writer.charts.BarChartWriter.write方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。