Skip to content

Commit

Permalink
Simplify series plotting test
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Nov 20, 2017
1 parent 9de60c1 commit ce932a6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pandas/tests/plotting/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
""" Test cases for Series.plot """


import itertools
from itertools import chain
import pytest

from datetime import datetime
Expand Down Expand Up @@ -333,8 +333,7 @@ def test_pie_series(self):
autopct='%.2f', fontsize=7)
pcts = ['{0:.2f}'.format(s * 100)
for s in series.values / float(series.sum())]
iters = [iter(series.index), iter(pcts)]
expected_texts = [next(it) for it in itertools.cycle(iters)]
expected_texts = list(chain.from_iterable(zip(series.index, pcts)))
self._check_text_labels(ax.texts, expected_texts)
for t in ax.texts:
assert t.get_fontsize() == 7
Expand Down

0 comments on commit ce932a6

Please sign in to comment.