Browse Source

Include tests on secondary axis

pull/39/merge
Florian Mounier 12 years ago
parent
commit
6da43afacb
  1. 6
      pygal/test/__init__.py

6
pygal/test/__init__.py

@ -43,7 +43,7 @@ def pytest_generate_tests(metafunc):
]) ])
def make_data(chart, datas, secondary=False): def make_data(chart, datas):
def get(data): def get(data):
if isinstance(chart, pygal.XY): if isinstance(chart, pygal.XY):
if isinstance(chart, pygal.DateY): if isinstance(chart, pygal.DateY):
@ -52,8 +52,8 @@ def make_data(chart, datas, secondary=False):
return data return data
return cut(data) return cut(data)
for data in datas: for i, data in enumerate(datas):
chart.add(data[0], chart.add(data[0],
get(data[1]), get(data[1]),
secondary=secondary) secondary=bool(i % 2))
return chart return chart

Loading…
Cancel
Save