python (3.11.7)

(root)/
lib/
python3.11/
unittest/
test/
__pycache__/
test_assertions.cpython-311.opt-1.pyc

e8CddlZddlZddlZddlZddlmZddlmZGddejZ	GddejZ
edkrejdSdS)	N)
gc_collect)productc,eZdZdZdZdZdZdZdS)Test_Assertionsc&|dd|dd||j|jdd||j|jdd|ddd||j|jddd|ddd|ddd||j|jddd||j|jddd|t	d	t	d	||j|jt	d	t	d	dS)
Ng1??g?皙?r)placesy??inf)assertAlmostEqualassertNotAlmostEqualassertRaisesfailureExceptionfloatselfs Q/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/unittest/test/test_assertions.pytest_AlmostEqualz Test_Assertions.test_AlmostEqual
sz3///!!)S111$/0)S	B	B	B$/3Z	F	F	F	
sC222$/0#s1		F	F	F	
q&333!!!VA!666$/0!VA		G	G	G$/3Qq		J	J	J	
uU||U5\\:::$/1J,,e	6	6	6	6	6cz|ddd|ddd|ddd|ddd|ddd||j|jddd||j|jddd||j|jddd|t|jdddd|t|jddddt
j}|tjd	z}|||tjd
	|||tjd	dS)Nr	rg?)deltag?)r
