Beispiel #1
0
def test_show_array():
    """
    This test only verifies that code up to the point of plotting with
    matplotlib works correctly.  Tests do not exercise matplotlib.
    """

    with rasterio.drivers():
        with rasterio.open('tests/data/RGB.byte.tif') as src:
            try:
                show(src.read(1))
                fig = plt.gcf()
                plt.close(fig)
            except ImportError:
                pass
Beispiel #2
0
def test_show_array():
    """
    This test only verifies that code up to the point of plotting with
    matplotlib works correctly.  Tests do not exercise matplotlib.
    """

    with rasterio.drivers():
        with rasterio.open('tests/data/RGB.byte.tif') as src:
            try:
                show(src.read(1))
                fig = plt.gcf()
                plt.close(fig)
            except ImportError:
                pass
Beispiel #3
0
def test_show():
    """
    This test only verifies that code up to the point of plotting with
    matplotlib works correctly.  Tests do not exercise matplotlib.
    """
    if plt:
        # Return because plotting causes the tests to block until the plot
        # window is closed.
        return

    with rasterio.drivers():
        with rasterio.open('tests/data/RGB.byte.tif') as src:
            try:
                show((src, 1))
            except ImportError:
                pass

            try:
                show(src.read_band(1))
            except ImportError:
                pass