Ejemplo n.º 1
0
    def test_check2(self, exception_task):
        """Simply test that everything is ok condition is evaluable and parent
        is a While.

        """
        whil = WhileTask()
        whil.add_child_task(0, exception_task)
        exception_task.condition = 'True'
        self.root.add_child_task(0, whil)

        test, traceback = exception_task.check()
        assert test
        assert not traceback
Ejemplo n.º 2
0
 def setup(self):
     self.root = RootTask(should_stop=Event(), should_pause=Event())
     self.task = WhileTask(name='Test')
     self.root.add_child_task(0, self.task)
     self.check = CheckTask(name='check')
     self.task.add_child_task(0, self.check)
Ejemplo n.º 3
0
def test_while_view(windows):
    """Test the ContinueTask view.

    """
    show_and_close_widget(WhileView(task=WhileTask(name='Test')))