Exemplo n.º 1
0
	def test21_do_transform_with_incorrect_input_buffer(self):
		cmyk = libcms.COLORB()
		rgb = 255
		try:
			libcms.cms_do_transform(self.transform, rgb, cmyk)
		except libcms.CmsError:
			return
		self.fail()
Exemplo n.º 2
0
	def test17_do_transform_with_null_input(self):
		rgb = libcms.COLORB()
		cmyk = libcms.COLORB()
		libcms.cms_do_transform(self.transform, rgb, cmyk)
		self.assertNotEqual(0, cmyk[0])
		self.assertNotEqual(0, cmyk[1])
		self.assertNotEqual(0, cmyk[2])
		self.assertNotEqual(0, cmyk[3])
Exemplo n.º 3
0
	def test20_do_transform_with_incorrect_color_values(self):
		rgb = libcms.COLORB()
		cmyk = libcms.COLORB()
		rgb[0] = 455
		rgb[1] = 255
		rgb[2] = 255
		try:
			libcms.cms_do_transform(self.transform, rgb, cmyk)
		except:
			self.fail()
Exemplo n.º 4
0
	def test22_do_transform_with_incorrect_output_buffer(self):
		rgb = libcms.COLORB()
		rgb[0] = 255
		rgb[1] = 255
		rgb[2] = 255
		cmyk = 255
		try:
			libcms.cms_do_transform(self.transform, rgb, cmyk)
		except libcms.CmsError:
			return
		self.fail()
Exemplo n.º 5
0
	def test19_do_transform_with_intermediate_input(self):
		rgb = libcms.COLORB()
		cmyk = libcms.COLORB()
		rgb[0] = 100
		rgb[1] = 190
		rgb[2] = 150
		libcms.cms_do_transform(self.transform, rgb, cmyk)
		self.assertNotEqual(0, cmyk[0])
		self.assertNotEqual(0, cmyk[1])
		self.assertNotEqual(0, cmyk[2])
		self.assertNotEqual(0, cmyk[3])
Exemplo n.º 6
0
	def test18_do_transform_with_maximum_allowed_input(self):
		rgb = libcms.COLORB()
		cmyk = libcms.COLORB()
		rgb[0] = 255
		rgb[1] = 255
		rgb[2] = 255
		libcms.cms_do_transform(self.transform, rgb, cmyk)
		self.assertEqual(0, cmyk[0])
		self.assertEqual(0, cmyk[1])
		self.assertEqual(0, cmyk[2])
		self.assertEqual(0, cmyk[3])
Exemplo n.º 7
0
def test_do_transform_with_intermediate_input():
    rgb = [0, 0, 0, 0]
    cmyk = [0, 0, 0, 0]
    rgb[0] = 100
    rgb[1] = 190
    rgb[2] = 150
    libcms.cms_do_transform(TRANSFORM, rgb, cmyk)
    assert 0 != cmyk[0]
    assert 0 != cmyk[1]
    assert 0 != cmyk[2]
    assert 0 != cmyk[3]
Exemplo n.º 8
0
def test_do_transform_with_maximum_allowed_input():
    rgb = [0, 0, 0, 0]
    cmyk = [0, 0, 0, 0]
    rgb[0] = 255
    rgb[1] = 255
    rgb[2] = 255
    libcms.cms_do_transform(TRANSFORM, rgb, cmyk)
    assert 0 == cmyk[0]
    assert 0 == cmyk[1]
    assert 0 == cmyk[2]
    assert 0 == cmyk[3]
Exemplo n.º 9
0
 def test22_do_transform_with_incorrect_output_buffer(self):
     rgb = libcms.COLORB()
     rgb[0] = 255
     rgb[1] = 255
     rgb[2] = 255
     cmyk = 255
     try:
         libcms.cms_do_transform(self.transform, rgb, cmyk)
     except libcms.CmsError:
         return
     self.fail()
Exemplo n.º 10
0
 def test19_do_transform_with_intermediate_input(self):
     rgb = libcms.COLORB()
     cmyk = libcms.COLORB()
     rgb[0] = 100
     rgb[1] = 190
     rgb[2] = 150
     libcms.cms_do_transform(self.transform, rgb, cmyk)
     self.assertNotEqual(0, cmyk[0])
     self.assertNotEqual(0, cmyk[1])
     self.assertNotEqual(0, cmyk[2])
     self.assertNotEqual(0, cmyk[3])
Exemplo n.º 11
0
 def test18_do_transform_with_maximum_allowed_input(self):
     rgb = libcms.COLORB()
     cmyk = libcms.COLORB()
     rgb[0] = 255
     rgb[1] = 255
     rgb[2] = 255
     libcms.cms_do_transform(self.transform, rgb, cmyk)
     self.assertEqual(0, cmyk[0])
     self.assertEqual(0, cmyk[1])
     self.assertEqual(0, cmyk[2])
     self.assertEqual(0, cmyk[3])