Skip to content

Commit 19c8996

Browse files
committed
Merge pull request #8949 from jreback/graphics
BLD/TST: skip mpl 1.2.1 tests (GH8947)
2 parents 2de0084 + 96d45c3 commit 19c8996

File tree

4 files changed

+76
-35
lines changed

4 files changed

+76
-35
lines changed

.travis.yml

+14
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ matrix:
3838
- BUILD_TYPE=conda
3939
- JOB_NAME: "27_nslow"
4040
- DOC_BUILD=true # if rst files were changed, build docs in parallel with tests
41+
- python: 2.7
42+
env:
43+
- NOSE_ARGS="slow and not network and not disabled"
44+
- FULL_DEPS=true
45+
- JOB_TAG=_SLOW
46+
- BUILD_TYPE=conda
47+
- JOB_NAME: "27_slow"
4148
- python: 3.3
4249
env:
4350
- NOSE_ARGS="not slow and not disabled"
@@ -76,6 +83,13 @@ matrix:
7683
- CLIPBOARD_GUI=qt4
7784
- BUILD_TYPE=pydata
7885
- JOB_NAME: "32_nslow"
86+
- python: 2.7
87+
env:
88+
- NOSE_ARGS="slow and not network and not disabled"
89+
- FULL_DEPS=true
90+
- JOB_TAG=_SLOW
91+
- BUILD_TYPE=conda
92+
- JOB_NAME: "27_slow"
7993
- python: 2.7
8094
env:
8195
- EXPERIMENTAL=true

ci/requirements-2.7_LOCALE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ xlrd=0.9.2
77
numpy=1.7.1
88
cython=0.19.1
99
bottleneck=0.8.0
10-
matplotlib=1.3.0
10+
matplotlib=1.2.1
1111
patsy=0.1.0
1212
sqlalchemy=0.8.1
1313
html5lib=1.0b2

ci/requirements-2.7_SLOW.txt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
dateutil
2+
pytz
3+
numpy
4+
cython
5+
matplotlib
6+
scipy
7+
patsy
8+
statsmodels
9+
xlwt
10+
openpyxl
11+
xlsxwriter
12+
xlrd
13+
numexpr
14+
pytables
15+
sqlalchemy
16+
lxml
17+
boto
18+
bottleneck
19+
psycopg2
20+
pymysql
21+
html5lib
22+
beautiful-soup
23+
httplib2
24+
python-gflags
25+
google-api-python-client

pandas/tests/test_graphics.py

+36-34
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ def setUp(self):
7777
else:
7878
self.bp_n_objects = 8
7979

80+
self.mpl_le_1_2_1 = str(mpl.__version__) <= LooseVersion('1.2.1')
81+
self.mpl_ge_1_3_1 = str(mpl.__version__) >= LooseVersion('1.3.1')
82+
8083
def tearDown(self):
8184
tm.close()
8285

@@ -443,7 +446,6 @@ def setUp(self):
443446
import matplotlib as mpl
444447
mpl.rcdefaults()
445448

446-
self.mpl_le_1_2_1 = str(mpl.__version__) <= LooseVersion('1.2.1')
447449
self.ts = tm.makeTimeSeries()
448450
self.ts.name = 'ts'
449451

@@ -818,12 +820,13 @@ def test_hist_kwargs(self):
818820
self._check_text_labels(ax.yaxis.get_label(), 'Degree')
819821
tm.close()
820822

821-
ax = self.ts.plot(kind='hist', orientation='horizontal')
822-
self._check_text_labels(ax.xaxis.get_label(), 'Degree')
823-
tm.close()
823+
if self.mpl_ge_1_3_1:
824+
ax = self.ts.plot(kind='hist', orientation='horizontal')
825+
self._check_text_labels(ax.xaxis.get_label(), 'Degree')
826+
tm.close()
824827

825-
ax = self.ts.plot(kind='hist', align='left', stacked=True)
826-
tm.close()
828+
ax = self.ts.plot(kind='hist', align='left', stacked=True)
829+
tm.close()
827830

828831
@slow
829832
def test_hist_kde_color(self):
@@ -961,9 +964,6 @@ def setUp(self):
961964
import matplotlib as mpl
962965
mpl.rcdefaults()
963966

