예제 #1
0
def iterable_interface(request):
    """Fixture building a linspace interface.

    """
    interface = IterableLoopInterface()
    interface.iterable = 'range(11)'
    return interface
예제 #2
0
def iterable_interface(request):
    """Fixture building a linspace interface.

    """
    interface = IterableLoopInterface()
    interface.iterable = 'range(11)'
    return interface
예제 #3
0
    def test_perform_task2(self):
        """Test performing a loop with an embedded task no timing. Break.

        """
        interface = IterableLoopInterface()
        interface.iterable = 'range(11)'
        self.task.interface = interface
        self.task.task = CheckTask(name='check')
        self.task.add_child_task(
            0, BreakTask(name='Break', condition='{Test_index} == 6'))
        self.root.prepare()

        self.task.perform()
        assert self.root.get_from_database('Test_index') == 6
        assert self.task.task.perform_called
        assert self.task.task.perform_value == 5
예제 #4
0
    def test_perform_task2(self):
        """Test performing a loop with an embedded task no timing. Break.

        """
        interface = IterableLoopInterface()
        interface.iterable = 'range(11)'
        self.task.interface = interface
        self.task.task = CheckTask(name='check')
        self.task.add_child_task(0, BreakTask(name='Break',
                                              condition='{Test_index} == 6')
                                 )
        self.root.prepare()

        self.task.perform()
        assert self.root.get_from_database('Test_index') == 6
        assert self.task.task.perform_called
        assert self.task.task.perform_value == 5