def test_eventlet_schedule_action(self):
        scheduler = EventLetEventScheduler()
        ran = [False]

        def action(scheduler, state):
            ran[0] = True
        scheduler.schedule(action)

        eventlet.sleep(0.1)
        assert ran[0] is True
    def test_eventlet_schedule_action(self):
        scheduler = EventLetEventScheduler()
        ran = [False]

        def action(scheduler, state):
            ran[0] = True
        scheduler.schedule(action)

        eventlet.sleep(0.1)
        assert(ran[0] is True)
Exemple #3
0
    def test_eventlet_schedule_action(self):
        scheduler = EventLetEventScheduler()
        ran = False

        def action(scheduler, state):
            nonlocal ran
            ran = True

        scheduler.schedule(action)

        eventlet.sleep(0.1)
        assert ran is True
    def test_eventlet_schedule_action(self):
        scheduler = EventLetEventScheduler()
        ran = False

        def action(scheduler, state):
            nonlocal ran
            ran = True

        scheduler.schedule(action)

        eventlet.sleep(0.1)
        assert ran is True