def test_does_not_delete_node_on_destruction(self): new_aov = AOV("group_name", "direct") aov_list = pm.ls(type="aiAOV") self.assertEqual(len(aov_list), 2) del (new_aov) aov_list = pm.ls(type="aiAOV") self.assertEqual(len(aov_list), 2)
def test_deletes_node_when_explicitly_requested(self): new_aov = AOV("group_name", "direct") aov_list = pm.ls(type="aiAOV") self.assertEqual(len(aov_list), 2) new_aov.delete_node() aov_list = pm.ls(type="aiAOV") self.assertEqual(len(aov_list), 1)
def test_finds_existing_aov_node(self): # Make an AOV directly through arnold, and verify it exists aov_name = "test_group_test_pass" arnold.aovs.AOVInterface().addAOV(aov_name) aov_list = pm.ls("aiAOV_" + aov_name) self.assertEqual(len(aov_list), 1) # Ensure that the AOV instance found the node new_aov = AOV("test_group", "test_pass", False) self.assertTrue(new_aov._aov_node.type() == "aiAOV")
def setUp(self): self.clean_environment() self.dummy_aov = AOV("test_name", "test_pass")
def test_optionally_does_not_create_node(self): AOV("test_aov", "test_lpe", False) aov_list = pm.ls(type="aiAOV") self.assertEqual(len(aov_list), 1)
def test_creates_an_aov_node(self): AOV("test_aov", "test_pass") aov_list = pm.ls(type="aiAOV") self.assertEqual(len(aov_list), 2) # 2, because one is created in setUp() self.assertTrue("aiAOV_test_aov_test_pass" in aov_list)
def add_aov(self, group_name, render_pass, make_node=True): if (self.aov_exists(group_name, render_pass)): return None new_aov = AOV(group_name, render_pass, make_node) self.aov_list.append(new_aov) return new_aov