Your IP : 172.28.240.42


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

ó
[³XMc@s\dZeZddlmZmZddlmZddlm	Z	defd„ƒYZ
dS(sš
Tests for L{twisted.internet._baseprocess} which implements process-related
functionality that is useful in all platforms supporting L{IReactorProcess}.
iÿÿÿÿ(tgetWarningMethodtsetWarningMethod(tTestCase(tBaseProcesstBaseProcessTestscBs eZdZd„Zd„ZRS(s·
    Tests for L{BaseProcess}, a parent class for other classes which represent
    processes which implements functionality common to many different process
    implementations.
    cCskddd„ƒY}tdƒ}t|ƒƒ}|j|ƒ|jjjtƒ|j||jjjƒdS(s¸
        L{BaseProcess._callProcessExited} calls the C{processExited} method of
        its C{proto} attribute and passes it a L{Failure} wrapping the given
        exception.
        t	FakeProtocBseZdZd„ZRS(cSs
||_dS(N(treason(tselfR((sJ/usr/lib/python2.7/dist-packages/twisted/internet/test/test_baseprocess.pyt
processExitedsN(t__name__t
__module__tNoneRR(((sJ/usr/lib/python2.7/dist-packages/twisted/internet/test/test_baseprocess.pyRssfake reasonN((tRuntimeErrorRt_callProcessExitedtprotoRttraptassertIdenticaltvalue(RRRtprocess((sJ/usr/lib/python2.7/dist-packages/twisted/internet/test/test_baseprocess.pyttest_callProcessExiteds
csÀddd„ƒY}tƒ}t|ƒƒ}|jttƒƒg‰‡fd†}t|ƒ|j|ƒˆ\\}}}|j|d|j|jfƒ|j	|t
ƒ|j|dƒdS(sµ
        L{BaseProcess._callProcessExited} emits a L{DeprecationWarning} if the
        object referred to by its C{proto} attribute has no C{processExited}
        method.
        RcBseZRS((R	R
(((sJ/usr/lib/python2.7/dist-packages/twisted/internet/test/test_baseprocess.pyR/scsˆj|||fƒdS(N(tappend(tmessagetcategoryt
stacklevel(twarnings(sJ/usr/lib/python2.7/dist-packages/twisted/internet/test/test_baseprocess.pytcollect7ssXSince Twisted 8.2, IProcessProtocol.processExited is required.  %s.%s must implement it.iN((tobjectRt
addCleanupRRR
tassertEqualR
R	RtDeprecationWarning(RRRRRRRR((RsJ/usr/lib/python2.7/dist-packages/twisted/internet/test/test_baseprocess.pyttest_callProcessExitedMissing)s	

(R	R
t__doc__RR(((sJ/usr/lib/python2.7/dist-packages/twisted/internet/test/test_baseprocess.pyRs	N(Rttypet
__metaclass__ttwisted.python.deprecateRRttwisted.trial.unittestRttwisted.internet._baseprocessRR(((sJ/usr/lib/python2.7/dist-packages/twisted/internet/test/test_baseprocess.pyt<module>s