Skip to content

Commit 91e4bee

Browse files
authored
Merge pull request #9726 from jklymak/fixpandas
FIX/TST: update tests for pandas 0.21
2 parents 5730794 + 3a4e72b commit 91e4bee

File tree

4 files changed

+15
-19
lines changed

4 files changed

+15
-19
lines changed

.appveyor.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ install:
8484
# if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends
8585
# https://github.com/conda-forge/conda-forge.github.io/issues/157#issuecomment-223536381
8686
#
87-
# n.b. pandas is pinned to <0.21 due to issue 9610
8887
- conda create -q -n test-environment python=%PYTHON_VERSION%
8988
msinttypes freetype=2.6 "libpng>=1.6.21,<1.7" zlib=1.2 tk=8.5
90-
pip setuptools numpy mock "pandas<0.21.0" sphinx tornado
89+
pip setuptools numpy mock pandas sphinx tornado
9190
- activate test-environment
9291
- echo %PYTHON_VERSION% %TARGET_ARCH%
9392
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ env:
5757
matrix:
5858
include:
5959
- python: 2.7
60-
env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS='pandas<0.21.0' NOSE=nose
60+
env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS=pandas NOSE=nose
6161
- python: 3.4
6262
env: PYTHON_ARGS=-OO
6363
- python: 3.6
64-
env: DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8 PANDAS='pandas<0.21.0'
64+
env: DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8 PANDAS=pandas
6565
- python: "nightly"
6666
env: PRE=--pre
6767
- os: osx

lib/matplotlib/tests/test_axes.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5049,6 +5049,8 @@ def test_broken_barh_empty():
50495049

50505050
def test_pandas_pcolormesh():
50515051
pd = pytest.importorskip('pandas')
5052+
from pandas.tseries import converter
5053+
converter.register()
50525054

50535055
time = pd.date_range('2000-01-01', periods=10)
50545056
depth = np.arange(20)
@@ -5060,6 +5062,8 @@ def test_pandas_pcolormesh():
50605062

50615063
def test_pandas_indexing_dates():
50625064
pd = pytest.importorskip('pandas')
5065+
from pandas.tseries import converter
5066+
converter.register()
50635067

50645068
dates = np.arange('2005-02', '2005-03', dtype='datetime64[D]')
50655069
values = np.sin(np.array(range(len(dates))))
@@ -5073,6 +5077,8 @@ def test_pandas_indexing_dates():
50735077

50745078
def test_pandas_errorbar_indexing():
50755079
pd = pytest.importorskip('pandas')
5080+
from pandas.tseries import converter
5081+
converter.register()
50765082

50775083
df = pd.DataFrame(np.random.uniform(size=(5, 4)),
50785084
columns=['x', 'y', 'xe', 'ye'],
@@ -5083,6 +5089,8 @@ def test_pandas_errorbar_indexing():
50835089

50845090
def test_pandas_indexing_hist():
50855091
pd = pytest.importorskip('pandas')
5092+
from pandas.tseries import converter
5093+
converter.register()
50865094

50875095
ser_1 = pd.Series(data=[1, 2, 2, 3, 3, 4, 4, 4, 4, 5])
50885096
ser_2 = ser_1.iloc[1:]
@@ -5093,6 +5101,8 @@ def test_pandas_indexing_hist():
50935101
def test_pandas_bar_align_center():
50945102
# Tests fix for issue 8767
50955103
pd = pytest.importorskip('pandas')
5104+
from pandas.tseries import converter
5105+
converter.register()
50965106

50975107
df = pd.DataFrame({'a': range(2), 'b': range(2)})
50985108

@@ -5105,21 +5115,6 @@ def test_pandas_bar_align_center():
51055115
fig.canvas.draw()
51065116

51075117

5108-
def test_pandas_bar_align_center():
5109-
# Tests fix for issue 8767
5110-
pd = pytest.importorskip('pandas')
5111-
5112-
df = pd.DataFrame({'a': range(2), 'b': range(2)})
5113-
5114-
fig, ax = plt.subplots(1)
5115-
5116-
rect = ax.barh(df.loc[df['a'] == 1, 'b'],
5117-
df.loc[df['a'] == 1, 'b'],
5118-
align='center')
5119-
5120-
fig.canvas.draw()
5121-
5122-
51235118
def test_axis_set_tick_params_labelsize_labelcolor():
51245119
# Tests fix for issue 4346
51255120
axis_1 = plt.subplot()

lib/matplotlib/tests/test_dates.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,8 @@ def test_date2num_dst_pandas():
446446
# Test for github issue #3896, but in date2num around DST transitions
447447
# with a timezone-aware pandas date_range object.
448448
pd = pytest.importorskip('pandas')
449+
from pandas.tseries import converter
450+
converter.register()
449451

450452
def tz_convert(*args):
451453
return pd.DatetimeIndex.tz_convert(*args).astype(object)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy