Exemplo n.º 1
0
 def test_append_duplicate_dep(self):
     """Test appending duplicate dependants to a task, it should be unique"""
     root = Task("Root Task")
     child = Task("Child Task")
     root.append_dependant(child)
     root.append_dependant(child)
     self.assertNotEqual(2, len(root.dependants))
Exemplo n.º 2
0
 def test_append_dependants(self):
     """
     Create a Task
     Create a second task
     Append second task to first task's list of dependants
     """
     target = Task()
     dep = Task()
     target.append_dependant(dep)
     self.assertIn(dep, target.dependants)