def test_ycbcr_interp(tmpdir):
    with rasterio.open('tests/data/RGB.byte.tif') as src:
        meta = src.meta
    meta['photometric'] = 'ycbcr'
    meta['compress'] = 'jpeg'
    meta['count'] = 3
    tiffname = str(tmpdir.join('foo.tif'))
    with rasterio.open(tiffname, 'w', **meta) as dst:
        assert dst.colorinterp(1) == ColorInterp.red
        assert dst.colorinterp(2) == ColorInterp.green
        assert dst.colorinterp(3) == ColorInterp.blue
A YCbCr TIFF has red, green, blue bands.
dataset/ETHPy150Open mapbox/rasterio/tests/test_colorinterp.py/test_ycbcr_interp