MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / test_copy

Method test_copy

tests/python/LookTest.py:23–45  ·  view source on GitHub ↗

Test the deepcopy() method.

(self)

Source from the content-addressed store, hash-verified

21 self.look = None
22
23 def test_copy(self):
24 """
25 Test the deepcopy() method.
26 """
27 self.look.setName('test name')
28 self.look.setProcessSpace('test space')
29 self.look.setDescription('test description')
30 self.look.setInterchangeAttribute('amf_transform_ids', 'test amf id')
31 mat = OCIO.MatrixTransform()
32 self.look.setTransform(mat)
33 self.look.setInverseTransform(mat)
34
35 other = copy.deepcopy(self.look)
36 self.assertFalse(other is self.look)
37
38 self.assertEqual(other.getName(), self.look.getName())
39 self.assertEqual(other.getProcessSpace(), self.look.getProcessSpace())
40 self.assertEqual(other.getDescription(), self.look.getDescription())
41 self.assertEqual(
42 other.getInterchangeAttribute('amf_transform_ids'),
43 self.look.getInterchangeAttribute('amf_transform_ids'))
44 self.assertTrue(other.getTransform().equals(self.look.getTransform()))
45 self.assertTrue(other.getInverseTransform().equals(self.look.getInverseTransform()))
46
47 def test_name(self):
48 """

Callers

nothing calls this directly

Calls 14

MatrixTransformMethod · 0.80
setNameMethod · 0.45
setProcessSpaceMethod · 0.45
setDescriptionMethod · 0.45
setTransformMethod · 0.45
setInverseTransformMethod · 0.45
getNameMethod · 0.45
getProcessSpaceMethod · 0.45
getDescriptionMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected