Skip to content

TST: use types.api in plotting #13867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pandas/tests/plotting/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pandas import DataFrame
from pandas.compat import zip, iteritems, OrderedDict
from pandas.util.decorators import cache_readonly
import pandas.core.common as com
from pandas.types.api import is_list_like
import pandas.util.testing as tm
from pandas.util.testing import (ensure_clean,
assert_is_valid_plot_return_object)
Expand Down Expand Up @@ -157,7 +157,7 @@ def _check_visible(self, collections, visible=True):
"""
from matplotlib.collections import Collection
if not isinstance(collections,
Collection) and not com.is_list_like(collections):
Collection) and not is_list_like(collections):
collections = [collections]

for patch in collections:
Expand Down Expand Up @@ -242,7 +242,7 @@ def _check_text_labels(self, texts, expected):
expected : str or list-like which has the same length as texts
expected text label, or its list
"""
if not com.is_list_like(texts):
if not is_list_like(texts):
self.assertEqual(texts.get_text(), expected)
else:
labels = [t.get_text() for t in texts]
Expand Down
3 changes: 2 additions & 1 deletion pandas/tests/plotting/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,8 @@ def test_boxplot(self):

# different warning on py3
if not PY3:
axes = _check_plot_works(df.plot.box, subplots=True, logy=True)
with tm.assert_produces_warning(UserWarning):
axes = _check_plot_works(df.plot.box, subplots=True, logy=True)

self._check_axes_shape(axes, axes_num=3, layout=(1, 3))
self._check_ax_scales(axes, yaxis='log')
Expand Down