@parameterized.expand([TEST_CASE_1, TEST_CASE_2])
def test_exception(self, datalist):
    dataset = Dataset(data=datalist, transform=None)
    dataloader = DataLoader(dataset=dataset, batch_size=2, num_workers=0)
    with self.assertRaisesRegex((TypeError, RuntimeError), 'Collate error on the key'):
        for _ in dataloader:
            pass
@parameterized.expand([TEST_CASE_1, TEST_CASE_2])
def test_exception(self, datalist):
    dataset = Dataset(data=datalist, transform=None)
    dataloader = DataLoader(dataset=dataset, batch_size=2, num_workers=0)
    with self.assertRaisesRegex((TypeError, RuntimeError), 'Collate error on the key'):
        for _ in dataloader:
            pass