[Twisted-Python] Mimicking a blocking API using Twisted
Itamar Turner-Trauring
itamar at itamarst.org
Sun Mar 25 17:44:27 EDT 2012
On 03/25/2012 05:02 PM, Laurens Van Houtven wrote:
> Hi,
>
>
> I'm trying to find out if there's a reasonable way to mimic a blocking
> API with an existing non-blocking API. I want to do this so I can
> write doctests.
>
> For example, I want to make a remote AMP call. It returns a deferred.
> Instead of returning a deferred, I want it to block until the deferred
> fires.
Doctests are supposed to document and test, or perhaps have tested
documentation. If the API you're presenting doesn't match actual usage,
that's bad documentation...
More information about the Twisted-Python
mailing list