Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce45bea

Browse files
story645tacaswell
authored andcommitted
Merge pull request #9726 from jklymak/fixpandas
FIX/TST: update tests for pandas 0.21 Conflicts: .appveyor.yml conflicts due thrashing around pandas version pinning
1 parent 26c14a3 commit ce45bea

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
@@ -86,11 +86,10 @@ install:
8686
# if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends
8787
# https://github.com/conda-forge/conda-forge.github.io/issues/157#issuecomment-223536381
8888
#
89-
# n.b. pandas is pinned to <0.21 due to issue 9610
9089
- conda create -q -n test-environment python=%PYTHON_VERSION%
9190
pip setuptools numpy python-dateutil freetype=2.6 msinttypes "tk=8.5"
9291
pyparsing pytz tornado "libpng>=1.6.21,<1.7" "zlib=1.2" "cycler>=0.10"
93-
mock sphinx "pandas<0.21.0"
92+
mock sphinx pandas
9493
- activate test-environment
9594
- echo %PYTHON_VERSION% %TARGET_ARCH%
9695
- if %PYTHON_VERSION% == 2.7 conda install -q backports.functools_lru_cache

.travis.yml

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

lib/matplotlib/tests/test_axes.py

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

49964996
def test_pandas_pcolormesh():
49974997
pd = pytest.importorskip('pandas')
4998+
from pandas.tseries import converter
4999+
converter.register()
49985000

49995001
time = pd.date_range('2000-01-01', periods=10)
50005002
depth = np.arange(20)
@@ -5006,6 +5008,8 @@ def test_pandas_pcolormesh():
50065008

50075009
def test_pandas_indexing_dates():
50085010
pd = pytest.importorskip('pandas')
5011+
from pandas.tseries import converter
5012+
converter.register()
50095013

50105014
dates = np.arange('2005-02', '2005-03', dtype='datetime64[D]')
50115015
values = np.sin(np.array(range(len(dates))))
@@ -5019,6 +5023,8 @@ def test_pandas_indexing_dates():
50195023

50205024
def test_pandas_errorbar_indexing():
50215025
pd = pytest.importorskip('pandas')
5026+
from pandas.tseries import converter
5027+
converter.register()
50225028

50235029
df = pd.DataFrame(np.random.uniform(size=(5, 4)),
50245030
columns=['x', 'y', 'xe', 'ye'],
@@ -5029,6 +5035,8 @@ def test_pandas_errorbar_indexing():
50295035

50305036
def test_pandas_indexing_hist():
50315037
pd = pytest.importorskip('pandas')
5038+
from pandas.tseries import converter
5039+
converter.register()
50325040

50335041
ser_1 = pd.Series(data=[1, 2, 2, 3, 3, 4, 4, 4, 4, 5])
50345042
ser_2 = ser_1.iloc[1:]
@@ -5039,6 +5047,8 @@ def test_pandas_indexing_hist():
50395047
def test_pandas_bar_align_center():
50405048
# Tests fix for issue 8767
50415049
pd = pytest.importorskip('pandas')
5050+
from pandas.tseries import converter
5051+
converter.register()
50425052

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

@@ -5051,21 +5061,6 @@ def test_pandas_bar_align_center():
50515061
fig.canvas.draw()
50525062

50535063

5054-
def test_pandas_bar_align_center():
5055-
# Tests fix for issue 8767
5056-
pd = pytest.importorskip('pandas')
5057-
5058-
df = pd.DataFrame({'a': range(2), 'b': range(2)})
5059-
5060-
fig, ax = plt.subplots(1)
5061-
5062-
rect = ax.barh(df.loc[df['a'] == 1, 'b'],
5063-
df.loc[df['a'] == 1, 'b'],
5064-
align='center')
5065-
5066-
fig.canvas.draw()
5067-
5068-
50695064
def test_axis_set_tick_params_labelsize_labelcolor():
50705065
# Tests fix for issue 4346
50715066
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)