python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_with.cpython-311.opt-2.pyc

ehL	dZdZddlZddlZddlmZddlmZmZm	Z	GddeZ
dZGd	d
eZ
edZGdd
eZGddeZGddejZGddeZGddejeZGddejeZGddeejZGddejZGddejZGddejZGd d!ejZed"krejdSdS)#z
Mike Blandzmbland at acm dot orgN)deque)_GeneratorContextManagercontextmanagernullcontextc*eZdZfdZdZdZxZS)MockContextManagerc^tj|d|_d|_d|_dSNF)super__init__enter_calledexit_called	exit_args)selfargs	__class__s  B/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_with.pyrzMockContextManager.__init__s2$! c8d|_tj|SNT)r
r	__enter__rs rrzMockContextManager.__enter__s '1$777rcRd|_|||f|_tj||||Sr)rrr__exit__rtypevalue	tracebacks    rrzMockContextManager.__exit__s9y1'0t16	CC	Cr)__name__
__module____qualname__rrr
__classcell__)rs@rrr
s]888CCCCCCCrrcfd}|S)Nc&t||SN)r)rkwdsfuncs  rhelperz#mock_contextmanager.<locals>.helper s!$d333r)r'r(s` rmock_contextmanagerr*s!44444MrceZdZdZdS)MockResourcec"d|_d|_dSr
)yieldedstoppedrs rrzMockResource.__init__&srNrr r!rr)rrr,r,%s#rr,c#dKt}	d|_|Vd|_dS#d|_wxYwr)r,r.r/)mocks rmock_contextmanager_generatorr3+sB>>D


ts&	/c eZdZdZdZdZdS)Nestedc"||_d|_dSr%)managersenteredrr7s  rrzNested.__init__7s 
rc<|jtdt|_g}	|jD]C}|||j|Dn##|jtj	sYnxYw|S)NzContext is not reentrant)
r8RuntimeErrorrr7appendr
appendleftrsysexc_info)rvarsmgrs   rrzNested.__enter__;s<#9:::ww	}
-
-CMMOO,,,'',,,,
-	 4=#,..1


