Skip to content

Commit ada6834

Browse files
committed
skips
1 parent 33c9e04 commit ada6834

File tree

7 files changed

+31
-2
lines changed

7 files changed

+31
-2
lines changed

Diff for: pandas/tests/frame/test_rank.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
2+
import pytest
23
from datetime import timedelta, datetime
34
from distutils.version import LooseVersion
45
from numpy import nan
@@ -195,6 +196,7 @@ def test_rank_axis(self):
195196
def test_rank_methods_frame(self):
196197
tm.skip_if_no_package('scipy', min_version='0.13',
197198
app='scipy.stats.rankdata')
199+
pytest.importorskip('scipy.stats.special')
198200
import scipy
199201
from scipy.stats import rankdata
200202

Diff for: pandas/tests/plotting/common.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def _ok_for_gaussian_kde(kind):
3939
from scipy.stats import gaussian_kde # noqa
4040
except ImportError:
4141
return False
42-
return True
42+
43+
return plotting._compat._mpl_ge_1_5_0()
4344

4445

4546
class TestPlotBase(object):

Diff for: pandas/tests/plotting/test_datetimelike.py

+2
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,8 @@ def test_secondary_y_ts(self):
610610

611611
@pytest.mark.slow
612612
def test_secondary_kde(self):
613+
if not self.mpl_ge_1_5_0:
614+
pytest.skip("mpl is not supported")
613615
tm._skip_if_no_scipy()
614616
_skip_if_no_scipy_gaussian_kde()
615617

Diff for: pandas/tests/plotting/test_frame.py

+10
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,9 @@ def test_boxplot_subplots_return_type(self):
12891289
def test_kde_df(self):
12901290
tm._skip_if_no_scipy()
12911291
_skip_if_no_scipy_gaussian_kde()
1292+
if not self.mpl_ge_1_5_0:
1293+
pytest.skip("mpl is not supported")
1294+
12921295
df = DataFrame(randn(100, 4))
12931296
ax = _check_plot_works(df.plot, kind='kde')
12941297
expected = [pprint_thing(c) for c in df.columns]
@@ -1310,6 +1313,9 @@ def test_kde_df(self):
13101313
def test_kde_missing_vals(self):
13111314
tm._skip_if_no_scipy()
13121315
_skip_if_no_scipy_gaussian_kde()
1316+
if not self.mpl_ge_1_5_0:
1317+
pytest.skip("mpl is not supported")
1318+
13131319
df = DataFrame(np.random.uniform(size=(100, 4)))
13141320
df.loc[0, 0] = np.nan
13151321
_check_plot_works(df.plot, kind='kde')
@@ -1834,6 +1840,8 @@ def test_hist_colors(self):
18341840
def test_kde_colors(self):
18351841
tm._skip_if_no_scipy()
18361842
_skip_if_no_scipy_gaussian_kde()
1843+
if not self.mpl_ge_1_5_0:
1844+
pytest.skip("mpl is not supported")
18371845

18381846
from matplotlib import cm
18391847

@@ -1857,6 +1865,8 @@ def test_kde_colors(self):
18571865
def test_kde_colors_and_styles_subplots(self):
18581866
tm._skip_if_no_scipy()
18591867
_skip_if_no_scipy_gaussian_kde()
1868+
if not self.mpl_ge_1_5_0:
1869+
pytest.skip("mpl is not supported")
18601870

18611871
from matplotlib import cm
18621872
default_colors = self._maybe_unpack_cycler(self.plt.rcParams)

Diff for: pandas/tests/plotting/test_series.py

+12
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,9 @@ def test_plot_fails_with_dupe_color_and_style(self):
571571

572572
@pytest.mark.slow
573573
def test_hist_kde(self):
574+
if not self.mpl_ge_1_5_0:
575+
pytest.skip("mpl is not supported")
576+
574577
_, ax = self.plt.subplots()
575578
ax = self.ts.plot.hist(logy=True, ax=ax)
576579
self._check_ax_scales(ax, yaxis='log')
@@ -596,6 +599,9 @@ def test_hist_kde(self):
596599
def test_kde_kwargs(self):
597600
tm._skip_if_no_scipy()
598601
_skip_if_no_scipy_gaussian_kde()
602+
if not self.mpl_ge_1_5_0:
603+
pytest.skip("mpl is not supported")
604+
599605
from numpy import linspace
600606
_check_plot_works(self.ts.plot.kde, bw_method=.5,
601607
ind=linspace(-100, 100, 20))
@@ -611,6 +617,9 @@ def test_kde_kwargs(self):
611617
def test_kde_missing_vals(self):
612618
tm._skip_if_no_scipy()
613619
_skip_if_no_scipy_gaussian_kde()
620+
if not self.mpl_ge_1_5_0:
621+
pytest.skip("mpl is not supported")
622+
614623
s = Series(np.random.uniform(size=50))
615624
s[0] = np.nan
616625
axes = _check_plot_works(s.plot.kde)
@@ -638,6 +647,9 @@ def test_hist_kwargs(self):
638647

639648
@pytest.mark.slow
640649
def test_hist_kde_color(self):
650+
if not self.mpl_ge_1_5_0:
651+
pytest.skip("mpl is not supported")
652+
641653
_, ax = self.plt.subplots()
642654
ax = self.ts.plot.hist(logy=True, bins=10, color='b', ax=ax)
643655
self._check_ax_scales(ax, yaxis='log')

Diff for: pandas/tests/series/test_rank.py

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class TestSeriesRank(TestData):
2929

3030
def test_rank(self):
3131
tm._skip_if_no_scipy()
32+
pytest.importorskip('scipy.stats.special')
3233
from scipy.stats import rankdata
3334

3435
self.ts[::2] = np.nan
@@ -248,6 +249,7 @@ def _check(s, expected, method='average'):
248249
def test_rank_methods_series(self):
249250
tm.skip_if_no_package('scipy', min_version='0.13',
250251
app='scipy.stats.rankdata')
252+
pytest.importorskip('scipy.stats.special')
251253
import scipy
252254
from scipy.stats import rankdata
253255

Diff for: pandas/tests/test_resample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,7 @@ def test_resample_dtype_preservation(self):
16881688

16891689
def test_resample_dtype_coerceion(self):
16901690

1691-
pytest.importorskip('scipy')
1691+
pytest.importorskip('scipy.interpolate')
16921692

16931693
# GH 16361
16941694
df = {"a": [1, 3, 1, 4]}

0 commit comments

Comments
 (0)