Skip to content

Commit f3b8439

Browse files
TST/CI: simplify geopandas downstream test to not use fiona (#46665)
1 parent cd1ab27 commit f3b8439

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

ci/deps/actions-38-downstream_compat.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dependencies:
6060
- cftime
6161
- dask
6262
- ipython
63-
- geopandas
63+
- geopandas-base
6464
- seaborn
6565
- scikit-learn
6666
- statsmodels

pandas/tests/test_downstream.py

+4-12
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import numpy as np
99
import pytest
1010

11-
from pandas.compat import is_platform_windows
1211
import pandas.util._test_decorators as td
1312

1413
import pandas as pd
@@ -224,20 +223,13 @@ def test_pandas_datareader():
224223
pandas_datareader.DataReader("F", "quandl", "2017-01-01", "2017-02-01")
225224

226225

227-
# importing from pandas, Cython import warning
228-
@pytest.mark.filterwarnings("ignore:can't resolve:ImportWarning")
229-
@pytest.mark.xfail(
230-
is_platform_windows(),
231-
raises=ImportError,
232-
reason="ImportError: the 'read_file' function requires the 'fiona' package, "
233-
"but it is not installed or does not import correctly",
234-
strict=False,
235-
)
236226
def test_geopandas():
237227

238228
geopandas = import_module("geopandas")
239-
fp = geopandas.datasets.get_path("naturalearth_lowres")
240-
assert geopandas.read_file(fp) is not None
229+
gdf = geopandas.GeoDataFrame(
230+
{"col": [1, 2, 3], "geometry": geopandas.points_from_xy([1, 2, 3], [1, 2, 3])}
231+
)
232+
assert gdf[["col", "geometry"]].geometry.x.equals(Series([1.0, 2.0, 3.0]))
241233

242234

243235
# Cython import warning

0 commit comments

Comments
 (0)