sAA99Bc|}|jD])}	|j|rd}#tj}Y'xYwd|_||ur0|d|d|ddS)NNNNr)r8rr>r?with_traceback)rr?exrAs    rrzNested.__exit__Is<	$	$C
$3<$,+B
$\^^
X"Q%1,,--be444s1Nrr r!rrrr)rrr5r55sA
5
5
5
5
5rr5c eZdZdZdZdZdS)
MockNestedcTtj|g|Rd|_d|_d|_dSr
)r5rr
rrr9s  rrzMockNested.__init__Zs5(x((((! rcDd|_t|Sr)r
r5rrs rrzMockNested.__enter__`s %%%rcBd|_||_tj|g|RSr)rrr5rrr?s  rrzMockNested.__exit__ds)!t/h////rNrHr)rrrJrJYsA&&&00000rrJcJeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdS)FailureTestCasecBd}|t|dS)NcFt5ddddS#1swxYwYdSr%foor)rrfooNotDeclaredz5FailureTestCase.testNameError.<locals>.fooNotDeclaredls0NNNNNNNNNNNNNNNNNNNNs)assertRaises	NameError)rrUs  r
testNameErrorzFailureTestCase.testNameErrorks-			)^44444rcpGddtfd}|td|dS)NceZdZdZdS)<FailureTestCase.testEnterAttributeError1.<locals>.LacksEntercdSr%r)rs    rrzEFailureTestCase.testEnterAttributeError1.<locals>.LacksEnter.__exit__rrN)rr r!rr)rr
LacksEnterr[q#




rr^cR}|5ddddS#1swxYwYdSr%r))rTr^s r
fooLacksEnterz?FailureTestCase.testEnterAttributeError1.<locals>.fooLacksEnterus<*,,CNNNNNNNNNNNNNNNNNNNN  the context managerobjectassertRaisesRegex	TypeError)rrar^s  @rtestEnterAttributeError1z(FailureTestCase.testEnterAttributeError1psg														
y*?OOOOOrcpGddtfd}|td|dS)NceZdZdS)CFailureTestCase.testEnterAttributeError2.<locals>.LacksEnterAndExitNrr r!r)rrLacksEnterAndExitrk{sDrrmcR}|5ddddS#1swxYwYdSr%r))rTrms rfooLacksEnterAndExitzFFailureTestCase.testEnterAttributeError2.<locals>.fooLacksEnterAndExit~s?##%%CNNNNNNNNNNNNNNNNNNNNrbrcrd)rrorms  @rtestEnterAttributeError2z(FailureTestCase.testEnterAttributeError2zsh														
y*?AUVVVVVrcpGddtfd}|td|dS)NceZdZdZdS)9FailureTestCase.testExitAttributeError.<locals>.LacksExitcdSr%r)rs rrzCFailureTestCase.testExitAttributeError.<locals>.LacksExit.__enter__r]rN)rr r!rr)rr	LacksExitrsr_rrucR}|5ddddS#1swxYwYdSr%r))rTrus rfooLacksExitz<FailureTestCase.testExitAttributeError.<locals>.fooLacksExits<)++CNNNNNNNNNNNNNNNNNNNNrbzthe context manager.*__exit__rd)rrwrus  @rtestExitAttributeErrorz&FailureTestCase.testExitAttributeErrorsg														
y*I<XXXXXrcDd}|t||dS)Nc(t|dddS)Nsingle)compile)ss rshouldRaiseSyntaxErrorzGFailureTestCase.assertRaisesSyntaxError.<locals>.shouldRaiseSyntaxErrorsAr8$$$$$r)rVSyntaxError)rcodestrrs   rassertRaisesSyntaxErrorz'FailureTestCase.assertRaisesSyntaxErrors0	%	%	%+'=wGGGGGrcZ|d|ddS)Nzwith mock as None:
  passzwith mock as (None):
  passrrs rtestAssignmentToNoneErrorz)FailureTestCase.testAssignmentToNoneErrors>$$%ABBB$$
					rcZ|d|ddS)Nzwith mock as None,:
  passzwith mock as (None,):
  passrrs r,testAssignmentToTupleOnlyContainingNoneErrorz<FailureTestCase.testAssignmentToTupleOnlyContainingNoneErrors>$$%BCCC$$
					rc0|ddS)Nz%with mock as (foo, None, bar):
  passrrs r(testAssignmentToTupleContainingNoneErrorz8FailureTestCase.testAssignmentToTupleContainingNoneErrors)$$
					rcGddtfd}t|jddS)NceZdZdZdZdS)4FailureTestCase.testEnterThrows.<locals>.EnterThrowsc td)NzEnter threwr;rs rrz>FailureTestCase.testEnterThrows.<locals>.EnterThrows.__enter__s"=111rcdSr%r)rrs  rrz=FailureTestCase.testEnterThrows.<locals>.EnterThrows.__exit__r]rNrr r!rrr)rrEnterThrowsrs2
2
2
2




rrcl}d_|5_	ddddS#1swxYwYdSr%rS)ctrrs rshouldThrowz4FailureTestCase.testEnterThrows.<locals>.shouldThrowsBDH
tx

















s)--)rerVr;assertEqualrT)rrrs` @rtestEnterThrowszFailureTestCase.testEnterThrowss					&									
	
,4444(((((rcnGddtfd}|t|dS)NceZdZdZdZdS)2FailureTestCase.testExitThrows.<locals>.ExitThrowscdSr%r)rs rrz<FailureTestCase.testExitThrows.<locals>.ExitThrows.__enter__src td)N*rrs  rrz;FailureTestCase.testExitThrows.<locals>.ExitThrows.__exit__s"2&&&rNrr)rr
ExitThrowsrs2



'
'
'
'
'rrcP5	ddddS#1swxYwYdSr%r))rsrrz3FailureTestCase.testExitThrows.<locals>.shouldThrowsv



















s)rerVr;)rrrs  @rtestExitThrowszFailureTestCase.testExitThrowssd	'	'	'	'	'	'	'	'
						
,44444rN)
rr r!rXrhrprxrrrrrrr)rrrPrPjs555
PPPWWWYYYHHH


)
)
)	5	5	5	5	5rrPcHeZdZdZdZdZdZdZdZdZ		dd	Z
d
ZdS)ContextmanagerAssertionMixinc.td|_dS)Nztest exception)r;TEST_EXCEPTIONrs rsetUpz"ContextmanagerAssertionMixin.setUps*+;<<rc||j||j||jddSr%)
assertTruer
assertFalserrrrmock_managers  rassertInWithManagerInvariantsz:ContextmanagerAssertionMixin.assertInWithManagerInvariantssM12221222/66666rc||j||j||j|dSr%)rr
rrr)rrrs   r assertAfterWithManagerInvariantsz=ContextmanagerAssertionMixin.assertAfterWithManagerInvariantssK12220111/;;;;;rc2||ddS)NrC)rrs  r'assertAfterWithManagerInvariantsNoErrorzDContextmanagerAssertionMixin.assertAfterWithManagerInvariantsNoErrors)--l	 	 	 	 	 rcn||j||jdSr%)rr.rr/rmock_generators  rassertInWithGeneratorInvariantsz<ContextmanagerAssertionMixin.assertInWithGeneratorInvariantss4.////00000rcn||j||jdSr%rr.r/rs  r)assertAfterWithGeneratorInvariantsNoErrorzFContextmanagerAssertionMixin.assertAfterWithGeneratorInvariantsNoError2.///./////rc|jr%)rrs rraiseTestExceptionz/ContextmanagerAssertionMixin.raiseTestExceptions!!rNc||j||j|:||jd|jt
|j}||jd|||jd|||jdddS)NrDrrE)	rr
rrrrrassertIsInstanceassertIsNot)rrexc_types   r)assertAfterWithManagerInvariantsWithErrorzFContextmanagerAssertionMixin.assertAfterWithManagerInvariantsWithErrors12220111\3A68KLLLD/00H/2H===l4Q7BBB/2D99999rcn||j||jdSr%rrs  r+assertAfterWithGeneratorInvariantsWithErrorzHContextmanagerAssertionMixin.assertAfterWithGeneratorInvariantsWithErrorrrr%)rr r!rrrrrrrrrr)rrrrs===777
<<<
   111000"""<@
:
:
:
:00000rrc8eZdZdZdZdZdZdZdZdZ	dS)	NonexceptionalTestCasecVt5	ddddS#1swxYwYdSr%r3rs rtestInlineGeneratorSyntaxz0NonexceptionalTestCase.testInlineGeneratorSyntaxsu
*
,
,																				s""ct}|5	dddn#1swxYwY||dSr%)r3r)rr2s  rtestUnboundGeneratorz+NonexceptionalTestCase.testUnboundGenerators,..
																	44T:::::s##ct5}||dddn#1swxYwY||dSr%r3rrrrTs  rtestInlineGeneratorBoundSyntaxz5NonexceptionalTestCase.testInlineGeneratorBoundSyntaxs
*
,
,	600555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6	
66s;;;;;s155cd}t5}||dddn#1swxYwY||dSr%rrs  r*testInlineGeneratorBoundToExistingVariablezANonexceptionalTestCase.testInlineGeneratorBoundToExistingVariables
*
,
,	600555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	666s;;;;;s377ct5|_||jdddn#1swxYwY||jdSr%)r3rTrrrs r(testInlineGeneratorBoundToDottedVariablez?NonexceptionalTestCase.testInlineGeneratorBoundToDottedVariables
*
,
,	;00:::	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;66tx@@@@@s
 ;??ct}|5}||||dddn#1swxYwY||||dSr%)r3rrrr)rr2rTs   rtestBoundGeneratorz)NonexceptionalTestCase.testBoundGenerators,..
	5S00555..t444	5	5	5	5	5	5	5	5	5	5	5	5	5	5	5	
66s;;;44T:::::s+AAAcJt}|5}t}|5}||||||||dddn#1swxYwY||||||||dddn#1swxYwY||||dSr%)r3rrrr)rmock_arTmock_bbars     rtestNestedSingleStatementsz1NonexceptionalTestCase.testNestedSingleStatementss.00

	6s244F
:3226:::226:::44S99944S999	
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:

88@@@::3???..v66600555
	6
	6
	6
	6
	6
	6
	6
	6
	6
	6
	6
	6
	6
	6
	6	
44V<<<66s;;;;;s6C.AB7C.B	C.
B	AC..C25C2N)
rr r!rrrrrrrr)rrrrs;;;<<<<<<AAA
;;;<<<<<rrc8eZdZdZdZdZdZdZdZdZ	dS)	NestedNonexceptionalTestCasecptt5	ddddS#1swxYwYdSr%r5r3rs r"testSingleArgInlineGeneratorSyntaxz?NestedNonexceptionalTestCase.testSingleArgInlineGeneratorSyntax#s~
133
4
4																				s+//ct}t|5}||dddn#1swxYwY||dSr%r3r5rrrmrTs   rtestSingleArgBoundToNonTuplez9NestedNonexceptionalTestCase.testSingleArgBoundToNonTuple's)++AYY	2#..q111	2	2	2	2	2	2	2	2	2	2	2	2	2	2	244Q77777AAAct}t|5}||dddn#1swxYwY||dSr%rrs   r2testSingleArgBoundToSingleElementParenthesizedListzONestedNonexceptionalTestCase.testSingleArgBoundToSingleElementParenthesizedList/s)++AYY	23..q111	2	2	2	2	2	2	2	2	2	2	2	2	2	2	244Q77777rcBd}|t|dS)Ncvtt5\}}	ddddS#1swxYwYdSr%r)rTrs  rshouldThrowValueErrorziNestedNonexceptionalTestCase.testSingleArgBoundToMultipleElementTupleError.<locals>.shouldThrowValueError8s57788
JS#

















s.22)rV
ValueError)rrs  r-testSingleArgBoundToMultipleElementTupleErrorzJNestedNonexceptionalTestCase.testSingleArgBoundToMultipleElementTupleError7s0				
*&;<<<<<rct}t|}|5||||dddn#1swxYwY||||dSr%r3rJrr)rr*mock_nesteds   rtestSingleArgUnboundz1NestedNonexceptionalTestCase.testSingleArgUnbound=s;== !455
	<	<../BCCC..{;;;	<	<	<	<	<	<	<	<	<	<	<	<	<	<	<	
445HIII44[AAAAAs+AAAct}t}t}t|||}|5||||||||dddn#1swxYwY||||||||dSr%r)rrnors     rtestMultipleArgUnboundz3NestedNonexceptionalTestCase.testMultipleArgUnboundFs7)++)++)++ Aq))
	<	<..q111..q111..q111..{;;;		<	<	<	<	<	<	<	<	<	<	<	<	<	<	<
	
44Q77744Q77744Q77744[AAAAAsABB#&B#ctttt}|5\}}}||||||||dddn#1swxYwY||||||||dSr%)rJr3rrrr)rrrrrs     rtestMultipleArgBoundz1NestedNonexceptionalTestCase.testMultipleArgBoundUs4 !>!@!@)++-J-L-LNN
	<IQ1003330033300333..{;;;		<	<	<	<	<	<	<	<	<	<	<	<	<	<	<
	
66q99966q99966q99944[AAAAAsABB!$B!N)
rr r!rrrrrrrr)rrrr!s888888===BBB
B
B
BBBBBBrrcVeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
S)ExceptionalTestCasectfd}t|jdS)Nc5_jddddS#1swxYwYdSr%)resourcerrrcmrsrrz;ExceptionalTestCase.testSingleResource.<locals>.shouldThrowfs
*t}22266644T]CCC'')))
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*sA	AA!A)r3rVr;rrrrrrs` @rtestSingleResourcez&ExceptionalTestCase.testSingleResourcedsu
*
,
,	*	*	*	*	*	*
	
,44466r:::88GGGGGrctfd}t|tdS)NcR5_ddzddddS#1swxYwYdSNrDr)rrsrrz@ExceptionalTestCase.testExceptionNormalized.<locals>.shouldThrowqsw
t}Q

















s  )r3rVZeroDivisionErrorrrs` @rtestExceptionNormalizedz+ExceptionalTestCase.testExceptionNormalizedosc
*
,
,						
	
+[99966r;LMMMMMrcDttfd}t|jjdS)Ncj5_5_jjdddn#1swxYwYddddS#1swxYwYdSr%rTrrrrrrrsrrzCExceptionalTestCase.testNestedSingleStatements.<locals>.shouldThrow|s,
.48.tx66v>>>66v>>>88BBB88BBB++---...............
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.s5B(A8BB(B	B(B	B((B,/B,)r3rVr;rrrTrrrrrs` @@rrz.ExceptionalTestCase.testNestedSingleStatementsys.00.00	.	.	.	.	.	.	.	
,44466v>>>66v>>>88BBB88BBBBBrctttfd}t|jjdS)Ncf5\__jjddddS#1swxYwYdSr%)
resource_a
resource_brrr)cm_acm_brrsrrzOExceptionalTestCase.testMultipleResourcesInSingleStatement.<locals>.shouldThrows
* B$/22488822488822;???44T_EEE44T_EEE'')))

*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*sBB&&B*-B*)r3rJrVr;rrrr	)rrr
rrs` @@@r&testMultipleResourcesInSingleStatementz:ExceptionalTestCase.testMultipleResourcesInSingleStatements,..,.. t,,	*	*	*	*	*	*	*	*	
,44466t<<<66t<<<66{CCC88III88IIIIIrcttd_fd}t|jjdj	j
jddS)Nc5_j5_	dddn#1swxYwYddddS#1swxYwYdSr%)rTrrrrrsrrzPExceptionalTestCase.testNestedExceptionBeforeInnerStatement.<locals>.shouldThrows
48226:::44TX>>>'')))tx	

















s6AA:A"A:"A&	&A:)A&	*A::A>A>)r3rrVr;rrrTrrr
rrrs` @@r'testNestedExceptionBeforeInnerStatementz;ExceptionalTestCase.testNestedExceptionBeforeInnerStatements.00.00								
,44466v>>>88BBB	
4(((,---+,,,)400000rcDttfd}t|jjdS)Ncj5_5_jjdddn#1swxYwYddddS#1swxYwYdSr%rrsrrzOExceptionalTestCase.testNestedExceptionAfterInnerStatement.<locals>.shouldThrows>
*48Ctx66v>>>66v>>>88BBB88BBB	CCCCCCCCCCCCCCC
'')))

*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*s5B(A$A<0B(<B	B(B	B((B,/B,)	r3rVr;rrrrTrrrs` @@r&testNestedExceptionAfterInnerStatementz:ExceptionalTestCase.testNestedExceptionAfterInnerStatements.00.00	*	*	*	*	*	*	*	
,44466v>>>44V<<<88BBB66tx@@@@@rctdfd}|td5|ddddS#1swxYwYdS)Nc3KdVdSr%r)r)rrrz8ExceptionalTestCase.testRaisedStopIteration1.<locals>.cmEEEEErcR5td#1swxYwYdSN	from with
StopIterationrsrrzAExceptionalTestCase.testRaisedStopIteration1.<locals>.shouldThrowY
1
1#K000
1
1
1
1
1
1
1
1
1
1  r)rrfrrs  @rtestRaisedStopIteration1z,ExceptionalTestCase.testRaisedStopIteration1s			
		1	1	1	1	1
#
#M;
?
?		KMMM																		sA

AAcGddtfd}|td5|ddddS#1swxYwYdS)NceZdZdZdZdS)8ExceptionalTestCase.testRaisedStopIteration2.<locals>.cmcdSr%r)rs rrzBExceptionalTestCase.testRaisedStopIteration2.<locals>.cm.__enter__r]rcdSr%r)rs    rrzAExceptionalTestCase.testRaisedStopIteration2.<locals>.cm.__exit__r]rNrr)rrrr!2







rrcR5td#1swxYwYdSrrrsrrzAExceptionalTestCase.testRaisedStopIteration2.<locals>.shouldThrowrrr)rerfrrs  @rtestRaisedStopIteration2z,ExceptionalTestCase.testRaisedStopIteration2s									1	1	1	1	1
#
#M;
?
?		KMMM																		sA

AActdfd}|t5|ddddS#1swxYwYdS)Nc3KdVdSr%r)r)rrrz8ExceptionalTestCase.testRaisedStopIteration3.<locals>.cmrrcl5ttg#1swxYwYdSr%)nextiterrsrrzAExceptionalTestCase.testRaisedStopIteration3.<locals>.shouldThrows]
%
%488nn$
%
%
%
%
%
%
%
%
%
%s)--)rrVrrs  @rtestRaisedStopIteration3z,ExceptionalTestCase.testRaisedStopIteration3s
		
		%	%	%	%	%

}
-
-		KMMM																		sA		A
A
chtdfd}|t|dS)Nc3KdVdSr%r)r)rrrz8ExceptionalTestCase.testRaisedGeneratorExit1.<locals>.cmrrcR5td#1swxYwYdSr
GeneratorExitrsrrzAExceptionalTestCase.testRaisedGeneratorExit1.<locals>.shouldThrowrr)rrVr1rs  @rtestRaisedGeneratorExit1z,ExceptionalTestCase.testRaisedGeneratorExit1sS			
		1	1	1	1	1	
-55555rcnGddtfd}|t|dS)NceZdZdZdZdS)8ExceptionalTestCase.testRaisedGeneratorExit2.<locals>.cmcdSr%r)rs rrzBExceptionalTestCase.testRaisedGeneratorExit2.<locals>.cm.__enter__r]rcdSr%r)rs    rrzAExceptionalTestCase.testRaisedGeneratorExit2.<locals>.cm.__exit__r]rNrr)rrrr5r$rrcR5td#1swxYwYdSrr0rsrrzAExceptionalTestCase.testRaisedGeneratorExit2.<locals>.shouldThrowrr)rerVr1rs  @rtestRaisedGeneratorExit2z,ExceptionalTestCase.testRaisedGeneratorExit2sd					&				1	1	1	1	1	
-55555rcGddtfd}|fd}t|fd}t|dS)Nc eZdZdZdZdZdS)0ExceptionalTestCase.testErrorsInBool.<locals>.cmcDGfdd}||_dS)NceZdZfdZdS)GExceptionalTestCase.testErrorsInBool.<locals>.cm.__init__.<locals>.BoolcSr%r))rbool_conversions r__bool__zPExceptionalTestCase.testErrorsInBool.<locals>.cm.__init__.<locals>.Bool.__bool__s.000rN)rr r!rB)rAsrBoolr?
s.1111111rrCexit_result)rrArCs ` rrz9ExceptionalTestCase.testErrorsInBool.<locals>.cm.__init__sK1111111111$(466   rcdS)Nr)rs rrz:ExceptionalTestCase.testErrorsInBool.<locals>.cm.__enter__sqrc|jSr%rDrabcs    rrz9ExceptionalTestCase.testErrorsInBool.<locals>.cm.__exit__s''rNrHr)rrrr<sA
*
*
*




(
(
(
(
(rrc|d5dddddS#1swxYwYdS)NcdSrr)r)rr<lambda>zJExceptionalTestCase.testErrorsInBool.<locals>.trueAsBool.<locals>.<lambda>sDrShould NOT see thisfailrsr
trueAsBoolz8ExceptionalTestCase.testErrorsInBool.<locals>.trueAsBoolLL!!
1
1		/000
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1155c|d5dddddS#1swxYwYdS)NcdSr
r)r)rrrOzKExceptionalTestCase.testErrorsInBool.<locals>.falseAsBool.<locals>.<lambda>sErzShould raiserQrsrfalseAsBoolz9ExceptionalTestCase.testErrorsInBool.<locals>.falseAsBoolsMM""
*
*		.)))
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*rUc|d5dddddS#1swxYwYdS)NcddzSrr)r)rrrOzJExceptionalTestCase.testErrorsInBool.<locals>.failAsBool.<locals>.<lambda>!s
AqDrrPrQrsr
failAsBoolz8ExceptionalTestCase.testErrorsInBool.<locals>.failAsBool rTrU)rerVAssertionErrorr)rrSrXr[rs`   @rtestErrorsInBoolz$ExceptionalTestCase.testErrorsInBools		(		(		(		(		(		(		(		(	1	1	1	1	1	1	
	*	*	*	*	*	*	
.+666	1	1	1	1	1	1	
+Z88888rN)rr r!rrrrrrrr&r,r2r9r]r)rrrrcs	H	H	HNNNCCC"JJJ&111*AAA"



6
6
666699999rrc,eZdZdZdZdZdZdZdS)NonLocalFlowControlTestCasecd}	|dz
}t5|dz
}	dddn#1swxYwY|dz
}7||ddS)NrTrD
dr3rrcounters  r
testWithBreakz)NonLocalFlowControlTestCase.testWithBreak(s	qLG.00

2
















sNG		
"%%%%%s*..cd}	|dz
}|dkrn2t5|dz
}	ddd.#1swxYwY|dz
}>||ddS)NrTrDrErarbrdres  rtestWithContinuez,NonLocalFlowControlTestCase.testWithContinue2s	qLG{{.00

2
















sNG		
"%%%%%s155cHd}||ddS)Ncxd}	|dz
}t5|dz
}|cdddS#1swxYwY|dz
}8)NrTrDrarbr)rfs rrTz7NonLocalFlowControlTestCase.testWithReturn.<locals>.foo?sG
1244##rMG"################3
s+//rc)rrs  rtestWithReturnz*NonLocalFlowControlTestCase.testWithReturn>s5				
#####rcjd}t|}||ddgdS)Nc3hKt5dVdVddddS#1swxYwYdS)Nri
rr)rrgenz6NonLocalFlowControlTestCase.testWithYield.<locals>.genJs.00



















s	'++rirp)listr)rrqxs   r
testWithYieldz)NonLocalFlowControlTestCase.testWithYieldIsD			
KKRH%%%%%rcd}	|dz
}t5|dz
}t#1swxYwY|dz
}|ddS#t$r||dYdSwxYw)NrrDrarbzDidn't raise RuntimeErrorrc)r3r;rRrres  r
testWithRaisez)NonLocalFlowControlTestCase.testWithRaiseQs		3qLG.00
#
#2
""
#
#
#
#
#
#
#
#
sNG
II122222	*	*	*Wb))))))	*s'A
$(A(A A/.A/N)rr r!rgrjrmrtrvr)rrr_r_&s_&&&
&
&
&	$	$	$&&&33333rr_c eZdZdZdZdZdS)AssignmentTargetTestCasecNdgdi}t5|dd<|t|dg||ddjt
dddn#1swxYwYt5t|dd<|t|dg||ddjt
dddn#1swxYwYt5|d<t|}|||ddgdddn#1swxYwYGdd}|}t5|_|t|ddddddS#1swxYwYdS)	NrDrrDrErrEceZdZdS);AssignmentTargetTestCase.testSingleComplexTarget.<locals>.CNrlr)rrCr|mrr}rTT)
r3rrrkeysrr,valuessortrThasattr)rtargetsrr}blahs     rtestSingleComplexTargetz0AssignmentTargetTestCase.testSingleComplexTargetasiii.
*
,
,	D
1
T',,..11A3777WQZ]4lCCC	D	D	D	D	D	D	D	D	D	D	D	D	D	D	D+
,
,	DW^^5E5E0F0Fq0I!0LT',,..11A3777WQZ]4lCCC	D	D	D	D	D	D	D	D	D	D	D	D	D	D	D+
,
,	+
''DIIKKKTAq6***	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	






qss
*
,
,	9WT5114888	9	9	9	9	9	9	9	9	9	9	9	9	9	9	9	9	9	9sJA,B

BB&BD==EEAF33F7:F7#*HH!Hc Gdd}dgdi}|5\|dd<|dd<|dd<||dgdidddn#1swxYwY|5\t|dd<t|dd<t|dd<||dgdidddn#1swxYwY|5\|d<|d<|d	<||ddd	ddddn#1swxYwYGd
d}|}|5\|_|_|_||jd||jd||jd	ddddS#1swxYwYdS)NceZdZdZdZdS)>AssignmentTargetTestCase.testMultipleComplexTargets.<locals>.CcdS)NrDrErGr)rs rrzHAssignmentTargetTestCase.testMultipleComplexTargets.<locals>.C.__enter__tsrcdSr%r)rtvtbs    rrzGAssignmentTargetTestCase.testMultipleComplexTargets.<locals>.C.__exit__urNrr)rrr}rss"///.....rr}rDrzrrEr)rGrErDrGceZdZdS)>AssignmentTargetTestCase.testMultipleComplexTargets.<locals>.BNrlr)rrBr}r~rr)rrrronetwothree)rr}rrrs     rtestMultipleComplexTargetsz3AssignmentTargetTestCase.testMultipleComplexTargetsrs 	/	/	/	/	/	/	/	/iii.
QSS	6AWQZ]GAJqM71:a=Wq)))n555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6
QSS	6nT'..**++A.q148H8H3I3I!3LQ3OQUV]VdVdVfVfQgQghiQjklQmWq)))n555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6
QSS	:8WQZWQZW!a&8&8999	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:






qss
QSS	,4TXtxTXq)))TXq)))TZ+++	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,sI:A$$A(+A(9BDD #D 1(E%%E),E)A%HH
Hcttdd5^}}}||d||ddg||dddddS#1swxYwYdS)NrDrErG)rrangerrIs    rtestWithExtendedTargetsz0AssignmentTargetTestCase.testWithExtendedTargetss
q!
%
%	#!aQ"""QA'''Q"""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#sA	A44A8;A8N)rr r!rrrr)rrrxrx_sA999",,,$#####rrxceZdZdZdZdS)ExitSwallowsExceptionTestCasecGdd}	|5ddzddddS#1swxYwYdS#t$r|dYdSwxYw)NceZdZdZdZdS)SExitSwallowsExceptionTestCase.testExitTrueSwallowsException.<locals>.AfricanSwallowcdSr%r)rs rrz]ExitSwallowsExceptionTestCase.testExitTrueSwallowsException.<locals>.AfricanSwallow.__enter__rrcdSrr)rs    rrz\ExitSwallowsExceptionTestCase.testExitTrueSwallowsException.<locals>.AfricanSwallow.__exit__srNrr)rrAfricanSwallowrs"%%%55555rrrDrz,ZeroDivisionError should have been swallowed)rrR)rrs  rtestExitTrueSwallowsExceptionz;ExitSwallowsExceptionTestCase.testExitTrueSwallowsExceptions	6	6	6	6	6	6	6	6	F!!

!

















 	F	F	FIIDEEEEEE	Fs'
9,90909AAcGdd}	|5ddzdddn#1swxYwY|ddS#t$rYdSwxYw)NceZdZdZdZdS)ZExitSwallowsExceptionTestCase.testExitFalseDoesntSwallowException.<locals>.EuropeanSwallowcdSr%r)rs rrzdExitSwallowsExceptionTestCase.testExitFalseDoesntSwallowException.<locals>.EuropeanSwallow.__enter__rrcdSr
r)rs    rrzcExitSwallowsExceptionTestCase.testExitFalseDoesntSwallowException.<locals>.EuropeanSwallow.__exit__srNrr)rrEuropeanSwallowrs"%%%66666rrrDrz)ZeroDivisionError should have been raised)rRr)rrs  r#testExitFalseDoesntSwallowExceptionzAExitSwallowsExceptionTestCase.testExitFalseDoesntSwallowExceptions	7	7	7	7	7	7	7	7	C ""

!
















IIABBBBB!			DD	s,
A
+A
/A
/A

AAN)rr r!rrr)rrrrs:FFF
C
C
C
C
CrrceZdZGddeZGddeZGddeZGddeZd	Zd
Z	dZ
dZd
ZdS)
NestedWithc"eZdZddZdZdZdS)NestedWith.DummyNFcF||}||_||_d|_d|_dSr
)rgobbler
r)rrrs   rrzNestedWith.Dummy.__init__s0}DJ DK %D$Drcd|_|jSr)r
rrs rrzNestedWith.Dummy.__enter__s $D:rc4d|_||_|jrdSdSr)rr?rrNs  rrzNestedWith.Dummy.__exit__s*#D$DM{
t

rr
rHr)rrDummyrsF	%	%	%	%								rrceZdZdZdS)NestedWith.InitRaisesctr%rrs rrzNestedWith.InitRaises.__init__s,..0rNr0r)rr
InitRaisesrs00000rrceZdZdZdZdS)NestedWith.EnterRaisesctr%rrs rrz NestedWith.EnterRaises.__enter__s<>>1rcdSr%r)rNs  rrzNestedWith.EnterRaises.__exit__rrNrr)rrEnterRaisesrs"111+++++rrceZdZdZdZdS)NestedWith.ExitRaisescdSr%r)rs rrzNestedWith.ExitRaises.__enter__rrctr%rrNs  rrzNestedWith.ExitRaises.__exit__s\^^';rNrr)rr
ExitRaisesrs"!!!;;;;;rrc|5}|5}||j||jdddn#1swxYwYdddn#1swxYwY||j||jdSr%)rrr
r)rrJrKs   rtestNoExceptionszNestedWith.testNoExceptionss
ZZ\\	,Q

	,OOAN+++OOAN+++	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,	

&&&
&&&&&s4B5A+B+A/	/B2A/	3BB	Bc2	|5}|5	dddn#1swxYwYdddn#1swxYwYn#YnxYw||j||jdSr%)rrrr
rrrJs  rtestExceptionInExprListz"NestedWith.testExceptionInExprLists	
DOO$5$5































	D'''
