def wait(self):

        time_total = 0
        time_increment = 0.03
        time_max = 3.0

        while True:

            # print time_total

            self.assertEqual(time_total < time_max, True, "Timeout")

            if len(self.callbacks) == self._callback_count + 1:
                self._callback_count += 1
                return

            sleep(time_increment)
            time_total += time_increment
dataset/ETHPy150Open koenbok/Cactus/cactus/tests/test_listener.py/PollingListenerTest.wait/original