import unittest

from chainer import testing
from chainer.testing import attr
from chainercv.datasets import ADE20KSemanticSegmentationDataset
from chainercv.datasets import ade20k_label_names
from chainercv.utils import assert_is_semantic_segmentation_dataset
from chainercv.utils.testing.assertions.assert_is_image import assert_is_image


@testing.parameterize(
    {'split': 'train'},
    {'split': 'val'},
    {'split': 'test'}
)
class TestCamVidDataset(unittest.TestCase):

    def setUp(self):
        self.dataset = ADE20KSemanticSegmentationDataset(split=self.split)

    @attr.slow
    def test_camvid_dataset(self):
        if self.split == 'train' or self.split == 'val':
            assert_is_semantic_segmentation_dataset(
                self.dataset, len(ade20k_label_names), n_example=10)
        else:
            for img in self.datast[:10]:
                assert_is_image(img, color=True)


testing.run_module(__name__, __file__)

@@ -442,14 +442,14 @@
 Test
-CamVid
+ADE20K
 Data
@@ -846,16 +846,17 @@
 lf.datas
+e
 t%5B:10%5D:%0A

Fix test