Browse Source

Test new 'show_only_major_dots' option

pull/116/head
Clément Plasse 11 years ago
parent
commit
aa18bc8133
  1. 8
      pygal/test/test_line.py

8
pygal/test/test_line.py

@ -92,3 +92,11 @@ def test_not_equal_x_labels():
assert len(q(".axis.x")) == 1
assert q(".axis.x text").map(texts) == ['0', '1', '2', '3', '4', '5', '6',
'7', '8', '9', '10']
def test_only_major_dots():
line = Line(show_only_major_dots=True, x_labels_major_every=3)
line.add('test', range(12))
line.x_labels = map(str, range(12))
q = line.render_pyquery()
assert len(q(".dots")) == 4

Loading…
Cancel
Save