def test_memory_crop_returns_resized_resolution(self):
    coords = mercantile.xy_bounds(*tiles[18])
    shape = GeoVector(Polygon.from_bounds(*coords), WEB_MERCATOR_CRS)
    raster = self.read_only_virtual_geo_raster()
    cropped = raster.crop(shape, MERCATOR_RESOLUTION_MAPPING[18])
    self.assertEqual(cropped.shape, (raster.num_bands, 256, 256))
    self.assertAlmostEqual(cropped.affine[0], MERCATOR_RESOLUTION_MAPPING[18], 2)
def test_memory_crop_returns_resized_resolution(self):
    coords = mercantile.xy_bounds(*tiles[18])
    shape = GeoVector(Polygon.from_bounds(*coords), WEB_MERCATOR_CRS)
    raster = self.read_only_virtual_geo_raster()
    cropped = raster.crop(shape, MERCATOR_RESOLUTION_MAPPING[18])
    self.assertEqual(cropped.shape, (raster.num_bands, 256, 256))
    self.assertAlmostEqual(cropped.affine[0], MERCATOR_RESOLUTION_MAPPING[18], 2)