Browse Source

cleanup, sorry for the premature pull request, but this is really the final time

pull/54/head
Christian Ledermann 11 years ago
parent
commit
d378139bc8
  1. 4
      pygal/graph/graph.py
  2. 1
      pygal/graph/horizontalbar.py
  3. 5
      pygal/test/test_graph.py

4
pygal/graph/graph.py

@ -369,8 +369,8 @@ class Graph(BaseGraph):
+ .3 * self.legend_font_size + .3 * self.legend_font_size
).text = truncated ).text = truncated
#as <a> is decorated with title I do not think we need title here #as <a> is decorated with title I do not think we need title here
#if truncated != title['title']: if truncated != title['title']:
# self.svg.node(legend, 'title').text = title['title'] self.svg.node(legend, 'title').text = title['title']
else: else:
truncated = truncate(title, truncation) truncated = truncate(title, truncation)
# Serious magical numbers here # Serious magical numbers here

1
pygal/graph/horizontalbar.py

@ -22,7 +22,6 @@ Horizontal bar graph
""" """
from pygal.graph.horizontal import HorizontalGraph from pygal.graph.horizontal import HorizontalGraph
from pygal.graph.bar import Bar from pygal.graph.bar import Bar
from pygal.util import cached_property
class HorizontalBar(HorizontalGraph, Bar): class HorizontalBar(HorizontalGraph, Bar):
"""Horizontal Bar graph""" """Horizontal Bar graph"""

5
pygal/test/test_graph.py

@ -43,10 +43,7 @@ def test_render_to_file(Chart, datas):
chart.render_to_file(file_name) chart.render_to_file(file_name)
with open(file_name) as f: with open(file_name) as f:
assert 'pygal' in f.read() assert 'pygal' in f.read()
if Chart == pygal.HorizontalBar: os.remove(file_name)
pass
else:
os.remove(file_name)
def test_render_to_png(Chart, datas): def test_render_to_png(Chart, datas):

Loading…
Cancel
Save