8000 CLN: Check Warnings in test_graphics_others by TomAugspurger · Pull Request #13188 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

CLN: Check Warnings in test_graphics_others #13188

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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
8000 Loading
Diff view
Diff view
Prev Previous commit
COMPAT: For MPL deprecation
  • Loading branch information
TomAugspurger committed Jun 29, 2016
commit b466fc1437482d5ec5a74d9902968ff594fd7593
5 changes: 3 additions & 2 deletions pandas/tests/test_graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,9 @@ def _check_box_return_type(self, returned, return_type, expected_keys=None,
self.assertIsInstance(value.lines, dict)
elif return_type == 'dict':
line = value['medians'][0]
axes = line.axes if self.mpl_ge_1_5_0 else line.get_axes()
if check_ax_title:
self.assertEqual(line.get_axes().get_title(), key)
self.assertEqual(axes.get_title(), key)
else:
raise AssertionError

Expand Down Expand Up @@ -910,7 +911,7 @@ def test_hist_no_overlap(self):
subplot(122)
y.hist()
fig = gcf()
axes = fig.get_axes()
axes = fig.axes if self.mpl_ge_1_5_0 else fig.get_axes()
self.assertEqual(len(axes), 2)

@slow
Expand Down
8 changes: 5 additions & 3 deletions pandas/tests/test_graphics_others.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_hist_no_overlap(self):
subplot(122)
y.hist()
fig = gcf()
axes = fig.get_axes()
axes = fig.axes if self.mpl_ge_1_5_0 else fig.get_axes()
self.assertEqual(len(axes), 2)

@slow
Expand Down Expand Up @@ -242,11 +242,13 @@ def test_boxplot_legacy(self):
# passed ax should be used:
fig, ax = self.plt.subplots()
axes = df.boxplot('Col1', by='X', ax=ax)
self.assertIs(ax.get_axes(), axes)
ax_axes = ax.axes if self.mpl_ge_1_5_0 else ax.get_axes()
self.assertIs(ax_axes, axes)

fig, ax = self.plt.subplots()
axes = df.groupby('Y').boxplot(ax=ax, return_type='axes')
self.assertIs(ax.get_axes(), axes['A'])
ax_axes = ax.axes if self.mpl_ge_1_5_0 else ax.get_axes()
self.assertIs(ax_axes, axes['A'])

# Multiple columns with an ax argument should use same figure
fig, ax = self.plt.subplots()
Expand Down
0