Skip to content

Commit 99229ef

Browse files
Remove test_rasterio_vrt_network (pydata#6371)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 53172cb commit 99229ef

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

xarray/tests/test_backends.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4775,32 +4775,6 @@ def test_rasterio_vrt_with_src_crs(self):
47754775
with pytest.warns(DeprecationWarning), xr.open_rasterio(vrt) as da:
47764776
assert da.crs == src_crs
47774777

4778-
@network
4779-
def test_rasterio_vrt_network(self):
4780-
# Make sure loading w/ rasterio give same results as xarray
4781-
import rasterio
4782-
4783-
# use same url that rasterio package uses in tests
4784-
prefix = "https://landsat-pds.s3.amazonaws.com/L8/139/045/"
4785-
image = "LC81390452014295LGN00/LC81390452014295LGN00_B1.TIF"
4786-
httpstif = prefix + image
4787-
with rasterio.Env(aws_unsigned=True):
4788-
with rasterio.open(httpstif) as src:
4789-
with rasterio.vrt.WarpedVRT(src, crs="epsg:4326") as vrt:
4790-
expected_shape = vrt.width, vrt.height
4791-
expected_res = vrt.res
4792-
# Value of single pixel in center of image
4793-
lon, lat = vrt.xy(vrt.width // 2, vrt.height // 2)
4794-
expected_val = next(vrt.sample([(lon, lat)]))
4795-
with pytest.warns(DeprecationWarning), xr.open_rasterio(vrt) as da:
4796-
actual_shape = da.sizes["x"], da.sizes["y"]
4797-
actual_res = da.res
4798-
actual_val = da.sel(dict(x=lon, y=lat), method="nearest").data
4799-
4800-
assert actual_shape == expected_shape
4801-
assert actual_res == expected_res
4802-
assert expected_val == actual_val
4803-
48044778

48054779
class TestEncodingInvalid:
48064780
def test_extract_nc4_variable_encoding(self):

0 commit comments

Comments
 (0)