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/trial/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyc
ó
[³XMc@sÐddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddl
mZmZddlmZed	ƒZd
efd„ƒYZdefd
„ƒYZdS(iÿÿÿÿN(t
implements(treflect(tFailure(tutil(tTestCasetPyUnitResultAdapter(t	IReportert	ITestCase(t	erroneoustunittesttTestPyUnitTestCasecBsZeZdejfd„ƒYZd„Zd„Zejde	ddƒge_d„Z
RS(t
PyUnitTestcBseZd„ZRS(cCsdS(N((tself((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt	test_passs(t__name__t
__module__R
(((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyRscCs(|jdƒ|_t|jƒ|_dS(NR
(RtoriginalRttest(R((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pytsetUpscs?g‰‡fd†}|jj|ƒ|jˆ|jgƒdS(sB
        Trial assumes that test cases implement visit().
        csˆj|ƒdS(N(tappend(R(tlog(sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pytvisitor(sN(RtvisittassertEqual(RR((RsH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt
test_visit#stcategorytmessages'Test visitors deprecated in Twisted 8.0cCs'|jt|jƒd|jfƒdS(sW
        Tests must be callable in order to be used with Python's unittest.py.
        s%r is not callable.N(t
assertTruetcallableR(R((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt
test_callable1s(RRtpyunitRRRRRtsuppresstDeprecationWarningR(((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR
s		
tTestPyUnitResultcBsVeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
RS(	s¹
    Tests to show that PyUnitResultAdapter wraps TestResult objects from the
    standard library 'unittest' module in such a way as to make them usable and
    useful from Trial.
    cCsVdtfd„ƒY}tjdƒ}|ƒ}|j|ƒ|j|jdtƒdS(sƒ
        The L{PyUnitResultAdapter} is only used when the result passed to
        C{run} does *not* provide L{IReporter}.
        tStubReportercBs<eZdZeeƒd„Zd„Zd„Zd„ZRS(sÆ
            A reporter which records data about calls made to it.

            @ivar errors: Errors passed to L{addError}.
            @ivar failures: Failures passed to L{addFailure}.
            cSsg|_g|_dS(N(terrorstfailures(R((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt__init__Os	cSsdS(s-
                Do nothing.
                N((RR((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt	startTestSscSsdS(s-
                Do nothing.
                N((RR((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pytstopTestXscSs|jj|ƒdS(s3
                Record the error.
                N(R#R(RRterror((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pytaddError]s(	RRt__doc__RRR%R&R'R)(((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR"Es
			ttest_fooiN(tobjectRt	ErrorTesttruntassertIsInstanceR#R(RR"Rtresult((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt0test_dontUseAdapterWhenReporterProvidesIReporter@s
	
cCsudtfd„ƒY}|dƒ}tjƒ}|j|ƒ|j|jƒ|jd|jƒ|j|jƒƒdS(NtSuccessTestcBseZeZd„ZRS(cSs
t|_dS(N(tTruetran(ts((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR+ls(RRtFalseR4R+(((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR2jsR+i(	RRt
TestResultR.t
failUnlessR4RttestsRunt
wasSuccessful(RR2RR0((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyttest_successis
cCsŽdtfd„ƒY}|dƒ}tjƒ}|j|ƒ|j|jƒ|jd|jƒ|jdt|j	ƒƒ|j
|jƒƒdS(NtFailureTestcBseZeZd„ZRS(cSst|_|jdƒdS(Nsboom!(R3R4tfail(R5((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR+ys	(RRR6R4R+(((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR<wsR+i(RRR7R.R8R4RR9tlenR$tfailIfR:(RR<RR0((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyttest_failurevs
cCs{tjdƒ}tjƒ}|j|ƒ|j|jƒ|jd|jƒ|jdt	|j
ƒƒ|j|jƒƒdS(NR+i(
RR-RR7R.R8R4RR9R>R#R?R:(RRR0((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt
test_error…s
cCsŽdtfd„ƒY}|dƒ}tjƒ}|j|ƒ|j|jƒ|jd|jƒ|jdt|j	ƒƒ|j|j
ƒƒdS(NR-cBs eZeZd„Zd„ZRS(cSsdddS(Nii((R((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR’scSs
t|_dS(N(R3R4(R5((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR+”s(RRR6R4RR+(((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR-s	R+i(RRR7R.R?R4RR9R>R#R:(RR-RR0((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyttest_setUpErrors
cCsŽyddWn&tk
r4tjƒ}tƒ}nXtjƒ}t|ƒ}|j||ƒ|j|j	dddj
tj|ŒƒƒdS(s‘
        Errors added through the L{PyUnitResultAdapter} have the same traceback
        information as if there were no adapter at all.
        iitN(
tZeroDivisionErrortsystexc_infoRRR7RR)RR#tjoint	tracebacktformat_exception(RRFtftpyresultR0((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyttest_tracebackFromFailureŸs

cCs©dtfd„ƒY}|dƒ}tjƒ}|j|ƒdjtj|jdƒƒ}dj|jddj	ƒd	 ƒ}|j
|jƒ|t|ƒjƒƒd
S(sG
        As test_tracebackFromFailure, but covering more code.
        R-cBseZdZd„ZRS(cSs6yddWn#tk
r1tjƒ|_‚nXdS(Nii(RDRERF(R((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR+¶s

N(RRtNoneRFR+(((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR-´sR+RCis
iiiÿÿÿÿN(
RRR7R.RGRHt	format_tbRFR#t
splitlinesRtstripR>(RR-RR0texpected_stacktobserved_stack((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyttest_traceback°s
	$cCs˜yddWn&tk
r4tjƒ}tƒ}nX|jƒtjƒ}t|ƒ}|j||ƒ|j	|j
dddjtj
|ŒƒƒdS(sÙ
        Errors added through the L{PyUnitResultAdapter} have the same
        traceback information as if there were no adapter at all, even
        if the Failure that held the information has been cleaned.
        iiRCN(RDRERFRtcleanFailureRR7RR)RR#RGRHRI(RRFRJRKR0((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyttest_tracebackFromCleanFailureÎs


(RRR*R1R;R@RARBRLRSRU(((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR!9s	)	
		
			(RERHtzope.interfaceRttwisted.pythonRttwisted.python.failureRt
twisted.trialRttwisted.trial.unittestRRttwisted.trial.itrialRRttwisted.trial.testRt
__import__RR
R!(((sH/usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt<module>s#

Youez - 2016 - github.com/yon3zu
LinuXploit