Your IP : 172.28.240.42


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


[XMc@sXddlmZmZddlmZmZmZdefdYZdej	fdYZ
dej	fdYZd	ej	fd
YZdej	fdYZ
d
ej	fdYZdej	fdYZde_dej	fdYZdej	fdYZdej	fdYZdej	fdYZdZdS(i(tunittesttutil(treactortprotocoltdefertFoolishErrorcBseZRS((t__name__t
__module__(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR	stTestFailureInSetUpcBseZdZdZRS(cCs
tddS(NsI am a broken setUp method(R(tself((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pytsetUpscCsdS(N((R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyt	test_noops(RRR
R(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR
s	tTestFailureInTearDowncBseZdZdZRS(cCs
tddS(NsI am a broken tearDown method(R(R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyttearDownscCsdS(N((R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyRs(RRR
R(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyRs	tTestRegularFailcBs#eZdZdZdZRS(cCs|jddS(NsI fail(tfail(R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyt	test_failscCs|jdS(N(t
subroutine(R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyttest_subfail!scCs|jddS(Ns
I fail inside(R(R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR$s(RRRRR(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyRs		tTestFailureInDeferredChaincBseZdZdZRS(cCs6tj}|j|jtjd|jd|S(Ni(RtDeferredtaddCallbackt_laterRt	callLatertcallbacktNone(R	td((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR(scCs|jddS(NsI fail later(R(R	tres((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR-s(RRRR(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR's	t	ErrorTestcBseZdZeZdZRS(s
    A test case which has a L{test_foo} which will raise an error.

    @ivar ran: boolean indicating whether L{test_foo} has been run.
    cCst|_dddS(sJ
        Set C{self.ran} to True and raise a C{ZeroDivisionError}
        iiN(tTruetran(R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyttest_foo:s	(RRt__doc__tFalseRR(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR2stTestSkipTestCasecBseZRS((RR(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR"Cssskipping this testtDelayedCallcBs>eZdZdZdZejdddege_RS(ssomething blew upcCst|jdS(N(tRuntimeErrorthiddenExceptionMsg(R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pytgoLscCs1tjd|jtjd|jddS(s
        What happens if an error is raised in a DelayedCall and an error is
        also raised in the test?

        L{test_reporter.TestErrorReporting.testHiddenException} checks that
        both errors get reported.

        Note that this behaviour is deprecated. A B{real} test would return a
        Deferred that got triggered by the callLater. This would guarantee the
        delayed call error gets reported.
        ig{Gz?s/Deliberate failure to mask the hidden exceptionN(RRR&titerateR(R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyttestHiddenExceptionOs
tmessages!reactor\.iterate cannot be used.*tcategory(RRR%R&R(RtsuppresstDeprecationWarning(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR#Is			tReactorCleanupTestscBseZdZRS(cCsd}tjd|dS(NcSs	dGHdS(Nsfoo!((((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyt_esg@(RR(R	R.((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyttest_leftoverPendingCallsds	(RRR/(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR-cstSocketOpenTestcBseZdZRS(cCs,tj}tj|_tjd|dS(Ni(RtFactorytProtocolRt	listenTCP(R	tf((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyttest_socketsLeftOpenjs(RRR5(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR0istTimingOutDeferredcBs#eZdZdZdZRS(cCsdS(N((R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyt
test_alphapscCst|_tj}|S(N(RtmethodCalledRR(R	R((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyttest_deferredThatNeverFiresss	cCsdS(N((R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyt
test_omegaxs(RRR7R9R:(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyR6os		cCsdS(sci will raise an unexpected exception...
    ... *CAUSE THAT'S THE KINDA GUY I AM*

    >>> 1/0
    N((R	((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pytunexpectedException|sN(t
twisted.trialRRttwisted.internetRRRt	ExceptionRtTestCaseRRRRRR"tskipR#R-R0R6R;(((s@/usr/lib/python2.7/dist-packages/twisted/trial/test/erroneous.pyt<module>s