Skip to content

TST: Skip failing boxplot tests on mpl 1.4+ #8398

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
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
12 changes: 12 additions & 0 deletions pandas/tests/test_graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
import pandas.tools.plotting as plotting


def _skip_if_mpl_14_or_dev_boxplot():
# GH 8382
# Boxplot failures on 1.4 and 1.4.1
# Don't need try / except since that's done at class level
import matplotlib
if matplotlib.__version__ in ('1.4.0', '1.5.x'):
raise nose.SkipTest("Matplotlib Regression in 1.4 and current dev.")


def _skip_if_no_scipy_gaussian_kde():
try:
import scipy
Expand Down Expand Up @@ -1790,6 +1799,7 @@ def test_bar_log_subplots(self):

@slow
def test_boxplot(self):
_skip_if_mpl_14_or_dev_boxplot()
df = self.hist_df
series = df['height']
numeric_cols = df._get_numeric_data().columns
Expand Down Expand Up @@ -1823,6 +1833,7 @@ def test_boxplot(self):

@slow
def test_boxplot_vertical(self):
_skip_if_mpl_14_or_dev_boxplot()
df = self.hist_df
series = df['height']
numeric_cols = df._get_numeric_data().columns
Expand Down Expand Up @@ -1982,6 +1993,7 @@ def _check_ax_limits(col, ax):

@slow
def test_boxplot_empty_column(self):
_skip_if_mpl_14_or_dev_boxplot()
df = DataFrame(np.random.randn(20, 4))
df.loc[:, 0] = np.nan
_check_plot_works(df.boxplot, return_type='axes')
Expand Down