Skip to content

Commit

Permalink
Merge branch 'maint-1.8' into search_gdadata_in_wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuffat committed May 11, 2020
2 parents 4a701c3 + 8a0d1c5 commit fad7ed5
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tests/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,16 +858,28 @@ def test_open_kwargs(tmpdir, path_coutwildrnp_shp):

@pytest.mark.network
def test_collection_http():
ds = fiona.Collection('http://raw.githubusercontent.com/OSGeo/gdal/master/autotest/ogr/data/poly.shp', vsi='http')
assert ds.path == '/vsicurl/http://raw.githubusercontent.com/OSGeo/gdal/master/autotest/ogr/data/poly.shp'
assert len(ds) == 10
ds = fiona.Collection(
"https://raw.githubusercontent.com/Toblerity/Fiona/master/tests/data/coutwildrnp.shp",
vsi="https",
)
assert (
ds.path
== "/vsicurl/https://raw.githubusercontent.com/Toblerity/Fiona/master/tests/data/coutwildrnp.shp"
)
assert len(ds) == 67


@pytest.mark.network
def test_collection_zip_http():
ds = fiona.Collection('http://raw.githubusercontent.com/OSGeo/gdal/master/autotest/ogr/data/poly.zip', vsi='zip+http')
assert ds.path == '/vsizip/vsicurl/http://raw.githubusercontent.com/OSGeo/gdal/master/autotest/ogr/data/poly.zip'
assert len(ds) == 10
ds = fiona.Collection(
"https://raw.githubusercontent.com/Toblerity/Fiona/master/tests/data/coutwildrnp.zip",
vsi="zip+https",
)
assert (
ds.path
== "/vsizip/vsicurl/https://raw.githubusercontent.com/Toblerity/Fiona/master/tests/data/coutwildrnp.zip",
)
assert len(ds) == 67


def test_encoding_option_warning(tmpdir, caplog):
Expand Down

0 comments on commit fad7ed5

Please sign in to comment.