def test_output_single_gtiff_pixelbuffer(output_single_gtiff):
    tile_id = (5, 3, 7)
    with mapchete.open(dict(output_single_gtiff.dict, output=dict(output_single_gtiff.dict['output'], pixelbuffer=5))) as mp:
        process_tile = mp.config.process_pyramid.tile(*tile_id)
        assert mp.config.output.profile()
        assert mp.config.output.empty(process_tile).mask.all()
        assert mp.config.output.get_path(process_tile)
        assert (not mp.config.output.tiles_exist(process_tile))
        mp.batch_process(tile=process_tile.id)
        assert mp.config.output.tiles_exist(process_tile)
        data = mp.config.output.read(process_tile)
        assert isinstance(data, np.ndarray)
        assert (not data[0].mask.all())
def test_output_single_gtiff_pixelbuffer(output_single_gtiff):
    tile_id = (5, 3, 7)
    with mapchete.open(dict(output_single_gtiff.dict, output=dict(output_single_gtiff.dict['output'], pixelbuffer=5))) as mp:
        process_tile = mp.config.process_pyramid.tile(*tile_id)
        assert mp.config.output.profile()
        assert mp.config.output.empty(process_tile).mask.all()
        assert mp.config.output.get_path(process_tile)
        assert (not mp.config.output.tiles_exist(process_tile))
        mp.batch_process(tile=process_tile.id)
        assert mp.config.output.tiles_exist(process_tile)
        data = mp.config.output.read(process_tile)
        assert isinstance(data, np.ndarray)
        assert (not data[0].mask.all())