def test_loadImageSeries_no_input(self): # Arrange file_list = None # Act img_list = SpiderImagePlugin.loadImageSeries(file_list) # Assert self.assertIsNone(img_list)
def test_loadImageSeries_no_input(self): # Arrange file_list = None # Act img_list = SpiderImagePlugin.loadImageSeries(file_list) # Assert self.assertEqual(img_list, None)
def test_load_image_series_no_input(): # Arrange file_list = None # Act img_list = SpiderImagePlugin.loadImageSeries(file_list) # Assert assert img_list is None
def test_loadImageSeries(self): # Arrange not_spider_file = "Tests/images/hopper.ppm" file_list = [TEST_FILE, not_spider_file, "path/not_found.ext"] # Act img_list = SpiderImagePlugin.loadImageSeries(file_list) # Assert self.assertEqual(len(img_list), 1) self.assertIsInstance(img_list[0], Image.Image) self.assertEqual(img_list[0].size, (128, 128))
def test_load_image_series(): # Arrange not_spider_file = "Tests/images/hopper.ppm" file_list = [TEST_FILE, not_spider_file, "path/not_found.ext"] # Act img_list = SpiderImagePlugin.loadImageSeries(file_list) # Assert assert len(img_list) == 1 assert isinstance(img_list[0], Image.Image) assert img_list[0].size == (128, 128)