Skip to content

Commit 857225e

Browse files
authored
MAINT: Change doctest env (geopandas#3644)
1 parent bce5015 commit 857225e

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
pytest -v -r a --color=yes --cov=geopandas --cov-append --cov-report term-missing --cov-report xml geopandas/io/tests/test_sql.py | tee /dev/stderr | if grep SKIPPED >/dev/null;then echo "TESTS SKIPPED, FAILING" && exit 1;fi
9696
9797
- name: Test docstrings
98-
if: contains(matrix.env, '311-pd22.yaml') && contains(matrix.os, 'ubuntu')
98+
if: contains(matrix.env, '313-latest.yaml') && contains(matrix.os, 'ubuntu')
9999
run: |
100100
pytest -v --color=yes --doctest-only geopandas --ignore=geopandas/datasets
101101

geopandas/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,7 +2996,7 @@ def geom_equals(self, other, align=None):
29962996
:align: center
29972997
29982998
>>> polygon = Polygon([(0, 0), (2, 2), (0, 2)])
2999-
>>> s.geom_equals(polygon)
2999+
>>> s.geom_equals(polygon, align=True)
30003000
0 True
30013001
1 False
30023002
2 False
@@ -3572,7 +3572,7 @@ def overlaps(self, other, align=None):
35723572
:align: center
35733573
35743574
>>> polygon = Polygon([(0, 0), (1, 0), (1, 1), (0, 1)])
3575-
>>> s.overlaps(polygon)
3575+
>>> s.overlaps(polygon, align=True)
35763576
0 True
35773577
1 True
35783578
2 False
@@ -3800,7 +3800,7 @@ def within(self, other, align=None):
38003800
:align: center
38013801
38023802
>>> polygon = Polygon([(0, 0), (2, 2), (0, 2)])
3803-
>>> s.within(polygon)
3803+
>>> s.within(polygon, align=True)
38043804
0 True
38053805
1 True
38063806
2 False

geopandas/io/tests/test_file.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,6 @@ def test_read_file(engine, nybb_filename):
593593
# url to zip file
594594
"https://raw.githubusercontent.com/geopandas/geopandas/"
595595
"main/geopandas/tests/data/nybb_16a.zip",
596-
# url to zipfile without extension
597-
"https://geonode.goosocean.org/download/480",
598596
# url to web service
599597
"https://demo.pygeoapi.io/stable/collections/obs/items",
600598
],
@@ -604,6 +602,20 @@ def test_read_file_url(engine, url):
604602
assert isinstance(gdf, geopandas.GeoDataFrame)
605603

606604

605+
@pytest.mark.web
606+
@pytest.mark.parametrize(
607+
"url",
608+
[
609+
# url to zipfile without extension
610+
"https://geonode.goosocean.org/download/480",
611+
],
612+
)
613+
@pytest.mark.xfail(reason="SSL certificate issue")
614+
def test_read_file_url_flaky(engine, url):
615+
gdf = read_file(url, engine=engine)
616+
assert isinstance(gdf, geopandas.GeoDataFrame)
617+
618+
607619
def test_read_file_local_uri(file_path, engine):
608620
local_uri = "file://" + file_path
609621
gdf = read_file(local_uri, engine=engine)

0 commit comments

Comments
 (0)