diff --git a/docs/documentation/sparks.rst b/docs/documentation/sparks.rst index 7d1b1e0..adc8b4e 100644 --- a/docs/documentation/sparks.rst +++ b/docs/documentation/sparks.rst @@ -36,8 +36,7 @@ With labels: .. pygal-code:: sparkline - from pygal.style import LightSolarizedStyle - chart = pygal.Line(style=LightSolarizedStyle) + chart = pygal.Line() chart.add('', [1, 3, 5, 16, 13, 3, 7]) chart.x_labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] chart.render_sparkline(show_x_labels=True, show_y_labels=True) diff --git a/pygal/test/test_config.py b/pygal/test/test_config.py index 48ab365..7b648bf 100644 --- a/pygal/test/test_config.py +++ b/pygal/test/test_config.py @@ -44,7 +44,7 @@ def test_config_behaviours(): assert len(q(".plot .series path")) == 1 assert len(q(".legend")) == 0 assert len(q(".x.axis .guides")) == 3 - assert len(q(".y.axis .guides")) == 21 + assert len(q(".y.axis .guides")) == 11 assert len(q(".dots")) == 3 assert q(".axis.x text").map(texts) == ['a', 'b', 'c'] @@ -175,7 +175,7 @@ def test_logarithmic(): assert len(q(".plot .series path")) == 1 assert len(q(".legend")) == 1 assert len(q(".x.axis .guides")) == 0 - assert len(q(".y.axis .guides")) == 51 + assert len(q(".y.axis .guides")) == 21 assert len(q(".dots")) == 3 @@ -211,7 +211,7 @@ def test_logarithmic_big_scale(): line = Line(logarithmic=True) line.add('_', [10 ** -10, 10 ** 10, 1]) q = line.render_pyquery() - assert len(q(".y.axis .guides")) == 41 + assert len(q(".y.axis .guides")) == 21 def test_value_formatter(): @@ -227,7 +227,7 @@ def test_logarithmic_small_scale(): line = Line(logarithmic=True) line.add('_', [1 + 10 ** 10, 3 + 10 ** 10, 2 + 10 ** 10]) q = line.render_pyquery() - assert len(q(".y.axis .guides")) == 21 + assert len(q(".y.axis .guides")) == 11 def test_human_readable(): diff --git a/pygal/test/test_date.py b/pygal/test/test_date.py index 2a99215..83db53d 100644 --- a/pygal/test/test_date.py +++ b/pygal/test/test_date.py @@ -35,17 +35,10 @@ def test_date(): assert list( map(lambda t: t.split(' ')[0], q(".axis.x text").map(texts))) == [ - '2013-01-03', - '2013-01-08', '2013-01-12', - '2013-01-17', - '2013-01-21', - '2013-01-26', - '2013-01-31', + '2013-01-24', '2013-02-04', - '2013-02-09', - '2013-02-14', - '2013-02-18'] + '2013-02-16'] def test_time(): @@ -84,17 +77,10 @@ def test_datetime(): assert list( map(lambda t: t.split(' ')[0], q(".axis.x text").map(texts))) == [ - '2013-01-03T09:00:00', - '2013-01-08T00:06:40', '2013-01-12T15:13:20', - '2013-01-17T06:20:00', - '2013-01-21T21:26:40', - '2013-01-26T12:33:20', - '2013-01-31T03:40:00', + '2013-01-24T05:00:00', '2013-02-04T18:46:40', - '2013-02-09T09:53:20', - '2013-02-14T01:00:00', - '2013-02-18T16:06:40'] + '2013-02-16T08:33:20'] def test_timedelta():