Browse Source

Adding failing test to demonstrate issue with time_series plot x axis labels

pull/8/head
Jason R. Coombs 14 years ago
parent
commit
7a9e2bbaa3
  1. 17
      tests/test_time_series.py

17
tests/test_time_series.py

@ -0,0 +1,17 @@
from svg.charts import time_series
def test_field_width():
"""
cking reports in a comment on PyPI that the X-axis labels all
bunch up on the left. This tests confirms the bug and tests for its
correctness.
"""
g = time_series.Plot({})
g.timescale_divisions = '4 hours'
g.stagger_x_labels = True
g.x_label_format = '%d-%b %H:%M'
g.add_data({'data': ['2005-12-21T00:00:00', 20, '2005-12-22T00:00:00', 21], 'title': 'series 1'})
g.burn()
assert g.field_width() > 1
Loading…
Cancel
Save