Test the deepcopy() method.
(self)
| 7 | class ContextTest(unittest.TestCase): |
| 8 | |
| 9 | def test_copy(self): |
| 10 | """ |
| 11 | Test the deepcopy() method. |
| 12 | """ |
| 13 | cont = OCIO.Context() |
| 14 | cont.setSearchPath('testing123:testing456') |
| 15 | cont.setWorkingDir('/dir/123') |
| 16 | cont.setEnvironmentMode(OCIO.ENV_ENVIRONMENT_LOAD_PREDEFINED) |
| 17 | cont['TeSt'] = 'foobar' |
| 18 | cont['Bar'] = 'Foo' |
| 19 | |
| 20 | other = copy.deepcopy(cont) |
| 21 | self.assertFalse(other is cont) |
| 22 | |
| 23 | self.assertEqual(other.getCacheID(), cont.getCacheID()) |
| 24 | self.assertEqual(other.getSearchPath(), cont.getSearchPath()) |
| 25 | self.assertEqual(other.getWorkingDir(), cont.getWorkingDir()) |
| 26 | self.assertEqual(other.getEnvironmentMode(), cont.getEnvironmentMode()) |
| 27 | self.assertEqual(list(other), list(cont)) |
| 28 | |
| 29 | def test_interface(self): |
| 30 | """ |
nothing calls this directly
no test coverage detected