def test_mask_out_of_bounds(runner, tmpdir, basic_feature,
                            pixelated_image_file):

    coords = numpy.array(basic_feature['geometry']['coordinates']) - 10
    basic_feature['geometry']['coordinates'] = coords.tolist()

    output = str(tmpdir.join('test.tif'))

    result = runner.invoke(
        main_group,
        ['mask', pixelated_image_file, output, '--geojson-mask', '-'],
        input=json.dumps(basic_feature))
    assert result.exit_code == 0
    assert 'outside bounds' in result.output
    assert os.path.exists(output)

    with rasterio.open(output) as out:
        assert not numpy.any(out.read(1, masked=True).filled(0))
Determine whether the App runs pacaged or from the command line
dataset/ETHPy150Open mapbox/rasterio/tests/test_rio_features.py/test_mask_out_of_bounds--crossover with--dataset/ETHPy150Open ciex/souma/web_ui/helpers.py/host_kind