diff --git a/pandas/tests/test_graphics.py b/pandas/tests/test_graphics.py index 5d2934d9705cd..454e8b68f7f8a 100644 --- a/pandas/tests/test_graphics.py +++ b/pandas/tests/test_graphics.py @@ -481,7 +481,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 = list(it.next() for it in itertools.cycle(iters)) + expected_texts = list(next(it) for it in itertools.cycle(iters)) self._check_text_labels(ax.texts, expected_texts) for t in ax.texts: self.assertEqual(t.get_fontsize(), 7)