def test_vsi_path_file(): """Correctly make and ordinary file path from a file path""" assert vsi_path('foo.tif', None, 'file') == 'foo.tif'
def test_vsi_path_file(): """Correctly make and ordinary file path from a file path""" assert vsi_path( 'foo.tif', None, 'file') == 'foo.tif'
def test_vsi_path_scheme(): """Correctly make a vsi path""" assert vsi_path('foo.tif', 'tests/data/files.zip', 'zip') == '/vsizip/tests/data/files.zip/foo.tif'
def test_vsi_path_scheme(): """Correctly make a vsi path""" assert vsi_path( 'foo.tif', 'tests/data/files.zip', 'zip') == '/vsizip/tests/data/files.zip/foo.tif'
def test_vsi_path(): """Warn deprecation of old vsi_path""" with pytest.warns(RasterioDeprecationWarning): assert vsi_path('/foo.tif', 'tests/data/files.zip', 'zip') == '/vsizip/tests/data/files.zip/foo.tif'
def test_vsi_unparsed_path(): """Warn deprecation of old vsi_path""" with pytest.warns(RasterioDeprecationWarning): assert vsi_path('foo.tif', None, None) == 'foo.tif'
def test_vsi_path_file(): """Correctly make a ordinary file path from a parsed file:// URL""" assert vsi_path( 'foo.tif', None, 'file') == 'foo.tif'