Ejemplo n.º 1
0
def test_drivers():
    with rasterio.drivers() as m:
        assert driver_count() > 0
        assert type(m) == GDALEnv

        n = rasterio.drivers()
        assert driver_count() > 0
        assert type(n) == GDALEnv
def test_drivers():
    with rasterio.drivers() as m:
        assert driver_count() > 0
        assert type(m) == DriverManager
        
        n = rasterio.drivers()
        assert driver_count() > 0
        assert type(n) == DummyManager
Ejemplo n.º 3
0
def drivers(**kwargs):
    """Returns a gdal environment with registered drivers."""
    if driver_count() == 0:
        log.debug("Creating a chief GDALEnv in drivers()")
        return GDALEnv(True, **kwargs)
    else:
        log.debug("Creating a not-responsible GDALEnv in drivers()")
        return GDALEnv(False, **kwargs)
Ejemplo n.º 4
0
def drivers(**kwargs):
    """Returns a gdal environment with registered drivers."""
    if driver_count() == 0:
        log.debug("Creating a chief GDALEnv in drivers()")
        return GDALEnv(True, **kwargs)
    else:
        log.debug("Creating a not-responsible GDALEnv in drivers()")
        return GDALEnv(False, **kwargs)
Ejemplo n.º 5
0
def drivers(*args):
    """Returns a context manager with registered drivers."""
    if driver_count() == 0:
        log.debug("Creating a DriverManager in drivers()")
        return DriverManager()
    else:
        log.debug("Creating a DummyManager in drivers()")
        return DummyManager()
Ejemplo n.º 6
0
def test_drivers():
    with rasterio.Env() as m:
        assert driver_count() > 0
        assert type(m) == rasterio.Env
    assert driver_count() > 0
Ejemplo n.º 7
0
def test_drivers():
    with Env() as m:
        assert driver_count() > 0
        assert type(m) == Env
    assert driver_count() > 0
Ejemplo n.º 8
0
def test_drivers_bwd_compat():
    with rasterio.drivers() as m:
        assert driver_count() > 0
        assert type(m) == Env
    assert driver_count() > 0
Ejemplo n.º 9
-1
def test_drivers():
    with rasterio.drivers() as m:
        assert driver_count() > 0
        assert type(m) == GDALEnv
        
        n = rasterio.drivers()
        assert driver_count() > 0
        assert type(n) == GDALEnv