Skip to content

Commit d6fe725

Browse files
committed
TST: test that we work in downstream packages
1 parent a31c96d commit d6fe725

File tree

4 files changed

+73
-1
lines changed

4 files changed

+73
-1
lines changed

ci/requirements-2.7.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
source activate pandas
44

5-
echo "install 27"
5+
echo "install 27 BUILD_TEST"
66

77
conda install -n pandas -c conda-forge feather-format

ci/requirements-2.7_BUILD_TEST.pip

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
xarray
2+
geopandas
3+
dask
4+
seaborn
5+
pandas_gbq
6+
pandas_datareader
7+
statsmodels

ci/requirements-2.7_BUILD_TEST.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
source activate pandas
4+
5+
echo "install 27"
6+
7+
conda install -n pandas -c conda-forge pyarrow

pandas/tests/test_downstream.py

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
"""
2+
Testing that we work in the downstream packages
3+
"""
4+
import pytest
5+
from pandas import DataFrame
6+
7+
8+
@pytest.fixture
9+
def df():
10+
return DataFrame({'A': [1, 2, 3]})
11+
12+
13+
def test_dask(df):
14+
15+
dask = pytest.importorskip('dask') # noqa
16+
17+
import dask.dataframe as dd
18+
19+
ddf = dd.from_pandas(df)
20+
assert ddf.A is not None
21+
assert ddf.compute()
22+
23+
24+
def test_xarray(df):
25+
26+
xarray = pytest.importorskip('xarray') # noqa
27+
28+
assert df.to_xarray() is not None
29+
30+
31+
def test_statsmodels(df):
32+
33+
statsmodels = pytest.importorskip('statsmodels') # noqa
34+
35+
36+
def test_seaborn(df):
37+
38+
seaborn = pytest.importorskip('seaborn') # noqa
39+
40+
41+
def test_pandas_gbq(df):
42+
43+
pandas_gbq = pytest.importorskip('pandas-gbq') # noqa
44+
45+
46+
def test_pandas_datareader(df):
47+
48+
pandas_datareader = pytest.importorskip('pandas-datareader') # noqa
49+
50+
51+
def test_geopandas(df):
52+
53+
geopandas = pytest.importorskip('geopandas') # noqa
54+
55+
56+
def test_pyarrow(df):
57+
58+
pyarrow = pytest.importorskip('pyarrow') # noqa

0 commit comments

Comments
 (0)