From 696d8548321142fc8fd5d9de0f91c1eb7b182b37 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Mon, 8 Apr 2013 14:49:22 +0200 Subject: [PATCH] Fix tox.ini --- pygal/test/test_graph.py | 8 ++++++-- tox.ini | 16 ++++------------ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/pygal/test/test_graph.py b/pygal/test/test_graph.py index f217ae5..b28086a 100644 --- a/pygal/test/test_graph.py +++ b/pygal/test/test_graph.py @@ -64,7 +64,7 @@ def test_render_to_png(Chart, datas): def test_metadata(Chart): chart = Chart() - v = range(1, 8) + v = range(7) if Chart == pygal.XY: v = map(lambda x: (x, x + 1), v) @@ -86,7 +86,11 @@ def test_metadata(Chart): 'Five', 'http://7.example.com/', 'Seven'): assert md in cut(q('desc'), 'text') - assert len(v) == len(q('.tooltip-trigger').siblings('.value')) + if Chart == pygal.Pie: + # Slices with value 0 are not rendered + assert len(v) - 1 == len(q('.tooltip-trigger').siblings('.value')) + else: + assert len(v) == len(q('.tooltip-trigger').siblings('.value')) def test_empty_lists(Chart): diff --git a/tox.ini b/tox.ini index 8c91004..d3a5fb0 100644 --- a/tox.ini +++ b/tox.ini @@ -6,16 +6,8 @@ deps = pytest pytest-cov pyquery - scipy + numpy -[testenv:py26] -commands=py.test [] --cov {envdir}/lib/python2.6/site-packages/pygal {envdir}/lib/python2.6/site-packages/pygal/test - -[testenv:py27] -commands=py.test [] --cov {envdir}/lib/python2.7/site-packages/pygal {envdir}/lib/python2.7/site-packages/pygal/test - -[testenv:py32] -commands=py.test [] --cov {envdir}/lib/python3.2/site-packages/pygal {envdir}/lib/python3.2/site-packages/pygal/test - -[testenv:py33] -commands=py.test [] --cov {envdir}/lib/python3.3/site-packages/pygal {envdir}/lib/python3.3/site-packages/pygal/test +commands= + pip install scipy + py.test [] --cov {envsitepackagesdir}/pygal {envsitepackagesdir}/pygal/test