Esempio n. 1
0
    def test_trigger_with_itself_waiting(self):
        node = DirectoryNode("path_part", "parent")
        node.waiting_nodes.append(node)
        fake_node = FakeNodeForAbstractTest()
        node.waiting_task = "task"
        node.waiting_for_node = self
        node.waiting_task_callback = fake_node.callback
        node.trigger_waiting_task()

        assert node.waiting_task_callback is None
        assert node.waiting_task is None
        assert node.waiting_for_node is None
        assert not fake_node.cancel
        assert fake_node.release_aquired_lock
Esempio n. 2
0
 def test_trigger_with_no_waiting_nodes(self):
     node = DirectoryNode("path_part", "parent")
     node.trigger_waiting_task()