Browse Source

Fighting versus git

pull/63/head
Jean-Marc Martins 11 years ago
parent
commit
e226aa5405
  1. 1
      pygal/graph/__init__.py
  2. 6
      pygal/test/test_config.py
  3. 4
      pygal/test/test_graph.py

1
pygal/graph/__init__.py

@ -38,5 +38,6 @@ CHARTS_NAMES = [
'Gauge', 'Gauge',
'DateY', 'DateY',
'Worldmap', 'Worldmap',
'SupranationalWorldmap',
'Histogram' 'Histogram'
] ]

6
pygal/test/test_config.py

@ -17,7 +17,8 @@
# You should have received a copy of the GNU Lesser General Public License # You should have received a copy of the GNU Lesser General Public License
# along with pygal. If not, see <http://www.gnu.org/licenses/>. # along with pygal. If not, see <http://www.gnu.org/licenses/>.
from pygal import ( from pygal import (
Line, Dot, Pie, Radar, Config, Bar, Funnel, Worldmap, Histogram, Gauge) Line, Dot, Pie, Radar, Config, Bar, Funnel, Worldmap,
SupranationalWorldmap, Histogram, Gauge)
from pygal._compat import u from pygal._compat import u
from pygal.test.utils import texts from pygal.test.utils import texts
from pygal.test import pytest_generate_tests, make_data from pygal.test import pytest_generate_tests, make_data
@ -259,7 +260,8 @@ def test_no_data():
def test_include_x_axis(Chart): def test_include_x_axis(Chart):
chart = Chart() chart = Chart()
if Chart in (Pie, Radar, Funnel, Dot, Gauge, Worldmap, Histogram): if Chart in (Pie, Radar, Funnel, Dot, Gauge, Worldmap,
SupranationalWorldmap, Histogram):
return return
if not chart.cls._dual: if not chart.cls._dual:
data = 100, 200, 150 data = 100, 200, 150

4
pygal/test/test_graph.py

@ -70,7 +70,7 @@ def test_metadata(Chart):
v = range(7) v = range(7)
if Chart == pygal.XY: if Chart == pygal.XY:
v = list(map(lambda x: (x, x + 1), v)) v = list(map(lambda x: (x, x + 1), v))
elif Chart == pygal.Worldmap: elif Chart == pygal.Worldmap or Chart == pygal.SupranationalWorldmap:
v = list(map(lambda x: x, i18n.COUNTRIES)) v = list(map(lambda x: x, i18n.COUNTRIES))
chart.add('Serie with metadata', [ chart.add('Serie with metadata', [
@ -94,7 +94,7 @@ def test_metadata(Chart):
if Chart == pygal.Pie: if Chart == pygal.Pie:
# Slices with value 0 are not rendered # Slices with value 0 are not rendered
assert len(v) - 1 == len(q('.tooltip-trigger').siblings('.value')) assert len(v) - 1 == len(q('.tooltip-trigger').siblings('.value'))
elif Chart != pygal.Worldmap: elif Chart != pygal.Worldmap and Chart != pygal.SupranationalWorldmap:
# Tooltip are not working on worldmap # Tooltip are not working on worldmap
assert len(v) == len(q('.tooltip-trigger').siblings('.value')) assert len(v) == len(q('.tooltip-trigger').siblings('.value'))

Loading…
Cancel
Save