python (3.12.0)

(root)/
lib/
python3.12/
unittest/
__pycache__/
runner.cpython-312.opt-1.pyc

̑ep(dZddlZddlZddlZddlmZddlmZddlm	Z	dZ
Gdd	eZGd
dejZGdd
eZy)z
Running testsN)result)_SubTest)registerResultTc$eZdZdZdZdZddZy)_WritelnDecoratorz@Used to decorate file-like objects with a handy 'writeln' methodc||_yN)stream)selfrs  C/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/unittest/runner.py__init__z_WritelnDecorator.__init__s	cL|dvrt|t|j|S)N)r__getstate__)AttributeErrorgetattrr)rattrs  r
__getattr__z_WritelnDecorator.__getattr__s'-- &&t{{4((rNcL|r|j||jdyN
)write)rargs  r
writelnz_WritelnDecorator.writelnsJJsO

4rr
)__name__
__module____qualname____doc__rrrrr
rrsJ)
rrceZdZdZdZdZddfd
ZdZfdZd	Z	fd
Z
fdZfdZfd
Z
fdZfdZfdZdZdZxZS)TextTestResultzhA test result class that can print formatted text results to a stream.

    Used by TextTestRunner.
    zF======================================================================zF----------------------------------------------------------------------N	durationsctt||||||_|dkD|_|dk(|_||_d|_||_y)zwConstruct a TextTestResult. Subclasses should accept **kwargs
        to ensure compatibility as the interface changes.rTN)	superr"rrshowAlldotsdescriptions_newliner$)rrr)	verbosityr$	__class__s     r
rzTextTestResult.__init__&sK	nd,V\9M 1}N	(
"rc|j}|jr|rdjt||fSt|Sr)shortDescriptionr)joinstr)rtestdoc_first_lines   r
getDescriptionzTextTestResult.getDescription1s=..099c$i899t9rctt|||jrg|jj|j
||jjd|jjd|_yy)N ... F)	r&r"	startTestr'rrr3flushr*rr1r,s  r
r6zTextTestResult.startTest8sd
nd-d3<<KKd11$78KKg&KK!DM	rct|t}|s|jr|js|jj	|r|jjd|jj|j
||jjd|jj	||jjd|_y)Nz  r5T)
isinstancerr*rrrr3r7)rr1status
is_subtests    r

_write_statuszTextTestResult._write_status@sh/
==##%!!$'KKd11$78KKg&F#
rc||jr?t|d|jr|j|dn|j|dnv|jrjt|d|jr|j
j
dn|j
j
d|j
jtt|+|||y)NrFAILERRORFE)r'
issubclassfailureExceptionr=r(rrr7r&r"
addSubTest)rr1subtesterrr,s    r
rEzTextTestResult.addSubTestMs?||c!fg&>&>?&&w7&&w8c!fg&>&>?KK%%c*KK%%c*!!#
nd.tWcBrctt|||jr|j	|dy|j
r6|jjd|jjyy)Nok.)	r&r"
addSuccessr'r=r(rrr7r8s  r
rKzTextTestResult.addSuccess\sW
nd.t4<<tT*
YYKKc"KKrctt||||jr|j	|dy|j
r6|jjd|jjyy)Nr@rB)	r&r"addErrorr'r=r(rrr7rr1rGr,s   r
rMzTextTestResult.addErrordsY
nd,T37<<tW-
YYKKc"KKrctt||||jr|j	|dy|j
r6|jjd|jjyy)Nr?rA)	r&r"
addFailurer'r=r(rrr7rNs   r
rPzTextTestResult.addFailurelsY
nd.tS9<<tV,
YYKKc"KKrctt||||jr"|j	|dj|y|jr6|jjd|jjyy)Nz
skipped {0!r}s)
r&r"addSkipr'r=formatr(rrr7)rr1reasonr,s   r
rSzTextTestResult.addSkiptsd
nd+D&9<<t_%;%;F%CD
YYKKc"KKrc6tt||||jr6|jjd|jj
y|jr6|jjd|jj
yy)Nzexpected failurex)	r&r"addExpectedFailurer'rrr7r(rrNs   r
rXz!TextTestResult.addExpectedFailure|sl
nd6tSA<<KK 23KK
YYKKc"KKrc4tt|||jr6|jjd|jj
y|jr6|jjd|jj
yy)Nzunexpected successu)	r&r"addUnexpectedSuccessr'rrr7r(rr8s  r
r[z#TextTestResult.addUnexpectedSuccesssj
nd8><<KK 45KK
YYKKc"KKrc|js|jr4|jj|jj	|jd|j|jd|jt|dd}|rt|jj|j|D]/}|jjd|j|1|jj	yy)Nr@r?unexpectedSuccessesr zUNEXPECTED SUCCESS: )r(r'rrr7printErrorListerrorsfailuresr
separator1r3)rr]r1s   r
printErrorszTextTestResult.printErrorss99KK!KKGT[[1FDMM2%d,A2FKK0+
X##&:4;N;Nt;T:U$VW
XKK	rcz|D]\}}|jj|j|jj|d|j||jj|j|jjd|z|jjy)Nz: z%s)rrrar3
separator2r7)rflavourr_r1rGs     r
r^zTextTestResult.printErrorLists	 ID#KK0KKGD4G4G4M NOKK0KKs
+KK	 r)rrrrrardrr3r6r=rErKrMrPrSrXr[rbr^
__classcell__)r,s@r
r"r"sYJJEI	#"
C        rr"c:eZdZdZeZ		d	ddddZdZdZdZ	y)
TextTestRunnerzA test runner class that displays results in textual form.

    It prints out the names of tests as they are run, errors as they
    occur, and a summary of the results at the end of the test run.
    NF)	tb_localsr$c|tj}t||_||_||_||_||_||_|	|_	||_
