Ϫf FdZddlmZddlmZmZddlmZGddeZy)z Tests for L{twisted.internet._baseprocess} which implements process-related functionality that is useful in all platforms supporting L{IReactorProcess}. ) BaseProcess)getWarningMethodsetWarningMethod)TestCaseceZdZdZdZdZy)BaseProcessTestsz Tests for L{BaseProcess}, a parent class for other classes which represent processes which implements functionality common to many different process implementations. c"Gdd}td}t|}|j||jjj t|j ||jjjy)z L{BaseProcess._callProcessExited} calls the C{processExited} method of its C{proto} attribute and passes it a L{Failure} wrapping the given exception. ceZdZdZdZy):BaseProcessTests.test_callProcessExited..FakeProtoNc||_yN)reason)selfrs H/usr/lib/python3/dist-packages/twisted/internet/test/test_baseprocess.py processExitedzHBaseProcessTests.test_callProcessExited..FakeProto.processExiteds $ )__name__ __module__ __qualname__rrrr FakeProtor s F %rrz fake reasonN) RuntimeErrorr_callProcessExitedprotortrapassertIsvalue)rrrprocesss rtest_callProcessExitedz'BaseProcessTests.test_callProcessExitedsh % % m,ik*""6* !!,/ fgmm22889rcGdd}t}t|}|jtt gfd}t||j |\\}}}|j |d|jd|jd|j|t|j |dy) z L{BaseProcess._callProcessExited} emits a L{DeprecationWarning} if the object referred to by its C{proto} attribute has no C{processExited} method. c eZdZy)ABaseProcessTests.test_callProcessExitedMissing..FakeProtoN)rrrrrrrr"/s rrc.j|||fyr )append)messagecategory stacklevelwarningss rcollectz?BaseProcessTests.test_callProcessExitedMissing..collect8s OOWh ; *> @R@R T h 23 Q'rN)rrr__doc__rr/rrrrrs :&#(rrN) r0twisted.internet._baseprocessrtwisted.python.deprecaterrtwisted.trial.unittestrrrrrr4s! 6G+=(x=(r