MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / test_slicing

Method test_slicing

tests/data/test_zipdataset.py:59–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

57 self.assertEqual(len(test_dataset), expected_length)
58
59 def test_slicing(self):
60 test_dataset = ZipDataset(datasets=[Dataset_(5), Dataset_(5), Dataset_(5)], transform=None)
61 subset = test_dataset[0:2]
62 self.assertEqual(subset[-1], (1, 1, 1))
63 self.assertEqual(len(subset), 2)
64
65 def test_sequence(self):
66 test_dataset = ZipDataset(datasets=[Dataset_(5), Dataset_(5), Dataset_(5)], transform=None)

Callers

nothing calls this directly

Calls 2

ZipDatasetClass · 0.90
Dataset_Class · 0.85

Tested by

no test coverage detected