403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/twisted/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyc
ó
ê=Nc@sqdZddlZddlZddlmZddlmZddlmZd„Z	defd„ƒYZ
dS(	s=
Python 2.5+ test cases for failures thrown into generators.
iÿÿÿÿN(tTestCase(tFailure(tdefercCs#yddWntƒ}nX|S(Nii(R(tf((sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pytgetDivisionFailures

tTwoPointFiveFailureTestscBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cs«tƒ}tjƒ}y|jƒWn|jƒnXg‰‡fd†}d„}tj|ƒ}||ƒj|ƒˆ\}|jtj	|j
ƒƒdddƒdS(sx
        inlineCallbacks that re-raise tracebacks into their deferred
        should not lose their tracebacsk.
        csˆj|ƒdS(N(tappend(tresult(tfailures(sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyt
collect_error*scss	|VdS(N((td((sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pytic-siÿÿÿÿs1/0N(RRtDeferredtraiseExceptionterrbacktinlineCallbackst
addErrbacktassertEqualt	tracebackt
extract_tbtgetTracebackObject(tselfRR
R	Rt
newFailure((RsH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyttest_inlineCallbacksTracebackss			cCs6y|j|ƒWntk
r$nX|jdƒdS(Ns<throwExceptionIntoGenerator should have raised StopIteration(tthrowExceptionIntoGeneratort
StopIterationtfail(RRtg((sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyt_throwIntoGenerator9s

cs§g‰‡‡fd†}|ƒ}tƒ}|jƒˆj||ƒˆjˆddtƒˆjtˆddtƒƒˆjtjˆddƒdddƒdS(sr
        It should be possible to throw the exception that a Failure
        represents into a generator.
        c3s7y	dVWnˆjtjƒƒnXˆjdƒdS(Ns$Yield should have yielded exception.(Rtsystexc_infoR((Rtstuff(sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyt	generatorHs
	iiiiÿÿÿÿs1/0N(	RtnextRRtZeroDivisionErrort
assertTruet
isinstanceRR(RR RR((RRsH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyt test_throwExceptionIntoGeneratorBs		
csetƒ}|jƒg‰‡‡fd†}|ƒ}|jƒˆj||ƒˆjˆ|gƒdS(sÆ
        Within an exception handler, it should be possible to find the
        original Failure that caused the current exception (if it was
        caused by throwExceptionIntoGenerator).
        c3s7y	dVWnˆjtjƒƒnXˆjdƒdS(NsNo exception sent to generator(RRt_findFailureR((t
foundFailuresR(sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyR ds
	N(RtcleanFailureR!RR(RRR R((RR'sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyttest_findFailureInGeneratorZs	
	
csˆtƒ}|jƒg‰‡‡fd†}|ƒ}|jƒˆj||ƒˆjtˆƒdƒˆjˆdjƒ|jƒƒdS(sï
        When a Failure is constructed in the context of an exception
        handler that is handling an exception raised by
        throwExceptionIntoGenerator, the new Failure should be chained to that
        original Failure.
        c3s4y	dVWnˆjtƒƒnXˆjdƒdS(NsNo exception sent to generator(RRR((RtnewFailures(sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyR s
	iiN(RR(R!RRtlentgetTraceback(RRR R((RR*sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyt,test_failureConstructionFindsOriginalFailuress	
	
cs?‡fd†}|ƒ}|jƒtƒ}ˆj||ƒdS(s¼
        When a generator reraises a different exception,
        L{Failure._findFailure} inside the generator should find the reraised
        exception rather than original one.
        c3sCyy	dVWngdnXWnˆjtƒjtƒnXdS(Ni(tassertIsInstanceRtvaluet
IndexError((R(sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyR “s	N(R!RR(RR RR((RsH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyt test_ambiguousFailureInGenerators
	
	cCs]d„}|ƒ}|jƒtƒ}y|j||ƒWn|jtƒjtƒnXdS(s»
        When a generator reraises a different exception,
        L{Failure._findFailure} above the generator should find the reraised
        exception rather than original one.
        cssy	dVWngdnXdS(Ni((((sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyR ¦s	N(R!RRR.RR/R0(RR RR((sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyt"test_ambiguousFailureFromGenerator s		
	(	t__name__t
__module__RRR%R)R-R1R2(((sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyRs							(t__doc__RRttwisted.trial.unittestRttwisted.python.failureRttwisted.internetRRR(((sH/usr/lib/python2.7/dist-packages/twisted/test/generator_failure_tests.pyt<module>s		

Youez - 2016 - github.com/yon3zu
LinuXploit