|
6 | 6 | import pytest |
7 | 7 | import numpy as np |
8 | 8 |
|
9 | | -from larray.tests.common import needs_xlwings, TESTDATADIR |
| 9 | +from larray.tests.common import needs_xlwings |
10 | 10 | from larray import ndtest, open_excel, asarray, Axis, nan, ExcelReport |
11 | 11 | from larray.inout import xw_excel |
12 | 12 | from larray.example import load_example_data, EXAMPLE_EXCEL_TEMPLATES_DIR |
@@ -379,16 +379,16 @@ def test_excel_report_arrays(): |
379 | 379 | sheet_graphs = excel_report.new_sheet('Graphs2') |
380 | 380 | sheet_graphs.graphs_per_row = 2 |
381 | 381 | sheet_graphs.add_title('graphs_per_row = 2') |
382 | | - for combined_labels, subset in pop.items(('time', 'gender')): |
| 382 | + for combined_labels, subset in pop.items(('country', 'gender')): |
383 | 383 | title = ' - '.join([str(label) for label in combined_labels]) |
384 | 384 | sheet_graphs.add_graph(subset, title) |
385 | 385 |
|
386 | 386 | # testing add_graphs |
387 | 387 | sheet_graphs = excel_report.new_sheet('Graphs3') |
388 | 388 | sheet_graphs.add_title('add_graphs') |
389 | | - sheet_graphs.add_graphs({'Population of {gender} by country for the year {year}': pop}, |
390 | | - {'gender': pop.gender, 'year': pop.time}, |
391 | | - template='line', width=450, height=250, graphs_per_row=2) |
| 389 | + sheet_graphs.add_graphs({'Population for {country} - {gender}': pop}, |
| 390 | + {'gender': pop.gender, 'country': pop.country}, |
| 391 | + template='line', width=350, height=250, graphs_per_row=3) |
392 | 392 |
|
393 | 393 | # generate Excel file |
394 | 394 | fpath = 'test_excel_report_arrays.xlsx' |
|
0 commit comments