Browse Source

fixed testing problems

pull/335/head
cmoore12 9 years ago
parent
commit
67a81a9fd9
  1. 3
      pygal/test/test_bar.py
  2. 23
      pygal/test/test_gauge.py

3
pygal/test/test_bar.py

@ -37,6 +37,7 @@ def test_simple_bar():
def test_difference():
"""Tests the difference between labeled graphs and unlabeled graphs"""
bar = Bar(bar_values=False)
rng = [-3, -32, -39]
bar.add('test1', rng)
@ -52,6 +53,7 @@ def test_difference():
def test_bar_percent_difference():
"""Tests the difference between percent labeled graphs and unlabeled graphs"""
bar = Bar()
rng = [-3, -32, -39]
bar.add('test1', rng)
@ -68,6 +70,7 @@ def test_bar_percent_difference():
def test_chart_renders():
"""Tests that print values and percent values renders"""
line_chart = Bar(print_values=True, percent_values=True, print_values_position='top')
line_chart.title = 'Browser usage evolution (in %)'
line_chart.x_labels = map(str, range(2002, 2013))

23
pygal/test/test_gauge.py

@ -1,5 +1,28 @@
# -*- coding: utf-8 -*-
# This file is part of pygal
#
# A python svg graph plotting library
# Copyright © 2012-2016 Kozea
#
# This library is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with pygal. If not, see <http://www.gnu.org/licenses/>.
"""Gauge Chart related tests."""
from pygal import Gauge
def test_render():
"""Tests that a gauge plots"""
chart = Gauge()

Loading…
Cancel
Save