Created
July 18, 2013 12:56
-
-
Save adiroiban/6029076 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _runDeferred(self, deferred, timeout, debug): | |
""" | |
Does the actual deferred execution. | |
""" | |
if not deferred.called: | |
deferred_done = False | |
while not deferred_done: | |
self._iterateTestReactor(debug=debug) | |
deferred_done = deferred.called | |
if self._timeout_reached: | |
raise AssertionError( | |
'Deferred took more than %d to execute.' % timeout) | |
result = deferred.result | |
if isinstance(result, Deferred): | |
self._runDeferred(result, timeout=timeout, debug=debug) | |
result = deferred.result | |
if isinstance(result, Deferred): | |
self._runDeferred(result, timeout=timeout, debug=debug) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment