On Aug 5, 2013, at 2:09 AM, Benjamin BERTRAND <bee...@gmail.com> wrote:
> That's why the inlineCallbacks solves the problem. When I yield on the > self.server.dataReceived, I wait for the deferred in the publish methods to > fire and everything is clean when I close the connection. > > Is there another way to do that? Jonathan Lange wrote about this a long time ago: http://blackjml.livejournal.com/23029.html but better than doing that would be to avoid setting up and tearing down real TCP connections during your tests. Those are slower than an in-memory thing (like you would get from twisted.test.proto_helpers, the one and only public module in our 'test' package) and also, as you have discovered, more unpredictable. Is there any way to hand txredis a synthetic transport for testing? If not, file a bug on it :). -glyph
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python