&&&&&sKAA9A=	A=	AAAAAAA c	|5}|5|ddddn#1swxYwYdddn#1swxYwY|dn#t$rYnwxYw||j||jdS)Nzbody of bad with executedzRuntimeError not reraised)rrrRr;rr
rrs  rtestExceptionInEnterzNestedWith.testExceptionInEntersJ	3
7D$4$4$6$6
7
7		5666
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7

II12222			D		
'''
&&&&&sWBA$A
A$
A	A$A	A$B$A((B+A(,B
BBcd}|d5}|5d}dddn#1swxYwYdddn#1swxYwY||j||j||||jdddS)NFT)rr)rrrr
rassertNotEqualr?)r
body_executedrJs   rtestExceptionInExitzNestedWith.testExceptionInExits2

ZZtZ
$
$	!4??+<+<	!	! M	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!'''
&&&
&&&AJqM400000s1A=AA	AA	AAAc||d5\}}|d5\}}|d||d||d||d|dddn#1swxYwYddddS#1swxYwYdS)N)rDrE)r)rarDrErar)rr)ra1a2b1b2s     rtestEnterReturnsTuplez NestedWith.testEnterReturnsTuples>
ZZeZ
$
$	%R
ZZhZ
'
'	%+3BQ###Q###R$$$R$$$	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%s5B1AB
B1B	B1 B	!B11B58B5N)
rr r!rerrrrrrrrrr)rrrrs&11111V111,,,,,f,,,<<<<<V<<<''''''	'	'	'111%%%%%rr__main__)
__author__	__email__r>unittestcollectionsr
contextlibrrrrr*rer,r3r5rJTestCaserPrrrrr_rxrrrmainr)rr<module>rs$=
#	



LLLLLLLLLLCCCCC1CCC$6!5!5!5!5!5V!5!5!5H00000000"Q5Q5Q5Q5Q5h'Q5Q5Q5f,0,0,0,0,06,0,0,0^2<2<2<2<2<X.0L2<2<2<j?B?B?B?B?B8#4 ?B?B?BD@9@9@9@9@968I@9@9@9F6363636363("3636363r)#)#)#)#)#x0)#)#)#XCCCCCH$5CCC2J%J%J%J%J%"J%J%J%XzHMOOOOOr