Ejemplo n.º 1
0
 def xml_fixture(self, request):
     enum_member, cat_count, ser_count, snippet_name = request.param
     chart_type = getattr(XL_CHART_TYPE, enum_member)
     chart_data = make_category_chart_data(cat_count, str, ser_count)
     xml_writer = _PieChartXmlWriter(chart_type, chart_data)
     expected_xml = snippet_text(snippet_name)
     return xml_writer, expected_xml
Ejemplo n.º 2
0
 def xml_fixture(self, request):
     enum_member, cat_count, ser_count, snippet_name = request.param
     chart_type = getattr(XL_CHART_TYPE, enum_member)
     chart_data = make_category_chart_data(cat_count, ser_count)
     xml_writer = _PieChartXmlWriter(chart_type, chart_data)
     expected_xml = snippet_text(snippet_name)
     return xml_writer, expected_xml
Ejemplo n.º 3
0
    def it_can_generate_xml_for_a_pie_chart(
        self, enum_member, cat_count, ser_count, snippet_name
    ):
        chart_type = getattr(XL_CHART_TYPE, enum_member)
        chart_data = make_category_chart_data(cat_count, str, ser_count)
        xml_writer = _PieChartXmlWriter(chart_type, chart_data)

        assert xml_writer.xml == snippet_text(snippet_name)
Ejemplo n.º 4
0
 def xml_fixture(self, request):
     series_data_seq = make_series_data_seq(cat_count=3, ser_count=1)
     xml_writer = _PieChartXmlWriter(XL_CHART_TYPE.PIE, series_data_seq)
     expected_xml = snippet_text('3x1-pie')
     return xml_writer, expected_xml
Ejemplo n.º 5
0
 def xml_fixture(self, request):
     series_data_seq = make_series_data_seq(cat_count=3, ser_count=1)
     xml_writer = _PieChartXmlWriter(XL_CHART_TYPE.PIE, series_data_seq)
     expected_xml = snippet_text('3x1-pie')
     return xml_writer, expected_xml