def test_read_data(self): """ Tests :attr:`colour_hdri.utilities.image.Image.read_data` method. """ image = Image(self._test_jpg_image) np.testing.assert_array_equal(image.data, np.array(np.nan)) self.assertTupleEqual(image.read_data().shape, (426, 640, 3))
def test_read_metadata(self): """ Tests :attr:`colour_hdri.utilities.image.Image.end` method. """ image = Image(self.__test_jpg_image) self.assertEqual(image.metadata, None) self.assertTupleEqual(tuple(image.read_metadata()), (8.0, 0.125, 100.0, None, None, None))
def test_read_data(self): """ Tests :attr:`colour_hdri.utilities.image.Image.read_data` method. """ image = Image(self.__test_jpg_image) self.assertEqual(image.data, np.array(None)) self.assertTupleEqual(image.read_data().shape, (426, 640, 3))
def test_read_metadata(self): """ Tests :attr:`colour_hdri.utilities.image.Image.end` method. """ image = Image(self._test_jpg_image) self.assertEqual(image.metadata, None) self.assertTupleEqual(tuple(image.read_metadata()), (8.0, 0.125, 100.0, None, None, None))
def test__setitem__(self): """ Tests :attr:`colour_hdri.utilities.image.ImageStack.__setitem__` method. """ image_stack = ImageStack() image = Image(self.__test_jpg_images[0]) image.read_data() image.read_metadata() image_stack.insert(0, image) self.assertEqual(image_stack[0], image)
def test__setitem__(self): """ Tests :attr:`colour_hdri.utilities.image.ImageStack.__setitem__` method. """ image_stack = ImageStack() image = Image(self._test_jpg_images[0]) image.read_data() image.read_metadata() image_stack.insert(0, image) self.assertEqual(image_stack[0], image)