def test_TaskNameFilterVisitor_include_ignores_children (self): n1 = Task (name=u'n1 xxx') n2 = Task (name=u'n2') n1.add_child(n2) visitor = TaskNameFilterVisitor ('xxx') traverse (visitor, n1) self.assertTrue(n1.marked) self.assertTrue(n2.marked)
def test_TaskNameFilterVisitor_include_ignores_children(self): n1 = Task(name=u'n1 xxx') n2 = Task(name=u'n2') n1.add_child(n2) visitor = TaskNameFilterVisitor('xxx') traverse(visitor, n1) self.assertTrue(n1.marked) self.assertTrue(n2.marked)
def test_TaskNameFilterVisitor_include_ignores_children (self): n1 = Task (name=u'n1 xxx') n2 = Task (name=u'n2') n1.add_child(n2) visitor = Filter ([PROJECT, CONTEXT, TASK, FOLDER], lambda x: match_name(x, 'xxx'), True, 'pretty') traverse (visitor, n1) self.assertTrue(n1.marked) self.assertTrue(n2.marked)
def test_TaskNameFilterVisitor_include_ignores_children(self): n1 = Task(name=u'n1 xxx') n2 = Task(name=u'n2') n1.add_child(n2) visitor = Filter([PROJECT, CONTEXT, TASK, FOLDER], lambda x: match_name(x, 'xxx'), True, 'pretty') traverse(visitor, n1) self.assertTrue(n1.marked) self.assertTrue(n2.marked)
def test_project_add_child (self): project = Project () child = Task () project.add_child (child) self.assertEquals(project, child.parent) self.assertEquals(project, child.project) project = Project () child = Task () grandchild = Task () child.add_child (grandchild) project.add_child (child) self.assertEquals(project, child.parent) self.assertEquals(project, child.project) self.assertEquals(project, grandchild.project)
def test_project_add_child(self): project = Project() child = Task() project.add_child(child) self.assertEquals(project, child.parent) self.assertEquals(project, child.project) project = Project() child = Task() grandchild = Task() child.add_child(grandchild) project.add_child(child) self.assertEquals(project, child.parent) self.assertEquals(project, child.project) self.assertEquals(project, grandchild.project)
def test_task_add_child (self): project = Project () task = Task () child = Task () project.add_child (task) task.add_child (child) self.assertEquals(task, child.parent) self.assertEquals(project, child.project) project = Project () task = Task () child = Task () grandchild = Task () project.add_child (task) task.add_child (child) child.add_child (grandchild) task.add_child (child) self.assertEquals(task, child.parent) self.assertEquals(project, child.project) self.assertEquals(child, grandchild.parent) self.assertEquals(project, grandchild.project)
def test_task_add_child(self): project = Project() task = Task() child = Task() project.add_child(task) task.add_child(child) self.assertEquals(task, child.parent) self.assertEquals(project, child.project) project = Project() task = Task() child = Task() grandchild = Task() project.add_child(task) task.add_child(child) child.add_child(grandchild) task.add_child(child) self.assertEquals(task, child.parent) self.assertEquals(project, child.project) self.assertEquals(child, grandchild.parent) self.assertEquals(project, grandchild.project)