r
)seconds)r
rrr	TypeErrordatetimenow	timedelta)rfirstseconds   rtest_AmostEqualWithDeltaz(Test_Assertions.test_AmostEqualWithDelta!ssCs333sCs333!!#s$!777!!#s$!777sCs333$/1Js#		/	/	/	
$/1Gs$		0	0	0$/1Js#		/	/	/	
)T%;s1A		7	7	7)T%>s1A		7	7	7!%%''+B7777uf%-%7%C%C%C		E	E	E!!%(0(:1(E(E(E	"	G	G	G	G	Grcd}|t|t|t|td	|td|dn:#|j$r-}|dt|Yd}~nd}~wwxYw	|t|t|dn#t$rYnwxYw|t5}	t#t$r}|}d}~wwxYw#1swxYwY||j	||t5td#1swxYwY	|t5	dddn#1swxYwY|dn:#|j$r-}|dt|Yd}~nd}~wwxYw	|t5t#1swxYwY	|ddS#t$rYdSwxYw)Nc|N)es r_raisez1Test_Assertions.test_assertRaises.<locals>._raise=sGrkeycdSr'r(r(rr<lambda>z3Test_Assertions.test_assertRaises.<locals>.<lambda>BsrzassertRaises() didn't failzKeyError not raisedz0assertRaises() didn't let exception pass through)
rKeyErrorfailrassertInstr
ValueError	ExceptionassertIs	exception)rr*r)cmexcs     rtest_assertRaisesz!Test_Assertions.test_assertRaises<so			(FH555(FHUOO<<<	4h555
II23333$	9	9	9MM/Q88888888	9	Jh
;;;
IIHIIII			D	

x
(
(	B




									


blC(((


x
(
(	"	"5//!	"	"	"	"	"	"	"	"	4""8,,


















II23333$	9	9	9MM/Q88888888	9	J""8,,
!
!  
!
!
!
!
!
!
!
!
!

IIHIIIII			DD	sB
B8#B33B8<!C33
D?DD;D&&
D80D33D88D;;D?D?;FFFG 1F?3G ?GG GG  
H*#HHI 5H==II II  
I.-I.c~GdddGfddtj}|dt||dt|dS)NceZdZdS)<Test_Assertions.test_assertRaises_frames_survival.<locals>.AN)__name__
__module____qualname__r(rrAr;isDrr?c(eZdZfdZdZdZdS)>Test_Assertions.test_assertRaises_frames_survival.<locals>.Foocz}tj|	t#t$rtwxYwr')weakrefrefOSErrorr2)rar?wrs  rfoozBTest_Assertions.test_assertRaises_frames_survival.<locals>.Foo.fooosFACC[^^%!M%%%$$%s(:cF|t|jdSr'rr2rHrs rtest_functionalzNTest_Assertions.test_assertRaises_frames_survival.<locals>.Foo.test_functionalxs !!*dh77777rc|t5|ddddS#1swxYwYdSr'rJrs r	test_withzHTest_Assertions.test_assertRaises_frames_survival.<locals>.Foo.test_with{s&&z22HHJJJs=AAN)r<r=r>rHrKrM)r?rGsrFoorAmsQ
%
%
%
%
%
%
8
8
8




rrNrKrM)unittestTestCaserunrassertIsNone)rrNr?rGs  @@r!test_assertRaises_frames_survivalz1Test_Assertions.test_assertRaises_frames_survivalfs								
								(#			$	""$$$""$$K""$$rc|dd	|ddd|ddS#|j$r,}|d|jdYd}~dSd}~wwxYw)NzAla ma kotazr+zk.tMessagez"assertNotRegex should have failed.r)assertNotRegexr/rr0args)rr)s  rtestAssertNotRegexz"Test_Assertions.testAssertNotRegexsM5111	<
vyAAA
II:;;;;;$	0	0	0MM)QVAY/////////	0sA
A<!A77A<N)r<r=r>rr$r8rSrXr(rrrr	sg666.GGG6(J(J(JT   @<<<<<rrceZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#S)$TestLongMessagezTest that the individual asserts honour longMessage.
    This actually tests all the message behaviour for
    asserts that use longMessage.cGfddtj}Gfddtj}|d_|d_dS)Nc(eZdZdZjZdZdS)0TestLongMessage.setUp.<locals>.TestableTestFalseFcdSr'r(rs rtestTestz9TestLongMessage.setUp.<locals>.TestableTestFalse.testTestrNr<r=r>longMessagerr_rsrTestableTestFalser]s2K#4




rrcc(eZdZdZjZdZdS)/TestLongMessage.setUp.<locals>.TestableTestTrueTcdSr'r(rs rr_z8TestLongMessage.setUp.<locals>.TestableTestTrue.testTestr`rNrarsrTestableTestTrueres2K#4




rrgr_)rOrPtestableTrue
testableFalse)rrcrgs`  rsetUpzTestLongMessage.setUps							 1										x0			-,Z88..z::rcN|tjjdSr')
assertTruerOrPrbrs rtestDefaultzTestLongMessage.testDefaults )566666rc||jddd||jddd||jddd||jddd|jt	ddS)NrHbarz	bar : foo)assertEqualri_formatMessagerhobjectrs rtest_formatMsgzTestLongMessage.test_formatMsgs+::4GGOOO+::5%HH%PPP*99$FFNNN*99%GGUUU	
((599999rcddtdD}|j|ddS)Nc34K|]}t|VdSr')chr).0is  r	<genexpr>zCTestLongMessage.test_formatMessage_unicode_error.<locals>.<genexpr>s(11c!ff111111ru�)joinrangerhrq)rones  r test_formatMessage_unicode_errorz0TestLongMessage.test_formatMessage_unicode_errorsGgg11eCjj11111((h77777rcfd}t|D]Y\}}||}i}|dz}	|	rddi}j|5||i|dddn#1swxYwYZdS)a_
        Check that methodName(*args) raises the correct error messages.
        errors should be a list of 4 regex that match the error when:
          1) longMessage = False and no msg passed;
          2) longMessage = False and msg passed;
          3) longMessage = True and no msg passed;
          4) longMessage = True and msg passed;
        cR|dk}|rj}nj}t|S)Nr)rirhgetattr)ryuseTestableFalsetest
methodNamers   r	getMethodz1TestLongMessage.assertMessages.<locals>.getMethods7 !A
))(4,,,rrmsgoops)expected_regexN)	enumerateassertRaisesRegexr)
rrrWerrorsrryr
testMethodkwargswithMsgs
``        rassertMessageszTestLongMessage.assertMessagess	-	-	-	-	-	-"+6!2!2		,		,A~"1JF!eG
)''(=7E(GG
,
,
D+F+++
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,		,		,s	A&&A*	-A*	c8|ddgddS)Nrl)F)^False is not true$^oops$rz^False is not true : oops$rrs rtestAssertTruezTestLongMessage.testAssertTrues7L(;;;	<	<	<	<	<rc8|ddgddS)NassertFalse)T)^True is not false$rrz^True is not false : oops$rrs rtestAssertFalsezTestLongMessage.testAssertFalses7M7;;;	<	<	<	<	<rc8|ddgddS)NassertNotEqualrr)^1 == 1$rrz^1 == 1 : oops$rrs rtestNotEqualzTestLongMessage.testNotEquals8,f000	1	1	1	1	1rc8|ddgddS)Nr
rr))^1 != 2 within 7 places \(1 difference\)$rrz0^1 != 2 within 7 places \(1 difference\) : oops$rrs rtestAlmostEqualzTestLongMessage.testAlmostEquals@
B
B
B	C	C	C	C	Crc8|ddgddS)Nrr)^1 == 1 within 7 places$rrz^1 == 1 within 7 places : oops$rrs rtestNotAlmostEqualz"TestLongMessage.testNotAlmostEquals@2F\\\	]	]	]	]	]rc8|ddgddS)N_baseAssertEqualr)^1 != 2$rrz^1 != 2 : oops$rrs rtest_baseAssertEqualz$TestLongMessage.test_baseAssertEquals7.QQQ	S	S	S	S	Src>|dgdgfgddS)NassertSequenceEqual)\+ \[None\]$rrz\+ \[None\] : oops$rrs rtestAssertSequenceEqualz'TestLongMessage.testAssertSequenceEquals@	
1B<555	6	6	6	6	6rcp|dttdgfgddS)NassertSetEqual)None$rrzNone : oops$)rsetrs rtestAssertSetEqualz"TestLongMessage.testAssertSetEqualsI,suuc4&kk.B---	.	.	.	.	.rc<|ddgfgddS)Nr0)^None not found in \[\]$rrz^None not found in \[\] : oops$rrs rtestAssertInzTestLongMessage.testAssertInsCJr
AAA	B	B	B	B	Brc>|dddgfgddS)NassertNotIn)%^None unexpectedly found in \[None\]$rrz,^None unexpectedly found in \[None\] : oops$rrs rtestAssertNotInzTestLongMessage.testAssertNotInsEMD4&>NNN	O	O	O	O	Orc@|diddifgddS)NassertDictEqualr+value)\+ \{'key': 'value'\}$rrz\+ \{'key': 'value'\} : oops$rrs rtestAssertDictEqualz#TestLongMessage.testAssertDictEqualsG-UG4D/E???	@	@	@	@	@rctj5tjdt|dddiifgdddddS#1swxYwYdS)NignoreassertDictContainsSubsetr+r)^Missing: 'key'$rrz^Missing: 'key' : oops$)warningscatch_warningssimplefilterDeprecationWarningrrs rtestAssertDictContainsSubsetz,TestLongMessage.testAssertDictContainsSubsets

$
&
&	=	=!(,>??? :eW=Mr<R!<!<!<
=
=
=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=s8AA Ac8|ddgddS)NassertMultiLineEqual)rurH)\+ foo$rrz\+ foo : oops$rrs rtestAssertMultiLineEqualz(TestLongMessage.testAssertMultiLineEquals82K000	1	1	1	1	1rc8|ddgddS)N
assertLessrr)^2 not less than 1$rrz^2 not less than 1 : oops$rrs rtestAssertLesszTestLongMessage.testAssertLess!s?L&RRR	S	S	S	S	Src8|ddgddS)NassertLessEqualr)^2 not less than or equal to 1$rrz&^2 not less than or equal to 1 : oops$rrs rtestAssertLessEqualz#TestLongMessage.testAssertLessEqual&s@-vGGG	H	H	H	H	Hrc8|ddgddS)N
assertGreaterr)^1 not greater than 2$rrz^1 not greater than 2 : oops$rrs rtestAssertGreaterz!TestLongMessage.testAssertGreater,s7OV>>>	?	?	?	?	?rc8|ddgddS)NassertGreaterEqualr)"^1 not greater than or equal to 2$rrz)^1 not greater than or equal to 2 : oops$rrs rtestAssertGreaterEqualz&TestLongMessage.testAssertGreaterEqual2s@0&JJJ	K	K	K	K	Krc8|ddgddS)NrR)znot None)^'not None' is not None$rrz^'not None' is not None : oops$rrs rtestAssertIsNonez TestLongMessage.testAssertIsNone8s?NM@@@	A	A	A	A	Arc8|ddgddS)NassertIsNotNoner')^unexpectedly None$rrz^unexpectedly None : oops$rrs rtestAssertIsNotNonez#TestLongMessage.testAssertIsNotNone>s8-w;;;	<	<	<	<	<rc8|ddgddS)Nr4NrH)^None is not 'foo'$rrz^None is not 'foo' : oops$rrs rtestAssertIszTestLongMessage.testAssertIsDs7J
;;;	<	<	<	<	<rc8|ddgddS)NassertIsNot)NN)^unexpectedly identical: None$rrz%^unexpectedly identical: None : oops$rrs rtestAssertIsNotzTestLongMessage.testAssertIsNotJs?M<FFF	G	G	G	G	Grc8|ddgddS)NassertRegex)rHro)^Regex didn't match:rrz!^Regex didn't match: (.*) : oops$rrs rtestAssertRegexzTestLongMessage.testAssertRegexPs?M>BBB	C	C	C	C	Crc8|ddgddS)NrV)rHrH)^Regex matched:rrz^Regex matched: (.*) : oops$rrs rrXz"TestLongMessage.testAssertNotRegexWs8,n===	>	>	>	>	>rcRt|j|jfiddif}t||D]u\\}}}t	||}	||j|5|	|i|5}
|dddn#1swxYwYdddn#1swxYwYvdS)a
        Check that the correct error messages are raised while executing:
          with method(*args):
              func()
        *errors* should be a list of 4 regex that match the error when:
          1) longMessage = False and no msg passed;
          2) longMessage = False and msg passed;
          3) longMessage = True and no msg passed;
          4) longMessage = True and msg passed;
        rrN)rrirhziprrr)rrrWfuncrpclsrerrmethodr6s           rassertMessagesCMz TestLongMessage.assertMessagesCM_sF
T'):;%)
+
+"%a..		MS&3S*--F''(<cBB

VT,V,,DFFF














		s6$	B-B8BBBBBB	"B	cH|dtfdgddS)NrcdSr'r(r(rrr-z2TestLongMessage.testAssertRaises.<locals>.<lambda>ssDr^TypeError not raised$rrz^TypeError not raised : oops$rrrs rtestAssertRaisesz TestLongMessage.testAssertRaisesrsEnylLL@@@	A	A	A	A	Arc|dtdfdgdd}|dtdf|gddS)Nrunused regexcdSr'r(r(rrr-z7TestLongMessage.testAssertRaisesRegex.<locals>.<lambda>{drrc tdr)rr(rrraise_wrong_messagezBTestLongMessage.testAssertRaisesRegex.<locals>.raise_wrong_messagesE"""rregex^"regex" does not match "foo"$rrz%^"regex" does not match "foo" : oops$rrrs  rtestAssertRaisesRegexz%TestLongMessage.testAssertRaisesRegexxs1I~3N*l@@@	A	A	A	#	#	#1Iw3G1HHH	I	I	I	I	IrcH|dtfdgddS)NassertWarnscdSr'r(r(rrr-z1TestLongMessage.testAssertWarns.<locals>.<lambda>sTr^UserWarning not triggered$rrz"^UserWarning not triggered : oops$rUserWarningrs rtestAssertWarnszTestLongMessage.testAssertWarnssEmk^\\EEE	F	F	F	F	Frc|dtdfdgdd}|dtdf|gddS)NassertWarnsRegexrcdSr'r(r(rrr-z6TestLongMessage.testAssertWarnsRegex.<locals>.<lambda>rrrc.tjddSr)rwarnr(rrrzATestLongMessage.testAssertWarnsRegex.<locals>.raise_wrong_messagesM%     rrrrr	s  rtestAssertWarnsRegexz$TestLongMessage.testAssertWarnsRegexs0;2O*lEEE	F	F	F	!	!	!0;2H1HHH	I	I	I	I	IrN)%r<r=r>__doc__rjrmrsrrrrrrrrrrrrrrrrrrrrrrrrrXrrr
rrr(rrrZrZs?%%;;;$777:::888
,,,8<<<
<<<
111
CCC]]]
SSS666...
BBBOOO@@@===111SSS
HHH???KKKAAA<<<<<<GGGCCC>>>&AAAIII FFFIIIIIrrZ__main__)
rrrCrOtest.supportr	itertoolsrrPrrZr<mainr(rr<module>rs######D<D<D<D<D<h'D<D<D<NLILILILILIh'LILILI^zHMOOOOOr