964-
self.mpl_le_1_2_1 = str(mpl.__version__) <= LooseVersion('1.2.1')
965-
self.mpl_ge_1_3_1 = str(mpl.__version__) >= LooseVersion('1.3.1')
966-
967967
self.tdf = tm.makeTimeDataFrame()
968968
self.hexbin_df = DataFrame({"A": np.random.uniform(size=20),
969969
"B": np.random.uniform(size=20),
@@ -2141,31 +2141,33 @@ def test_hist_df_coord(self):
21412141
self._check_box_coord(axes[2].patches, expected_y=np.array([0, 0, 0, 0, 0]),
21422142
expected_h=np.array([6, 7, 8, 9, 10]))
21432143

2144-
# horizontal
2145-
ax = df.plot(kind='hist', bins=5, orientation='horizontal')
2146-
self._check_box_coord(ax.patches[:5], expected_x=np.array([0, 0, 0, 0, 0]),
2147-
expected_w=np.array([10, 9, 8, 7, 6]))
2148-
self._check_box_coord(ax.patches[5:10], expected_x=np.array([0, 0, 0, 0, 0]),
2149-
expected_w=np.array([8, 8, 8, 8, 8]))
2150-
self._check_box_coord(ax.patches[10:], expected_x=np.array([0, 0, 0, 0, 0]),
2151-
expected_w=np.array([6, 7, 8, 9, 10]))
2152-
2153-
ax = df.plot(kind='hist', bins=5, stacked=True, orientation='horizontal')
2154-
self._check_box_coord(ax.patches[:5], expected_x=np.array([0, 0, 0, 0, 0]),
2155-
expected_w=np.array([10, 9, 8, 7, 6]))
2156-
self._check_box_coord(ax.patches[5:10], expected_x=np.array([10, 9, 8, 7, 6]),
2157-
expected_w=np.array([8, 8, 8, 8, 8]))
2158-
self._check_box_coord(ax.patches[10:], expected_x=np.array([18, 17, 16, 15, 14]),
2159-
expected_w=np.array([6, 7, 8, 9, 10]))
2160-
2161-
axes = df.plot(kind='hist', bins=5, stacked=True,
2162-
subplots=True, orientation='horizontal')
2163-
self._check_box_coord(axes[0].patches, expected_x=np.array([0, 0, 0, 0, 0]),
2164-
expected_w=np.array([10, 9, 8, 7, 6]))
2165-
self._check_box_coord(axes[1].patches, expected_x=np.array([0, 0, 0, 0, 0]),
2166-
expected_w=np.array([8, 8, 8, 8, 8]))
2167-
self._check_box_coord(axes[2].patches, expected_x=np.array([0, 0, 0, 0, 0]),
2168-
expected_w=np.array([6, 7, 8, 9, 10]))
2144+
if self.mpl_ge_1_3_1:
2145+
2146+
# horizontal
2147+
ax = df.plot(kind='hist', bins=5, orientation='horizontal')
2148+
self._check_box_coord(ax.patches[:5], expected_x=np.array([0, 0, 0, 0, 0]),
2149+
expected_w=np.array([10, 9, 8, 7, 6]))
2150+
self._check_box_coord(ax.patches[5:10], expected_x=np.array([0, 0, 0, 0, 0]),
2151+
expected_w=np.array([8, 8, 8, 8, 8]))
2152+
self._check_box_coord(ax.patches[10:], expected_x=np.array([0, 0, 0, 0, 0]),
2153+
expected_w=np.array([6, 7, 8, 9, 10]))
2154+
2155+
ax = df.plot(kind='hist', bins=5, stacked=True, orientation='horizontal')
2156+
self._check_box_coord(ax.patches[:5], expected_x=np.array([0, 0, 0, 0, 0]),
2157+
expected_w=np.array([10, 9, 8, 7, 6]))
2158+
self._check_box_coord(ax.patches[5:10], expected_x=np.array([10, 9, 8, 7, 6]),
2159+
expected_w=np.array([8, 8, 8, 8, 8]))
2160+
self._check_box_coord(ax.patches[10:], expected_x=np.array([18, 17, 16, 15, 14]),
2161+
expected_w=np.array([6, 7, 8, 9, 10]))
2162+
2163+
axes = df.plot(kind='hist', bins=5, stacked=True,
2164+
subplots=True, orientation='horizontal')
2165+
self._check_box_coord(axes[0].patches, expected_x=np.array([0, 0, 0, 0, 0]),
2166+
expected_w=np.array([10, 9, 8, 7, 6]))
2167+
self._check_box_coord(axes[1].patches, expected_x=np.array([0, 0, 0, 0, 0]),
2168+
expected_w=np.array([8, 8, 8, 8, 8]))
2169+
self._check_box_coord(axes[2].patches, expected_x=np.array([0, 0, 0, 0, 0]),
2170+
expected_w=np.array([6, 7, 8, 9, 10]))
21692171

21702172
@slow
21712173
def test_hist_df_legacy(self):

0 commit comments

Comments
 (0)