Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/test/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/test/testutils.pyc

ó
f9=c@s@ddlmZddlmZddd„ƒYZd„ZdS(iÿÿÿÿ(tStringIO(tFileWrappertIOPumpcBs)eZdZd„Zd„Zd„ZRS(sŠUtility to pump data between clients and servers for protocol testing.

    Perhaps this is a utility worthy of being in protocol.py?
    cCs(||_||_||_||_dS(N(tclienttservertclientIOtserverIO(tselfRRRR((s:/usr/lib/python2.7/dist-packages/twisted/test/testutils.pyt__init__	s			cCsx|jƒrqWdS(s,Pump until there is no more input or output.N(tpump(R((s:/usr/lib/python2.7/dist-packages/twisted/test/testutils.pytflushscCsÒ|jjdƒ|jjdƒ|jjƒ}|jjƒ}|jjdƒ|jjdƒ|jjƒ|jjƒx|D]}|jj|ƒqWx|D]}|jj|ƒq W|sÆ|rÊdSdSdS(sOMove data back and forth.

        Returns whether any data was moved.
        iiN(RtseekRtreadttruncateRtdataReceivedR(RtcDatatsDatatbyte((s:/usr/lib/python2.7/dist-packages/twisted/test/testutils.pyR	s



(t__name__t
__module__t__doc__RR
R	(((s:/usr/lib/python2.7/dist-packages/twisted/test/testutils.pyRs		cCsetƒ}tƒ}|jt|ƒƒ|jt|ƒƒt||||ƒ}|jƒ|jƒ|S(s2Take two Protocol instances and connect them.
    (RtmakeConnectionRRR
(RRtciotsioR	((s:/usr/lib/python2.7/dist-packages/twisted/test/testutils.pytreturnConnected+s		

N((t	cStringIORttwisted.internet.protocolRRR(((s:/usr/lib/python2.7/dist-packages/twisted/test/testutils.pyt<module>s'