diff --git a/test/test_data_resolver.py b/test/test_data_resolver.py index 575d9fe..f668974 100644 --- a/test/test_data_resolver.py +++ b/test/test_data_resolver.py @@ -116,4 +116,22 @@ class TestResolve(unittest.TestCase): self.assertEqual(captions, ['caption for test1', 'caption for test2', 'test3']) undersized_images = list(filter(lambda i: i.is_undersized, items)) - self.assertEqual(len(undersized_images), 1) \ No newline at end of file + self.assertEqual(len(undersized_images), 1) + + def test_resolve_with_list(self): + data_root_spec = [ + DATA_PATH, + JSON_ROOT_PATH, + ] + + items = resolver.resolve(data_root_spec, ARGS) + image_paths = [item.pathname for item in items] + image_captions = [item.caption for item in items] + captions = [caption.get_caption() for caption in image_captions] + + self.assertEqual(len(items), 6) + self.assertEqual(image_paths, [IMAGE_1_PATH, IMAGE_2_PATH, IMAGE_3_PATH] * 2) + self.assertEqual(captions, ['caption for test1', 'test2', 'test3', 'caption for test1', 'caption for test2', 'test3']) + + undersized_images = list(filter(lambda i: i.is_undersized, items)) + self.assertEqual(len(undersized_images), 2) \ No newline at end of file