Skip to content

Commit

Permalink
Add test of deprecated params
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean C. Gillies committed Jun 4, 2018
1 parent 75e5ae2 commit 2d3eb2b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_warpedvrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import rasterio
from rasterio.crs import CRS
from rasterio.enums import Resampling, MaskFlags
from rasterio.errors import RasterioDeprecationWarning
from rasterio import shutil as rio_shutil
from rasterio.vrt import WarpedVRT
from rasterio.warp import transform_bounds
Expand All @@ -35,6 +36,14 @@ def _copy_update_profile(path_in, path_out, **kwargs):
return str(path_out)


def test_deprecated_param(path_rgb_byte_tif):
"""dst_crs is deprecated"""
with rasterio.open(path_rgb_byte_tif) as src:
with pytest.warns(RasterioDeprecationWarning):
vrt = WarpedVRT(src, dst_crs=DST_CRS)
assert vrt.dst_crs == CRS.from_string(DST_CRS)


def test_warped_vrt(path_rgb_byte_tif):
"""A VirtualVRT has the expected VRT properties."""
with rasterio.open(path_rgb_byte_tif) as src:
Expand Down

0 comments on commit 2d3eb2b

Please sign in to comment.