Exemple #1
0
def test_vsi_path_file():
    """Correctly make and ordinary file path from a file path"""
    assert vsi_path('foo.tif', None, 'file') == 'foo.tif'
Exemple #2
0
def test_vsi_path_file():
    """Correctly make and ordinary file path from a file path"""
    assert vsi_path(
        'foo.tif', None, 'file') == 'foo.tif'
Exemple #3
0
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'
Exemple #4
0
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'
Exemple #5
0
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'
Exemple #6
0
def test_vsi_unparsed_path():
    """Warn deprecation of old vsi_path"""
    with pytest.warns(RasterioDeprecationWarning):
        assert vsi_path('foo.tif', None, None) == 'foo.tif'
Exemple #7
0
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'
Exemple #8
0
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'