|||_yy)zConstruct a TextTestRunner.

        Subclasses should accept **kwargs to ensure compatibility as the
        interface changes.
        N)sysstderrrrr)r+failfastbufferrir$warningsresultclass)
rrr)r+rmrnrprorir$s
          r
rzTextTestRunner.__init__sc>ZZF'/(" 
"" 
"*D#rc	|j|j|j|j|jS#t
$r4|j|j|j|jcYSwxYw)Nr#)rprr)r+r$	TypeError)rs r
_makeResultzTextTestRunner._makeResultss	4##DKK1B1B$(NNdnn$N
N	4##DKK1B1B$(NN4
4	4s<?:A<;A<c$|jsyt|jdd}|jdkDr|d|j}|jj	dt|dr%|jj	|jd}|D]@\}}|jdkr|d	krd}|jj	d
|zdd|B|r|jj	d
y|jj	dy)Nc|dS)Nrr )rWs r
<lambda>z0TextTestRunner._printDurations.<locals>.<lambda>s
QqTrT)keyreverserzSlowest test durationsrdFgMbP?z%.3fs10 zA
(durations < 0.001s were hidden; use -v to show these durations))collectedDurationssortedr$rrhasattrrdr+)rrlshiddenr1elapseds      r
_printDurationszTextTestRunner._printDurationss((
F--> ">>AOT^^$B456<(KK 1 12	HMD'~~!goKKg.? FG		H
KK!B
C
KK#rc|j}t||j|_|j|_|j|_tj5|j
rtj|j
tj}t|dd}||	||t|dd}||	tj}dddz
}|j|j|j|t|dr%|jj!|j"|j$}|jj!d||dk7xrdxsd|fz|jj!d	x}	x}
}	t't(|j*|j,|j.f}|\}	}
}g}
|j2sr|jj5d
t)|j6t)|j8}}|r|
j;d|z|rQ|
j;d|zn<|d	k(r|jj5d
n|jj5d|r|
j;d|z|	r|
j;d|	z|
r|
j;d|
z|
r/|jj!ddj=|
dn|jj5d|jj?|S#t|dd}||wwxYw#1swYxYw#t0$rYwxYw)z&Run the given test case or test suite.startTestRunNstopTestRunrdzRan %d test%s in %.3fsrrRr|rFAILEDzfailures=%dz	errors=%dzNO TESTS RANOKz
skipped=%dzexpected failures=%dzunexpected successes=%dz (z, )r) rsrrmrnrirocatch_warningssimplefiltertimeperf_counterrrbr$rrrrrdtestsRunmaplenexpectedFailuresr]skippedr
wasSuccessfulrr`r_appendr/r7)rr1r	startTimerrstopTime	timeTakenrun
expectedFailsr]rresultsinfosfailederroreds                r
rzTextTestRunner.runs!!#v--
>>

$
$
&	+}}%%dmm4))+I"6>4@L'
"V%fmTB*M((*H	+y(	>>%  (6<(KK 1 12oo4 #("2s"8b)DE	F899
9+g	B# 7 7 & : : & 01G;B7M.#v##%KKh'!&//2C

4FGF]V34[723
AXKKn-KKd#LL/0LL/-?@LL25HHIKK499U+; =>KKd#
e&fmTB*M+	+	+B		s7#AM0:M+M021M=M--M00M:=	N
	N
)NTrFFNN)
rrrrr"rprrsrrr rr
rhrhs3
!KABJN+#t+*4$,Drrh)rrkrror|rcasersignalsr
__unittestobjectr
TestResultr"rhr rr
<module>rsN
#



 C V&&C L@V@r