Skip to content

Commit

Permalink
I have decided not to include any test in test_dataset.py as I don't …
Browse files Browse the repository at this point in the history
…know how to solve conflict between isort and yapf when managing imports
  • Loading branch information
jonGuti13 committed Oct 6, 2023
1 parent ef9f8f0 commit e173f37
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions tests/test_datasets/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

import pytest

from mmseg.datasets import (
ADE20KDataset, BaseSegDataset, BDD100KDataset, CityscapesDataset,
COCOStuffDataset, DecathlonDataset, DSDLSegDataset, HSIDrive20Dataset,
ISPRSDataset, LIPDataset, LoveDADataset, MapillaryDataset_v1,
MapillaryDataset_v2, NYUDataset, PascalVOCDataset, PotsdamDataset,
REFUGEDataset, SynapseDataset, iSAIDDataset)
from mmseg.datasets import (ADE20KDataset, BaseSegDataset, BDD100KDataset,
CityscapesDataset, COCOStuffDataset,
DecathlonDataset, DSDLSegDataset, ISPRSDataset,
LIPDataset, LoveDADataset, MapillaryDataset_v1,
MapillaryDataset_v2, NYUDataset, PascalVOCDataset,
PotsdamDataset, REFUGEDataset, SynapseDataset,
iSAIDDataset)
from mmseg.registry import DATASETS
from mmseg.utils import get_classes, get_palette

Expand Down Expand Up @@ -38,8 +39,6 @@ def test_classes():
assert list(
MapillaryDataset_v2.METAINFO['classes']) == get_classes('mapillary_v2')
assert list(BDD100KDataset.METAINFO['classes']) == get_classes('bdd100k')
assert list(
HSIDrive20Dataset.METAINFO['classes']) == get_classes('HSIDrive20')
with pytest.raises(ValueError):
get_classes('unsupported')

Expand Down Expand Up @@ -97,8 +96,6 @@ def test_palette():
assert list(
MapillaryDataset_v2.METAINFO['palette']) == get_palette('mapillary_v2')
assert list(BDD100KDataset.METAINFO['palette']) == get_palette('bdd100k')
assert list(
HSIDrive20Dataset.METAINFO['palette']) == get_palette('HSIDrive20')
with pytest.raises(ValueError):
get_palette('unsupported')

Expand Down Expand Up @@ -348,19 +345,6 @@ def test_bdd100k():
assert len(test_dataset) == 3


def test_hsidrive20():
test_dataset = HSIDrive20Dataset(
pipeline=[],
data_prefix=dict(
img_path=osp.join(
osp.dirname(__file__),
'../data/pseudo_hsidrive20_dataset/images/test'),
seg_map_path=osp.join(
osp.dirname(__file__),
'../data/pseudo_hsidrive20_dataset/annotations/test')))
assert len(test_dataset) == 3


@pytest.mark.parametrize('dataset, classes', [
('ADE20KDataset', ('wall', 'building')),
('CityscapesDataset', ('road', 'sidewalk')),
Expand Down

0 comments on commit e173f37

Please sign in to comment.