diff --git a/.appveyor.yml b/.appveyor.yml index ade72a8fa6d7..af3d322e8eae 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -84,10 +84,9 @@ install: # if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends # https://github.com/conda-forge/conda-forge.github.io/issues/157#issuecomment-223536381 # - # n.b. pandas is pinned to <0.21 due to issue 9610 - conda create -q -n test-environment python=%PYTHON_VERSION% msinttypes freetype=2.6 "libpng>=1.6.21,<1.7" zlib=1.2 tk=8.5 - pip setuptools numpy mock "pandas<0.21.0" sphinx tornado + pip setuptools numpy mock pandas sphinx tornado - activate test-environment - echo %PYTHON_VERSION% %TARGET_ARCH% # pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124 diff --git a/.travis.yml b/.travis.yml index 23adcc584aeb..661c1ed9a4dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,11 +57,11 @@ env: matrix: include: - python: 2.7 - env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS='pandas<0.21.0' NOSE=nose + env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS=pandas NOSE=nose - python: 3.4 env: PYTHON_ARGS=-OO - python: 3.6 - env: DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8 PANDAS='pandas<0.21.0' + env: DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8 PANDAS=pandas - python: "nightly" env: PRE=--pre - os: osx diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 272e159322bf..c694ffa4f3ce 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -5049,6 +5049,8 @@ def test_broken_barh_empty(): def test_pandas_pcolormesh(): pd = pytest.importorskip('pandas') + from pandas.tseries import converter + converter.register() time = pd.date_range('2000-01-01', periods=10) depth = np.arange(20) @@ -5060,6 +5062,8 @@ def test_pandas_pcolormesh(): def test_pandas_indexing_dates(): pd = pytest.importorskip('pandas') + from pandas.tseries import converter + converter.register() dates = np.arange('2005-02', '2005-03', dtype='datetime64[D]') values = np.sin(np.array(range(len(dates)))) @@ -5073,6 +5077,8 @@ def test_pandas_indexing_dates(): def test_pandas_errorbar_indexing(): pd = pytest.importorskip('pandas') + from pandas.tseries import converter + converter.register() df = pd.DataFrame(np.random.uniform(size=(5, 4)), columns=['x', 'y', 'xe', 'ye'], @@ -5083,6 +5089,8 @@ def test_pandas_errorbar_indexing(): def test_pandas_indexing_hist(): pd = pytest.importorskip('pandas') + from pandas.tseries import converter + converter.register() ser_1 = pd.Series(data=[1, 2, 2, 3, 3, 4, 4, 4, 4, 5]) ser_2 = ser_1.iloc[1:] @@ -5093,6 +5101,8 @@ def test_pandas_indexing_hist(): def test_pandas_bar_align_center(): # Tests fix for issue 8767 pd = pytest.importorskip('pandas') + from pandas.tseries import converter + converter.register() df = pd.DataFrame({'a': range(2), 'b': range(2)}) @@ -5105,21 +5115,6 @@ def test_pandas_bar_align_center(): fig.canvas.draw() -def test_pandas_bar_align_center(): - # Tests fix for issue 8767 - pd = pytest.importorskip('pandas') - - df = pd.DataFrame({'a': range(2), 'b': range(2)}) - - fig, ax = plt.subplots(1) - - rect = ax.barh(df.loc[df['a'] == 1, 'b'], - df.loc[df['a'] == 1, 'b'], - align='center') - - fig.canvas.draw() - - def test_axis_set_tick_params_labelsize_labelcolor(): # Tests fix for issue 4346 axis_1 = plt.subplot() diff --git a/lib/matplotlib/tests/test_dates.py b/lib/matplotlib/tests/test_dates.py index 437482f5fa2e..41f71275b053 100644 --- a/lib/matplotlib/tests/test_dates.py +++ b/lib/matplotlib/tests/test_dates.py @@ -446,6 +446,8 @@ def test_date2num_dst_pandas(): # Test for github issue #3896, but in date2num around DST transitions # with a timezone-aware pandas date_range object. pd = pytest.importorskip('pandas') + from pandas.tseries import converter + converter.register() def tz_convert(*args): return pd.DatetimeIndex.tz_convert(*args).astype(object)