403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Python315/Lib/test/__pycache__/test_contextlib.cpython-315.pyc
R
>lqj��c���Qs]PHs]PHs]PHs]PHs]PHs]PHs]PHs]QH"3]QH$G
s
]QH,Gs]QH4Gs]PH<sQQ\O 2sQQ\O 2sQ	Q
\O 2sQQ\O 2sQ
Q\O 2sQQ\O 2sQQ\2sQQ\O 2sQQ2sQQ\\O 2sQQ2sQQ\\O 2sQQ\\O 2sQQ \\O 2sQ!Q"\O 2s \!Q#6Xc\OD2P!P!)$z9Unit tests for contextlib.py, and other context managers.)�*)�support)�	os_helper)�ExceptionIsLikeMixinc�:`�\sQs]snQsQsQsQsQsUs	P!)�TestAbstractContextManagerc�t�QQ[2oU2oUOUO2U2P!)c�4``�\sQs]snU1QksQsUsU9s!)�;TestAbstractContextManager.test_enter.<locals>.DefaultEnterc�(:�[RU_UP!�N��super�__exit__��self�args�	__class__s&*��)C:\Python315\\Lib\test\test_contextlib.pyr�DTestAbstractContextManager.test_enter.<locals>.DefaultEnter.__exit__������ �$�'����__name__�
__module__�__qualname__�__firstlineno__r�__static_attributes__�__classdictcell__�
__classcell__�r�
__classdict__s@@r�DefaultEnterr	�����
(�
(rr")�AbstractContextManager�assertIs�	__enter__)rr"�managers&  r�
test_enter�%TestAbstractContextManager.test_enters/��	(�1�	(��.���
�
�g�'�'�)�7�3rc��QQ[2oUO[29^tt^2]*U2mPPP2P!)%fhP!9h)c�8``�\sQs]snQsU1QksQsUsU9s!)�DTestAbstractContextManager.test_slots.<locals>.DefaultContextManagerc�(:�[RU_UP!rrrs&*�rr�MTestAbstractContextManager.test_slots.<locals>.DefaultContextManager.__exit__rrr)	rrrr�	__slots__rrrrr s@@r�DefaultContextManagerr,s�����I�
(�
(rr0)r$�assertRaises�AttributeError�var)rr0s& r�
test_slots�%TestAbstractContextManager.test_slotss=��	(�$:�	(��
�
�~�
.�
.�*,�!�#�'�/�
.�
.�
.�s�
A�A	�A	c��QQ[2oUO[29^tt^2U2PPP2P!)%fhP!9h)c��\sQs]&sQsP!)�ETestAbstractContextManager.test_exit_is_abstract.<locals>.MissingExitr�rrrrrrrr�MissingExitr8&���rr:)r$r1�	TypeError)rr:s& r�test_exit_is_abstract�0TestAbstractContextManager.test_exit_is_abstract%s6��	�0�	��
�
�y�
)�
)��M�*�
)�
)�
)�s�A�A	�	A	c��QQ2oUOU[2QQ[2oUOU[2QQU2oUOU[2QQU2oUOU[2P!)c�.`�\sQs]-snQsQsQsUsP!)�RTestAbstractContextManager.test_structural_subclassing.<locals>.ManagerFromScratchc��U!rr�rs&rr&�\TestAbstractContextManager.test_structural_subclassing.<locals>.ManagerFromScratch.__enter__.����rc��P!rr)r�exc_type�	exc_value�	tracebacks&&&&rr�[TestAbstractContextManager.test_structural_subclassing.<locals>.ManagerFromScratch.__exit__0s��rr�rrrrr&rrr�r!s@r�ManagerFromScratchrA-s����
�
�
rrMc�4``�\sQs]5snU1QksQsUsU9s!)�LTestAbstractContextManager.test_structural_subclassing.<locals>.DefaultEnterc�(:�[RU_UP!rrrs&*�rr�UTestAbstractContextManager.test_structural_subclassing.<locals>.DefaultEnter.__exit__6rrrrr s@@rr"rO5r#rr"c��\sQs];sPsQsP!)�GTestAbstractContextManager.test_structural_subclassing.<locals>.NoEnterr)rrrrr&rrrr�NoEnterrS;s���IrrTc��\sQs]@sPsQsP!)�FTestAbstractContextManager.test_structural_subclassing.<locals>.NoExitr)rrrrrrrrr�NoExitrV@s���HrrW)�assertIsSubclassr$�assertNotIsSubclass)rrMr"rTrWs&    r�test_structural_subclassing�6TestAbstractContextManager.test_structural_subclassing,s���	�	�	
���0�2H�I�	(�1�	(�	
���l�,B�C�	�(�	�	
� � ��*@�A�	�'�	�	
� � ��)?�@rr)
rrrrr(r4r=rZrrrLs@rrrs ����4�-��A�Arrc��`�\sQs]FsnQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQs\O(Q2s\O(Q2sQsQsQsQsQsUsP!)�ContextManagerTestCasec�`�,n[U1Qk2oU29^tt^2oUOR],2UOU]*2ROU2PPP2UOR,QN2P!)%fhK&9h)c3�`: �RO]2]*w�	ROQ2P!3h������append��states�r�woohoo�@ContextManagerTestCase.test_contextmanager_plain.<locals>.woohooJs"�����L�L��O��H��L�L�����+.�ra�*rb)�contextmanager�assertEqualrd�rrg�xrfs&  @r�test_contextmanager_plain�0ContextManagerTestCase.test_contextmanager_plainHsq�����	�	�
�	��X�X�����U�Q�C�(����Q��#��L�L��O��	
�����-�	�X�s�7A8�8B	�B	c	�`�,n[U1Qk2oUO[29^tt^2U29^tt^2oUOR],2UOU]*2RO	U2[2g)%fhL9hPPP2L)%fhL9hSOR,QN2P!)c3�: �RO]2]*w�ROQ2P!ROQ2h9h3hr`rcres�rrg�BContextManagerTestCase.test_contextmanager_finally.<locals>.woohooWs3�����L�L��O�
"������S�!�����S�!���A�/�A�A�Arj)rlr1�ZeroDivisionErrorrmrdrns&  @r�test_contextmanager_finally�2ContextManagerTestCase.test_contextmanager_finallyUs������	�	"�
�	"��
�
�0�
1�
1����Q�� � ����,�� � ��B�'����Q��'�)�)�	����2�
1�
1�
1��	
�����-s*�B�AB	�B
�B
�
B�B/	�(B/	c��[Q2oU29^tt^2]]*PPP2UO[
W2]2UOU]*OQ2UOU]*OQ2QQ[2oU29^tt^2U]*2g)%fhK�9h[c+o[OSO2oPo=K�Po=hh9h)%fhL79hSc+o[OSO2oPo=LPo=hh9hSO[
S2]2SOS]*OQ2SOS]*OQ2QQ[2o[Q2SQ21FCD0oSO[S2Q	59^tt^2S29^tt^2Sg)%fhL9hSOSQ
02LN[S2c<oSOX&2[OSO2oPo=LPo=hh9hSO[
S2]2SOS]*OQ2SOS]*OQ2PPP2CJ)%fhCJ09h	P!)c3� �Pw�	P!3hrrrrr�f�?ContextManagerTestCase.test_contextmanager_traceback.<locals>.fg�������	�test_contextmanager_traceback�1/0c��\sQs]vsQsP!)�RContextManagerTestCase.test_contextmanager_traceback.<locals>.RuntimeErrorSubclassrr9rrr�RuntimeErrorSubclassr�vr;rr�zraise RuntimeErrorSubclass(42)c��\sQs]�sQsP!)�SContextManagerTestCase.test_contextmanager_traceback.<locals>.StopIterationSubclassrr9rrr�StopIterationSubclassr��r;rr��spam��type� was suppressedzraise stop_exc)rlrvrI�
extract_tb�
__traceback__rm�len�name�line�RuntimeError�
StopIteration�subTestr��failr%)rr{�e�framesr�r��stop_excs&      rr�4ContextManagerTestCase.test_contextmanager_tracebackfs4��	�	�
�	�	;�����!���
	
����V��a�(���������)H�I����������/�	�<�	�	;����*�2�.�.���� �	;��)�)�!�/�/�:�F��	;�����#�	;��)�)�!�/�/�:�F��	;��	
����V��a�(���������)H�I���������)I�J�	�M�	�
�&�!�!�&�)�
�H����4��>��2�2�<����&�������I�I��
�/�:�;��	�H�~�C��M�M�!�.�&�1�1�!�/�/�B�F��C��� � ��V��a�0�� � ������1P�Q�� � ������1A�B�3�2�2�2��	
s��C�
B9�C�!D�0	D�9C		�C		�C�	C�	D�D� C<�<D�D	�
D	�D�D�E�E� E�E�6K-	�8H3�H

�
H�H�H3�K-	�3I>�I>�1I9�4K-	�9I>�>A$K-	�-K?
�6K?
c��[Q2oU2oUO2UOUO[[	Q2P22P!)c3� �Pw�	P!3hrrrrr�whee�CContextManagerTestCase.test_contextmanager_no_reraise.<locals>.whee�r}r~�foo)rlr&�assertFalserr<)rr��ctxs&  r�test_contextmanager_no_reraise�5ContextManagerTestCase.test_contextmanager_no_reraise�sD��	�	�
�	��f���
�
��������i��5�1A�4�H�Irc��[Q2oU2oUO2UO[29^tt^2UO	[
[Q2P2PPP2[OP	Q5%c(UOUOO2P!P!)%fhKV9h)c3�6 �Pw�P!Pw�P!9h3hrrrrr�whoo�OContextManagerTestCase.test_contextmanager_trap_yield_after_throw.<locals>.whoo�s���
���
��s�����r���cpython)rlr&r1r�rr<r�check_impl_detailr��gen�gi_suspended�rr�r�s&  r�*test_contextmanager_trap_yield_after_throw�AContextManagerTestCase.test_contextmanager_trap_yield_after_throw�s���	�	�
�	�
�f���
�
��
�
�
�|�
,�
,��L�L��I�e�$4�d�;�-��$�$�T�2�2����S�W�W�1�1�2�3�-�
,�s�!B1�1C	�:C	c���[Q2oU2oUO[29^tt^2UO2PPP2P!)%fhP!9h)c3� �P!3h�Frrrrr��FContextManagerTestCase.test_contextmanager_trap_no_yield.<locals>.whoo�s����s�)rlr1r�r&r�s&  r�!test_contextmanager_trap_no_yield�8ContextManagerTestCase.test_contextmanager_trap_no_yield�sF��	�	�
�	��f��
�
�
�|�
,�
,��M�M�O�-�
,�
,�
,�s�A
�
A	�A	c�n�[Q2oU2oUO2UO[29^tt^2UO	PPP2PPP2[
OP	Q5%c(UOUOO2P!P!)%fhKV9h)c3�$ �Pw�	Pw�	P!3hrrrrrr��JContextManagerTestCase.test_contextmanager_trap_second_yield.<locals>.whoo�s�����s�r�)
rlr&r1r�rrr�r�r�r�r�s&  r�%test_contextmanager_trap_second_yield�<ContextManagerTestCase.test_contextmanager_trap_second_yield�s���	�	�
�	��f���
�
��
�
�
�|�
,�
,��L�L��t�T�*�-��$�$�T�2�2����S�W�W�1�1�2�3�-�
,�s�B$�$B4	�-B4	c���[Q2oU2oUO2UO[29^tt^2UO	[
PP2PPP2P!)%fhP!9h)c3�F �Pw�P![c[gh9h3hr)r��SyntaxErrorrrrr��GContextManagerTestCase.test_contextmanager_non_normalised.<locals>.whoo�s!���
"����
"�!�!�
"�s�!��!�	��!)rlr&r1r�rr�r�s&  r�"test_contextmanager_non_normalised�9ContextManagerTestCase.test_contextmanager_non_normalised�sV��	�	"�
�	"��f���
�
��
�
�
�{�
+�
+��L�L��t�T�2�,�
+�
+�
+�s�A$�$A5	�-A5	c� ``�,n[UU1Qk2oU29^tt^2oROR],2ROU]*2ROU2[Q2g)%fhL9hROR,QN2P!)c3��: �RO]2]*w�P![cBoROSO]*2ROR,QN2Po=P!Po=hh9h3h)rarj)rdrvrrm)r�rrfs ��rrg�AContextManagerTestCase.test_contextmanager_except.<locals>.woohoo�sQ�����L�L��O�
6����$�
6����Q�V�V�A�Y�'�� � ���5�5��
6�s/�A-��A-�	A*�A*�6A%�A-�%A*�*A-rbrj)rlrmrdrvrnsf  @r�test_contextmanager_except�1ContextManagerTestCase.test_contextmanager_except�sw�����	�	6�
�	6��X�X�����U�Q�C�(����Q��#��L�L��O�#�C�(�(�	�X��
	
�����-s�AA'�'A7	�0A7	c��[Q2oQQ[2o[Q2UQ21FD8oUO[U2Q59^tt^2U29^tt^2Ug	P!)%fhL9hSO	SQ02L)[
coSO
XC2Po=LPo=hh9hPPP2J�)%fhJ�9h)c3� �Pw�	P!3hrrrrrrg�JContextManagerTestCase.test_contextmanager_except_stopiter.<locals>.woohoo�r}r~c��\sQs]�sQsP!)�YContextManagerTestCase.test_contextmanager_except_stopiter.<locals>.StopIterationSubclassrr9rrrr�r��r;rr�r�r�r�)rlr�r�r�r��	Exceptionr%)rrgr�r��exs&    r�#test_contextmanager_except_stopiter�:ContextManagerTestCase.test_contextmanager_except_stopiter�s���	�	�
�	�	�M�	�'�v�.�0E�f�0M�N�H����4��>��2�2�<����&��	O�"����
�I�I��
�/�:�;��!�0��M�M�"�/�/��0��	3�2�2�2�sZ�C	�B�(A/
�/A?�8A?�:B�C	�	B>�"B>�#B9�4C	�9B>�>C	�C
�C
c��Qo-o[VU2UQ*o[Q2oU29^tt^2Ug)%fhL9hSOQ2P![coSO	XT2Po=P!Po=hh9h)ztfrom __future__ import generator_stop
from contextlib import contextmanager
@contextmanager
def woohoo():
    yield
rgr�zStopIteration was suppressed)�execr�r�r�r%)r�code�localsrgr�r�s&     r�!test_contextmanager_except_pep479�8ContextManagerTestCase.test_contextmanager_except_pep479�sy�������T�6�"���!�� ��(��	6����������

�I�I�4�5���	(��M�M�"�'�'��	(�s2�A �9�A		�A		�A � 	B�*B�+B�Bc��[Q2oU29^tt^2[g)%fhL}9h[cmoSO[	S2[
2SO
SO]*Q2SOSO[2Po=LPo=hh9hS29^tt^2[Q2g)%fhP!9h[cioSO[	S2[2SO
SO]*Q2SOSO2Po=P!Po=hh9h)c3�Z �Pw�P![co[Q2SgPo=hh9h3h)N�issue29692:Chained�r�r���excs r�test_issue29692�oContextManagerTestCase.test_contextmanager_do_not_unchain_non_stopiteration_exceptions.<locals>.test_issue29692s-���
B����
B�"�#7�8�c�A��
B�s �+��+�	(�(�#�(�+r�zissue29692:Unchained)rlrvr�r%r�r�rmr�assertIsInstance�	__cause__r��assertIsNone)rr�r�s&  r�?test_contextmanager_do_not_unchain_non_stopiteration_exceptions�VContextManagerTestCase.test_contextmanager_do_not_unchain_non_stopiteration_exceptionss���	�	B�
�	B�
	C� �"�"�'�'�#�"���	C��M�M�$�r�(�L�1����R�W�W�Q�Z�)=�>��!�!�"�,�,�0A�B�B��	C��
	,� �"�"�#�$:�;�;�#�"�"���	,��M�M�$�r�(�M�2����R�W�W�Q�Z�)?�@����b�l�l�+�+��	,�sm�8�%�5	�5	�8�8�	B/�B/�A"B*�*B/�3C"�C�C	�C	�C"�C"�"	E�,E�-AE�Ec	���[Q2oUO[29^tt^2U29^tt^2]]*PPP2PPP2UO[29^tt^2U29^tt^2[g)%fhKL9h)%fhKW9h)%fhL9hPPP2P!)%fhP!9h)c3�` �Pw�P![co[QS02SgPo=hh9h3h)Nzcaught r�r�s rrg�LContextManagerTestCase.test_contextmanager_wrap_runtimeerror.<locals>.woohoo#s/���
=����
=�"�W�S�E�?�3��<��
=�s �.��.�	+�+�&�+�.)rlr1r�r��rrgs& r�%test_contextmanager_wrap_runtimeerror�<ContextManagerTestCase.test_contextmanager_wrap_runtimeerror"s���	�	=�
�	=��
�
�|�
,�
,�����A���-��
�
�}�
-�
-����#�#����-�
,������.�
-�
-�
-�sX�B�
B		�B�2C
�B/	�	B
�B
�B�B,	�%B,	�/B?
�8B?
�:C
�
C	�C	c�>�Qo[UQQ5Q22oU!)c�`�U1QkoU!)c�V:�RO2FDvq[VU2J	U!r)�items�setattr)�func�k�v�kws&  �r�decorate�XContextManagerTestCase._create_contextmanager_attribs.<locals>.attribs.<locals>.decorate7s$����8�8�:�C�A��D�1�%�&��rr)r�r�sl r�attribs�FContextManagerTestCase._create_contextmanager_attribs.<locals>.attribs6s���
��Or�bar�r�c3� �Pw�	P!3h��Whee!r)r�s&r�baz�BContextManagerTestCase._create_contextmanager_attribs.<locals>.baz<s
���
�r~�rl)rr�r�s&  r�_create_contextmanager_attribs�5ContextManagerTestCase._create_contextmanager_attribs5s/��	�
�	�U�	�	�
�
�	��
rc��UO2oUOUOQ2UOUOQ2P!)r�r�)r�rmrr��rr�s& r�test_contextmanager_attribs�2ContextManagerTestCase.test_contextmanager_attribsCs8���1�1�3��������e�,�������%�(rc�`�UO2oUOUOQ2P!r��r�rm�__doc__r�s& r�test_contextmanager_doc_attrib�5ContextManagerTestCase.test_contextmanager_doc_attribHs$���1�1�3��������g�.rc�l�UO2P2oUOUOQ2P!)Nr�rr�s& r�*test_instance_docstring_given_cm_docstring�AContextManagerTestCase.test_instance_docstring_given_cm_docstringMs)���1�1�3�D�9��������g�.rc��[Q2oU]]]!],Q59^tt^2oUOUQ2PPP2P!)%fhP!9h)c3� �VV#1w�	P!3hrr�rr�r�kwdss&&&&rrg�4ContextManagerTestCase.test_keywords.<locals>.woohooTs����t�*�*�s�
r
)���!�,�rlrm)rrg�targets&  r�
test_keywords�$ContextManagerTestCase.test_keywordsRsG��	�	+�
�	+�
��"�2�B�
7�
7�6����V�%5�6�8�
7�
7�
7�s�?�A	�A	c�`�QQ2o[U1Qk2oUU2U2Q59^tt^2PPP2P!)%fhP!9h)c��\sQsQsQsP!)�0ContextManagerTestCase.test_nokeepref.<locals>.A�[rr9rrr�Ar[r;rrc3�: �[OU2o[OU2o[O2RO	U22RO	U22Pw�	P!3hr)�weakref�refr�
gc_collectr�)�a�brs&&�rrg�5ContextManagerTestCase.test_nokeepref.<locals>.woohoo^sO�������A��A����A��A���� ����a�c�"����a�c�"��s�A6A9�rr�)rrrgsf  r�test_nokeepref�%ContextManagerTestCase.test_nokeeprefZsF���	�	�
�	�
�	��A�C�1�3�
�
�� �
�
�
�s�A�A	�
A	c��[Q2oUO[29^tt^2U2PPP2UO[29^tt^2U]]2PPP2UO[29^tt^2U]Q5PPP2P!)%fhKp9h)%fhKT9h)%fhP!9h)c3� �Pw�	P!3hrr�rrs&$rrg�8ContextManagerTestCase.test_param_errors.<locals>.woohoolr}r~r!)rlr1r<r�s& r�test_param_errors�(ContextManagerTestCase.test_param_errorsks���	�	�
�	��
�
�y�
)�
)��H�*�
�
�
�y�
)�
)��1�a�L�*�
�
�
�y�
)�
)��Q�K�*�
)�	*�
)��
)�
)��
)�
)�
)�s5�B�
B.�
C�B+	�$B+	�.B>	�7B>	�C	�
C	c�````�]n]n[UUU1Qk2oU2UU1Qk2nR2ROR]
2ROR]2P!)�c3�z: �R]*
nRoR]*
nPw�	R]*nRORU2P!3h�ra)rm)�before�depth�ncolsrs ���rrg�5ContextManagerTestCase.test_recursive.<locals>.woohoozs;����
�Q�J�E��F��Q�J�E���Q�J�E����U�F�+�s�8;c�*:�R]
6c
R2P!P!)�
r)r/�	recursives��rr4�8ContextManagerTestCase.test_recursive.<locals>.recursive�s����r�z���rr)rrgr/r0r4sf @@@r�test_recursive�%ContextManagerTestCase.test_recursivews\�������	�	,�
�	,�
��	�
�	�	�������#������"rr)rrrrrprwrr�r�r�r�r�r�r�r�r�r�r�r�r�requires_docstringsrrrr"r(r6rrrLs@rr]r]Fs�����.�.�"0C�dJ�
3��3�3�.�"<�$6�*,�.$�&�)�

� � �/�!�/�
� � �/�!�/�7��"
�#�#rr]c�R`�\sQsQsn\O
Q2sQsQsQs	Us
P!)�ClosingTestCase�c�v�[Oo[P2oUOUOU2P!r)�closingrrm�r�cm_docstring�objs&  r�test_instance_docs�"ClosingTestCase.test_instance_docs�s*�������d�m��������l�3rc�`�,nU1QkQ2oU2oUOR,2[U29^tt^2oUOV#2PPP2UOR],2P!)%fhK%9h)c�0:`�\sQsQsnU1QksQsUsP!)�'ClosingTestCase.test_closing.<locals>.C�c�,:�RO]2P!r-rc�rrfs&�r�close�-ClosingTestCase.test_closing.<locals>.C.close��������Q�rr�rrrrrIrr�r!rfs@�r�CrE������
 �
 rrN)rmr=�rrNro�yrfs&   @r�test_closing�ClosingTestCase.test_closing�sc�����	 �	 �
�C�������#�
�Q�Z�Z�1����Q�"��������$��Z�s�A-�-A=	�6A=	c	�`�,nU1QkQ2oU2oUOR,2UO[29^tt^2[U29^tt^2oUOV#2]]*PPP2PPP2UOR],2P!)%fhK-9h)%fhK89h)c�0:`�\sQsQsnU1QksQsUsP!)�-ClosingTestCase.test_closing_error.<locals>.C�c�,:�RO]2P!r-rcrHs&�rrI�3ClosingTestCase.test_closing_error.<locals>.C.close�rKrrrLrMs@�rrNrV�rOrrN)rmr1rvr=rPs&   @r�test_closing_error�"ClosingTestCase.test_closing_error�s������	 �	 �
�C�������#�
�
�
�0�
1�
1�����q�� � ��&��A���2�	
������$����2�
1�s0�B/�B	�7B/�B,
�%B,
�'B/�/B?	�8B?	r)rrrrrr8rArRrZrrrLs@rr:r:�s,����� � �4�!�4�	%�%�%rr:c�(`�\sQsQsnQsQsUsP!)�NullcontextTestCase�c��QQ2oU2o[U29^tt^2oUOV22PPP2P!)%fhP!9h)c��\sQsQsQsP!)�/NullcontextTestCase.test_nullcontext.<locals>.C�rr9rrrrNra�r;rrN)�nullcontextr%)rrN�c�c_ins&   r�test_nullcontext�$NullcontextTestCase.test_nullcontext�s6��	�	�
�C��
��^�^�t��M�M�$�"��^�^�^�s�A�A	�A	r)rrrrrfrrrLs@rr]r]�s����#�#rr]c�(`�\sQsQsnQsQsUsP!)�FileContextTestCase�c	��[O2o[UQQQ59^tt^2oUOUO2UOQ2PPP2UO
WO2UO[29^tt^2[UQQQ59^tt^2oUOUO2UOUO2Q2]]*PPP2PPP2UO
UO2[OU2P!)%fhK�9h)%fhK^9h)%fhKi9h[OS2h9h)�wzutf-8)�encodingzBooh
�r)
�tempfile�mktemp�openr��closed�write�
assertTruer1rvrm�readr�unlink)r�tfnr{s&  r�testWithOpen� FileContextTestCase.testWithOpen�s���o�o���	"��c�3��1�1�Q�� � ����*�����!�2�
�O�O�A�H�H�%��"�"�#4�5�5��#�s�W�5�5���$�$�Q�X�X�.��$�$�Q�V�V�X�x�8���E�6�6�

�O�O�A�H�H�%����S�!�2�1��
6�5��6�5��
���S�!�sf�E3�-D:�AE3�E �2AE
	�7E �?#E3�:E
	�E
	�E3�
E
�E
�E � E0	�)E0	�+E3�3Fr)rrrrrxrrrLs@rriri�s����"�"rric�F`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�LockContextTestCase��c	��UOU22U9^tt^2UOU22PPP2UOU22UO[29^tt^2U9^tt^2UOU22]]*PPP2PPP2UOU22P!)%fhK�9h)%fhKC9h)%fhKN9hr)r�rtr1rv)r�lock�lockeds&&&r�boilerPlate�LockContextTestCase.boilerPlate�s��������"�
�T��O�O�F�H�%�������"�
�
�
�0�
1�
1��������)��A���2�	
�����"��T�����2�
1�sA�C�4C-�? C	�C-�C	�C	�C*
�#C*
�%C-�-C=	�6C=	c�h�[O2oUOVO2P!r)�	threading�Lockr�r�rr~s& r�testWithLock� LockContextTestCase.testWithLock�s ���~�~�������{�{�+rc�h�[O2oUOVO2P!r)r��RLockr��	_is_ownedr�s& r�
testWithRLock�!LockContextTestCase.testWithRLock�s ����� ������~�~�.rc�d`�[O2nU1QkoUORU2P!)c�&:�RO2!r)r��r~s�rr�5LockContextTestCase.testWithCondition.<locals>.locked�s����>�>�#�#r)r��	Conditionr��rrr~s& @r�testWithCondition�%LockContextTestCase.testWithCondition�s&����"�"�$��	$�����v�&rc�d`�[O2nU1QkoUORU2P!)c�\:�ROP
2%cRO2P
!P	!r���acquire�releaser�s�rr�5LockContextTestCase.testWithSemaphore.<locals>.locked��!����|�|�E�"�"������r)r��	Semaphorer�r�s& @r�testWithSemaphore�%LockContextTestCase.testWithSemaphore�s(����"�"�$��	�	
����v�&rc�d`�[O2nU1QkoUORU2P!)c�\:�ROP
2%cRO2P
!P	!r�r�r�s�rr�<LockContextTestCase.testWithBoundedSemaphore.<locals>.locked�r�r)r��BoundedSemaphorer�r�s& @r�testWithBoundedSemaphore�,LockContextTestCase.testWithBoundedSemaphore�s(����)�)�+��	�	
����v�&rr)rrrrr�r�r�r�r�r�rrrLs@rr{r{�s(����	#�,�/�'�'�'�'rr{c�>`�\sQsQsnQsP
sPsP
sQsQs	Qs
UsP!)�	mycontext�z9Example decoration-compatible context manager for testingc��P	UmU!�T��startedrCs&rr&�mycontext.__enter__s������rc�(�VmUO!r)r��catch�rr�s&*rr�mycontext.__exit__s�����z�z�r�r�r�)rrrrrr�r�r�r&rrrrLs@rr�r��s&����C��G�
�C��E���rr�c�`�\sQsQsn\O
Q2sQsQsQs	Qs
QsQsQ	s
Q
sQsQsQ
sQsQsQsQsQsUsP!)�TestContextDecorator�c�t�[Oo[2oUOUOU2P!r)r�rrmr>s&  rrA�'TestContextDecorator.test_instance_docs
s*��!�(�(���k��������l�3rc��[2oU9^tt^2oUOV!2UOUO2PPP2UO	UO
Q2P!)%fhK.9h)N�NNN)r�r%rtr�rmr�)r�context�results&  r�test_contextdecorator�*TestContextDecorator.test_contextdecoratorsP���+��
�W���M�M�&�*��O�O�G�O�O�,��	
������&8�9�	�W�s�-A)�)A9	�2A9	c	�b�[2oUO[Q29^tt^2S9^tt^2[Q2g)%fhL9hPPP2L)%fhL9hSOSO2SOSO]*[2[2oP	SmS9^tt^2[Q2g)%fhL9hSOSO2SOSO]*[2P!r�)r��assertRaisesRegex�	NameError�assertIsNotNoner�r%r�)rr�s& r�$test_contextdecorator_with_exception�9TestContextDecorator.test_contextdecorator_with_exceptions����+��
�
#�
#�I�u�
5�
5�����&�&�����6�
5�
5�
5��	
���W�[�[�)��
�
�g�k�k�!�n�i�0��+����
�
�W��E�"�"��W�����W�[�[�)��
�
�g�k�k�!�n�i�0s:�A�A	�A
�
A
�A�A.	�'A.	�C�C*	�#C*	c�~``�[2nRUU1Qk2oU2ROROQ2P!)c�v:�RORO2RORO2P!r�r�r�rtr��r�rs��r�test�1TestContextDecorator.test_decorator.<locals>.test1�%������g�k�k�*��O�O�G�O�O�,rr�)r�rmr��rr�r�sf @r�test_decorator�#TestContextDecorator.test_decorator.s8����+��	�	-�
�	-�	
��������&8�9rc�>``�[2nRUU1Qk2oRO[Q29^tt^2U2PPP2RORO2RORO]*[2P!)%fhKT9h)c�:�RORO2RORO2[	Q2gr�)r�r�rtr�r�r�s��rr��@TestContextDecorator.test_decorator_with_exception.<locals>.test<s0������g�k�k�*��O�O�G�O�O�,��E�"�"rr�)r�r�r�r�r�r%r�sf @r�test_decorator_with_exception�2TestContextDecorator.test_decorator_with_exception9sl����+��	�	#�
�	#�
�
#�
#�I�u�
5�
5��F�6����W�[�[�)��
�
�g�k�k�!�n�i�0�6�
5�s�B�B	�B	c�`�[2nU1QkQ[2oU2oUO]]2UOUO]2UOUO
]2UOUOP2U2oUOQQQ2UOUOQ2UOUO
Q2UOUOQ2U2oUO]]Q5UOUO]2UOUO
]2P!)c�::`�\sQsQsnYQQk2sQsUsP!)�9TestContextDecorator.test_decorating_method.<locals>.Test�Kc�,�VmV mV0mP!r�rrrd)rrrrds&&&&r�method�@TestContextDecorator.test_decorating_method.<locals>.Test.methodMs�������rr�r)rrrrr�rr)r!r�s@�r�Testr�Ks����
�
��
rr�rrrdr&)r��objectr�rmrrrd)rr�r�r�s&  @r�test_decorating_method�+TestContextDecorator.test_decorating_methodHs�����+��	�6�	��v�����A�q���������#��������#��������&��v�����C��c�"��������%��������%��������%��v�����a�1����������#��������#rc	���QQ[2oUO[Q29^tt^2U29^tt^2PPP2PPP2P!)%fhK9h)%fhP!9h)c�.`�\sQsQsnQsQsQsUsP!)�7TestContextDecorator.test_typo_enter.<locals>.mycontext�gc��P!rrrCs&r�	__unter__�ATestContextDecorator.test_typo_enter.<locals>.mycontext.__unter__h���rc��P!rrr�s&*rr�@TestContextDecorator.test_typo_enter.<locals>.mycontext.__exit__jr�rr)rrrrr�rrrrLs@rr�r�g�����
�
�
rr��the context manager��ContextDecoratorr�r<�rr�s& r�test_typo_enter�$TestContextDecorator.test_typo_enterfsP��	�(�	��
#�
#�I�/D�
E�
E������F�
E����F�
E�
E��.�A&�A	�A&�A#
�A#
�A&�&A7	�/A7	c	���QQ[2oUO[Q29^tt^2U29^tt^2PPP2PPP2P!)%fhK9h)%fhP!9h)c�.`�\sQsQsnQsQsQsUsP!)�6TestContextDecorator.test_typo_exit.<locals>.mycontext�sc��P!rrrCs&rr&�@TestContextDecorator.test_typo_exit.<locals>.mycontext.__enter__tr�rc��P!rrr�s&*r�__uxit__�?TestContextDecorator.test_typo_exit.<locals>.mycontext.__uxit__vr�rr)rrrrr&r�rrrLs@rr�r�sr�rr�zthe context manager.*__exit__r�r�s& r�test_typo_exit�#TestContextDecorator.test_typo_exitrsP��	�(�	��
#�
#�I�/N�
O�
O������P�
O����P�
O�
O�r�c�``�QQ[2oQQU[2oU2nRUU1Qk2oU2ROROQ2P!)c�6`�\sQsQsnP
sPsQsQsQsUs	P!)�HTestContextDecorator.test_contextdecorator_as_mixin.<locals>.somecontext�c��P	UmU!r�r�rCs&rr&�RTestContextDecorator.test_contextdecorator_as_mixin.<locals>.somecontext.__enter__�s��#����rc��VmP!rr�r�s&*rr�QTestContextDecorator.test_contextdecorator_as_mixin.<locals>.somecontext.__exit__�����rr�)
rrrrr�r�r&rrrrLs@r�somecontextr�s�����G��C�
�
�
rrc��\sQsQsQsP!)�FTestContextDecorator.test_contextdecorator_as_mixin.<locals>.mycontext�rr9rrrr�r�r;rr�c�v:�RORO2RORO2P!rr�r�s��rr��ATestContextDecorator.test_contextdecorator_as_mixin.<locals>.test�r�rr�)r�r�rmr�)rrr�r�r�sf   @r�test_contextdecorator_as_mixin�3TestContextDecorator.test_contextdecorator_as_mixin~sU���		�&�		�	��%5�	��+��	�	-�
�	-�	
��������&8�9rc��``�[U1Qk2o,nU]2UU1Qk2oUQ2ROR,QN2,nUQ2ROR,QN2P!)c3�`: �ROU2Pw�	ROQ2P!3h�Nrbrc�rQrfs&�rrg�ETestContextDecorator.test_contextmanager_as_decorator.<locals>.woohoo�� �����L�L��O���L�L���ric�R:�ROR],2ROU2P!r-�rmrd�rorrfs&��rr��CTestContextDecorator.test_contextmanager_as_decorator.<locals>.test�s ������U�Q�C�(��L�L��Or�	something�something else�rarrb)rarrbr)rrgr�rfsf  @r� test_contextmanager_as_decorator�5TestContextDecorator.test_contextmanager_as_decorator�sn���	�	�
�	�
��	���	�
�	�	
�[������ 5�6����
������ :�;rc�``�[U1Qk2o,nU]2UU1Qk2oUQ2oSFDoROR]Q,2J	ROR,QN2,nUQ2oRO[29^tt^2o[	U2J)%fhL9hROWO
OQ2P!)c3�`: �ROU2Pw�	ROQ2P!3hrrcrs&�rrg�TTestContextDecorator.test_contextmanager_decorate_generator_function.<locals>.woohoo�rric3�: �ROR],2ROU2Pw�	ROQ2Q!3h)ra�second itemr�rrs&��rr��RTestContextDecorator.test_contextmanager_decorate_generator_function.<locals>.test�s5�������U�Q�C�(��L�L��O���L�L��'��s�>Arr��rarrrb)rlrmr1r��next�	exception�value)rrgr�r��_�cmrfsf     @r�/test_contextmanager_decorate_generator_function�DTestContextDecorator.test_contextmanager_decorate_generator_function�s����	�	�
�	�
��	���	�
�	��;����A����U�Q��$4�5������ D�E����;���
�
�
�}�
-�
-����S�	�.�
-��	
������+�+�X�6s�B�B'	� B'	c�`�[U1Qk2o,nU2U1Qk2oUO[29^tt^2U2FDoJ	PPP2UOR,QN2P!)%fhK&9h)c3�: �ROQ2Pw�ROQ2P!ROQ2h9h3h��enter�exitrcres�rrg�^TestContextDecorator.test_contextmanager_decorate_generator_function_exception.<locals>.woohoo��2�����L�L��!�
%�����V�$�����V�$�ruc3�F: �ROQ2Pw�	[g3h)�body)rdrvres�rr��\TestContextDecorator.test_contextmanager_decorate_generator_function_exception.<locals>.test�s�����L�L�� ��#�#�s�!)r,r1r-)rlr1rvrm)rrgr�r%rfs&   @r�9test_contextmanager_decorate_generator_function_exception�NTestContextDecorator.test_contextmanager_decorate_generator_function_exception�st���	�	%�
�	%���	��	$�
�	$�
�
�
�0�
1�
1��V����2�	
���� 9�:�2�
1�s�A/�/A?	�8A?	c��`�[U1Qk2o,nU2U1Qk2oU2oUO[U2]2UO2UOR,QN2P!)c3�: �ROQ2Pw�ROQ2P!ROQ2h9h3hr+rcres�rrg�_TestContextDecorator.test_contextmanager_decorate_generator_function_early_stop.<locals>.woohoo�r/ruc3�v: �]w�]w�ROQ2P!ROQ2h9h3h)ra�inner closedrcres�rr��]TestContextDecorator.test_contextmanager_decorate_generator_function_early_stop.<locals>.test�s-����
-��������^�,�����^�,�s�9�
#�9�6�9)r,r9r-)rlrmr"rI�rrgr�r�rfs&   @r�:test_contextmanager_decorate_generator_function_early_stop�OTestContextDecorator.test_contextmanager_decorate_generator_function_early_stop�sg���	�	%�
�	%���	��	-�
�	-��f������c��A�&��	�	������ A�Brc�j`�[Q2oU2U1Qk2o,nU2oUO[U2Q2UOUOQ2Q2UOUO	[
2Q2UO
2UORQQ[
1,2P!)c3� �Pw�	P!3hrrrrrrg�_TestContextDecorator.test_contextmanager_decorate_generator_function_send_throw.<locals>.woohoo�r}r~c3��: �Qw�	oROQU12Qw�P![c-oROQ[S212Qw�Po=P!Po=hh9h3h)�first�received�second�caught�after throw)rd�
ValueErrorr�)rCr�rfs  �rr��]TestContextDecorator.test_contextmanager_decorate_generator_function_send_throw.<locals>.test�sU����$�}�H��L�L�*�h�/�0�
$�����
$����h��S�	�2�3�#�#�#��
$�s/�A�%�A�	A�A�!A�A�A�ArB�VALUErDrFrE)rCrI)rlrmr"�send�throwrGrIr;s&   @r�:test_contextmanager_decorate_generator_function_send_throw�OTestContextDecorator.test_contextmanager_decorate_generator_function_send_throw�s����	�	�
�	�
��	$�
�	$����f������c��G�,�������'�*�H�5�������:�.�
�>��	�	������)�H�j�+A�B�	
rc�``�[U1Qk2o,nU]2UU1Qk2oUQ2oRO[29^tt^2UOP2PPP2RO	R,QN2P!)%fhK&9h)c3�`: �ROU2Pw�	ROQ2P!3hrrcrs&�rrg�TTestContextDecorator.test_contextmanager_decorate_coroutine_function.<locals>.woohoorric��Z: �ROR],2ROU2P!3hr-rrs&��rr��RTestContextDecorator.test_contextmanager_decorate_coroutine_function.<locals>.tests#�������U�Q�C�(��L�L��O�s�(+rr)rlr1r�rJrm)rrgr��cororfsf   @r�/test_contextmanager_decorate_coroutine_function�DTestContextDecorator.test_contextmanager_decorate_coroutine_functions{���	�	�
�	�
��	���	�
�	��K� ��
�
�
�}�
-�
-��I�I�d�O�.�	
���� 5�6�.�
-�s�A<�<B	�B	c��``�[U1Qk2o,nU]2UU1Qk2oUQ2oRO[29^tt^2UOP2O	P2PPP2RO[
29^tt^2UOP2O	P2PPP2RO
R,QN2P!)%fhKl9h)%fhK99h)c3�`: �ROU2Pw�	ROQ2P!3hrrcrs&�rrg�STestContextDecorator.test_contextmanager_decorate_asyncgen_function.<locals>.woohoo(rric�: �ROR],2ROU2P3w�	ROQ2P!3h)rarrrs&��rr��QTestContextDecorator.test_contextmanager_decorate_asyncgen_function.<locals>.test/s2�������U�Q�C�(��L�L��O���L�L��'�s�?Arr!)rlr1r��asendrJ�StopAsyncIterationrm)rrgr��agenrfsf   @r�.test_contextmanager_decorate_asyncgen_function�CTestContextDecorator.test_contextmanager_decorate_asyncgen_function's����	�	�
�	�
��	���	(�
�	(��K� ��
�
�
�}�
-�
-��J�J�t��!�!�$�'�.�
�
�
�1�
2�
2��J�J�t��!�!�$�'�3�	
���� D�E�.�
-��
2�
2�s$�!C�!C$�C!	�C!	�$C4	�-C4	r)rrrrrr8rAr�r�r�r�r�r�r�r
rr'r3r<rLrTr^rrrLs@rr�r�sp����� � �4�!�4�:�1�":�1�$�<	�	�:�0<�*7�<;�,C�2
�67�(F�Frr�c��`�\sQsQsnPs\OQ2sQsQs	Qs
QsQsQs
Q	sQ
sQsQsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQs Us!P!)�TestBaseExitStack�?c��UOOoUO2oUOUOU2P!r)�
exit_stackrrmr>s&  rrA�$TestBaseExitStack.test_instance_docsBs3�����.�.���o�o���������l�3rc�t�UO29^tt^2PPP2P!)%fhP!9hr)rdrCs&r�test_no_resources�#TestBaseExitStack.test_no_resourcesIs!��
�_�_�
�
���
�
�
�s�&�7	�7	c��`�Q-1Q-1Q-1Q[]Q51Q[]Q51Q[]Q51Q[]]Q51,o,nU1QkoUO29^tt^2o[U2FD�vqEU%c!U%cUOU,UN3-U@oLLU%cUOU,UN3oL.U%cUOU1-U@oLUOU2oUO	Vb2J�	UO
FD�oUO	U]*OU2UOU]*OUO2UOU]*OUO2J�	PPP2UORU2,nUO29^tt^2oUO[29^tt^2UO]Q5PPP2UO[29^tt^2UOO]Q5PPP2UO[29^tt^2UOU]Q5PPP2PPP2UOR,2P!)%fhCK
9h)%fhK�9h)%fhK�9h)%fhKf9h)%fhKq9h)	ra)�example)r�callbackc�.:�ROV12P!)zTest metadata propagationrc)rrr�s*,�r�_exit�.TestBaseExitStack.test_callback.<locals>._exitXs����M�M�4�,�'r)�arg)rkrorr-)ra�)�dictrd�reversedrkr%�_exit_callbacks�__wrapped__�assertNotEqualrr�rrmr1r<)	r�expectedrm�stackrrr{�wrapperr�s	&       @r�
test_callback�TestBaseExitStack.test_callbackMs,���
��H�
�2�J�
�B�K�
��a��!�
�4��?�#�
�D��O�$�
�D�a�!�,�-�
����	(��_�_�
�
�%�&�x�0�
���D����u�<�t�<�t�<�A�����u�4�t�4�A�����u�5��5�A����u�-�A��
�
�a�'�1�!�0�0���
�
�g�a�j�4�4�e�<��#�#�G�A�J�$7�$7����H��!�!�'�!�*�"4�"4�e�m�m�D�1��	
�����*���
�_�_�
�
�%��"�"�9�-�-����1��%�.��"�"�9�-�-����(�(�Q�(�/�.��"�"�9�-�-�����1��5�.��	
�����$�3�
�
��&.�-��-�-��-�-���
�s��#J�=J�J�%J�CJ�K �!J'	�4%K �J:	�6%K �K
	�/K �J$	�J$	�'J7
�0J7
�2K �:K

�K

�K �
K
�K
�K � K0	�)K0	c��``�[nUU1QkoQoU1QkoQQ[2oRO29^tt^2oUOU2RO	UO
P*]*U2UU2oUOU2RO	UO
P*]*OU2UOU2RO	UO
P*]*U2UU2oUOU2RO	UO
P*]*OU2UOU2RO	UO
P*]*U2UOU2RO	UO
P*]*U2]]*PPP2P!)%fhP!9h)c�.:�ROUR2P!r)r%)rGr��exc_tb�
exc_raisedrs&&&��r�_expect_exc�0TestBaseExitStack.test_push.<locals>._expect_excxs����M�M�(�J�/rc��P	!r�r��exc_detailss*r�
_suppress_exc�2TestBaseExitStack.test_push.<locals>._suppress_excz���rc�p:�ROU2ROU2ROU2P!r)r�)rGr�r}rs&&&�r�
_expect_ok�/TestBaseExitStack.test_push.<locals>._expect_ok|s-������h�'����c�"����f�%rc�4`�\sQsQsnQsQsQsQsUsP!)�+TestBaseExitStack.test_push.<locals>.ExitCM�c��VmP!r��	check_exc)rr�s&&r�__init__�4TestBaseExitStack.test_push.<locals>.ExitCM.__init__�s��!*�rc�*�UOQ2P!)zShould not be called!)r�rCs&rr&�5TestBaseExitStack.test_push.<locals>.ExitCM.__enter__�s���	�	�1�2rc�*�UOUP!rr��rr�s&*rr�4TestBaseExitStack.test_push.<locals>.ExitCM.__exit__�s������,rr��	rrrrr�r&rrrrLs@r�ExitCMr��s����
+�
3�
-�
-rr�)rvr�rd�pushr%rs�__self__)rrr�r�r�rwr&r~sf      @r�	test_push�TestBaseExitStack.test_pushvsd���&�
�	0�	�	&�	-�V�	-��_�_�
�
�%��J�J�z�"��M�M�%�/�/��3�A�6�
�C��
�#�B��J�J�r�N��M�M�%�/�/��3�A�6�?�?��D��J�J�}�%��M�M�%�/�/��3�A�6�
�F���$�B��J�J�r�N��M�M�%�/�/��3�A�6�?�?��D��J�J�{�#��M�M�%�/�/��3�A�6��D��J�J�{�#��M�M�%�/�/��3�A�6��D�
�a�C��
�
�
�s�FG�G,	�$G,	c��`�U1QkQ[2o,nU2oUO29^tt^2oUOU1Qk2oUOU2UO	U2UOUOP*]*OU2RO]2PPP2UOR,QN2P!)%fhK&9h)c�<:`�\sQsQsnU1QksU1QksQsUsP!)�4TestBaseExitStack.test_enter_context.<locals>.TestCM�c�,:�RO]2P!r-rc)rr�s&�rr&�>TestBaseExitStack.test_enter_context.<locals>.TestCM.__enter__������
�
�a� rc�,:�RO]2P!��rc)rr�r�s&*�rr�=TestBaseExitStack.test_enter_context.<locals>.TestCM.__exit__�r�rrrK�r!r�s@�r�TestCMr��s����
!�
!�
!rr�c�,:�RO]2P!)�rc�r�s�rrm�3TestBaseExitStack.test_enter_context.<locals>._exit������
�
�a� r)rarpr�r�)
r�rdrkr��
enter_contextr%rsr�rdrm)rr�r&rwrmr�s&    @r�test_enter_context�$TestBaseExitStack.test_enter_context�s����	!�V�	!���
�X��
�_�_�
�
�%�
�^�^�
!��
!�� � ��'�����#��M�M�%�/�/��3�A�6�?�?��D��M�M�!���	
�����.��
�s�A=C�C!	�C!	c	�`�U1QkQ2oU2o,nUO29^tt^2oUOU2UORQU1,2PPP2UORQU1QUPPP1,2,nUO29^tt^2oUOU2UOR,2PPP2UORQUPPP1,2P!)%fhK�9h)%fhK=9h)c�P:`�\sQsQsn\U1Qk2s\U1Qk2sQsUsP!)�@TestBaseExitStack.test_enter_context_classmethod.<locals>.TestCM�c�0:�ROQU12P!�r,rc)�clsr�s&�rr&�JTestBaseExitStack.test_enter_context_classmethod.<locals>.TestCM.__enter__�s����
�
�w��n�-rc�6:�ROQU,UN32P!�r-rc)r�r�r�s&*�rr�ITestBaseExitStack.test_enter_context_classmethod.<locals>.TestCM.__exit__�s����
�
�v�s�9�[�9�:rr)	rrrr�classmethodr&rrrr�s@�rr�r��s)����
�
.��
.�
�
;��
;rr�r,r-�rdr�rmr��rr�r&rwr�s&   @r�test_enter_context_classmethod�0TestBaseExitStack.test_enter_context_classmethod�s����	;�	;��X����
�_�_�
�
�%�����#����V�w��&7�%8�9��	
����7�F�"3�#)�6�4��t�"D�"F�	G���
�_�_�
�
�%��J�J�r�N����V�R�(��	
����6�6�4��t�"D�!E�F��
���
�s#�'C�$C.�C+	�$C+	�.C>	�7C>	c��`�U1QkQ2oU2o,nUO29^tt^2oUOU2UORQ,2PPP2UORQQ,2,nUO29^tt^2oUOU2UOR,2PPP2UORQ,2P!)%fhK9h)%fhK89h)c�P:`�\sQsQsn\U1Qk2s\U1Qk2sQsUsP!)�ATestBaseExitStack.test_enter_context_staticmethod.<locals>.TestCM��c�,:�ROQ2P!r�rcr�s�rr&�KTestBaseExitStack.test_enter_context_staticmethod.<locals>.TestCM.__enter__�s����
�
�g�&rc�4:�ROQ,UN32P!r�rc�r�r�s*�rr�JTestBaseExitStack.test_enter_context_staticmethod.<locals>.TestCM.__exit__�s����
�
�v�4��4�5rr)	rrrr�staticmethodr&rrrr�s@�rr�r��s)����
�
'��
'�
�
6��
6rr�r,�r-NNNr�r�s&   @r�test_enter_context_staticmethod�1TestBaseExitStack.test_enter_context_staticmethod�s����	6�	6��X����
�_�_�
�
�%�����#����V�g�Y�/��	
����'�+E�!F�G���
�_�_�
�
�%��J�J�r�N����V�R�(��	
����"<�!=�>��
���
��#�%C
�$C �
C	�C	� C0	�)C0	c��`�U1QkQ2oU2o,nUO29^tt^2oUOU2UORQ,2PPP2UORQQ,2,nUO29^tt^2oUOU2UOR,2PPP2UORQ,2P!)%fhK9h)%fhK89h)c�4:`�\sQsQsnQsU1QksQsUsP!)�:TestBaseExitStack.test_enter_context_slots.<locals>.TestCM��c�::�U1QkoU1QkoVmV mP!)c�,:�ROQ2P!r�rcr�s�rr,�RTestBaseExitStack.test_enter_context_slots.<locals>.TestCM.__init__.<locals>.enter�s����M�M�'�*rc�4:�ROQ,UN32P!r�rcr�s*�rr-�QTestBaseExitStack.test_enter_context_slots.<locals>.TestCM.__init__.<locals>.exit�s����M�M�6�"8�K�"8�9r�r&r)rr,r-r�s&  �rr��CTestBaseExitStack.test_enter_context_slots.<locals>.TestCM.__init__�s���+�:�!&�� $�
rr�)rrrrr/r�rrr�s@�rr�r��s����1�I�
%�
%rr�r,r�r�r�s&   @r�test_enter_context_slots�*TestBaseExitStack.test_enter_context_slots�s����	%�	%��X����
�_�_�
�
�%�����#����V�g�Y�/��	
����'�+E�!F�G���
�_�_�
�
�%��J�J�r�N����V�R�(��	
����"<�!=�>��
���
�r�c	���QQ2oQQ2oQQ2oUO29^tt^2oUO[Q29^tt^2UOU22PPP2UO[Q29^tt^2UOU22PPP2UO[Q29^tt^2UOU22PPP2UO	UO
2PPP2P!)%fhK�9h)%fhK�9h)%fhK[9h)%fhP!9h)c��\sQsQsQsP!)�FTestBaseExitStack.test_enter_context_errors.<locals>.LacksEnterAndExit��rr9rrr�LacksEnterAndExitr��r;rr�c�(`�\sQsQsnQsQsUsP!)�?TestBaseExitStack.test_enter_context_errors.<locals>.LacksEnter��c��P!rr)r�exc_infos&*rr�HTestBaseExitStack.test_enter_context_errors.<locals>.LacksEnter.__exit__�r�rr)rrrrrrrrLs@r�
LacksEnterr�������
�
rr�c�(`�\sQsQsnQsQsUsP!)�>TestBaseExitStack.test_enter_context_errors.<locals>.LacksExit�c��P!rrrCs&rr&�HTestBaseExitStack.test_enter_context_errors.<locals>.LacksExit.__enter__�r�rr)rrrrr&rrrLs@r�	LacksExitr��r�rr�r�)rdr�r<r�r�rs)rr�r�r�rws&    r�test_enter_context_errors�+TestBaseExitStack.test_enter_context_errors�s���	�	�	�	�	�	��_�_�
�
�%��'�'�	�3H�I�I��#�#�$5�$7�8�J��'�'�	�3H�I�I��#�#�J�L�1�J��'�'�	�3H�I�I��#�#�I�K�0�J����U�2�2�3��
�I�I��I�I��I�I���
�
�sk�E�D	�.&E�D(	�+&E�D;	�(#E�D%
�D%
� E�(D8
�1D8
�3E�;E
�E
�E�E	�E	c�,`�,nUO29^tt^2oUOU1Qk2oUOU2UO2RO	]2PPP2UOR]],2P!)%fhK&9h)c�,:�RO]2P!r-rcr�s�rrm�+TestBaseExitStack.test_close.<locals>._exitr�r)rdrkr�rIrdrm)rrwrmr�s&  @r�
test_close�TestBaseExitStack.test_closest�����
�_�_�
�
�%�
�^�^�
!��
!�� � ��'��K�K�M��M�M�!��
�	
����!�Q��(��
�s�AB�B	�B	c�n`�,nUO29^tt^2oUOU1Qk2oUOU2UO2oRO	]2PPP2RO	]2WO2UO
R,QN2P!)%fhKG9h)c�,:�RO]2P!r�rcr�s�rrm�-TestBaseExitStack.test_pop_all.<locals>._exitr�r)rarpr�)rdrkr��pop_allrdrIrm)rrwrm�	new_stackr�s&   @r�test_pop_all�TestBaseExitStack.test_pop_alls������
�_�_�
�
�%�
�^�^�
!��
!�� � ��'��
�
��I��M�M�!��
�	�
�
�a�����������+��
�s�AB$�$B4	�-B4	c	��UO[29^tt^2UO29^tt^2oUOQ2]]*PPP2PPP2P!)%fhK9h)%fhP!9h)c��P
!r�rr�s*r�<lambda>�3TestBaseExitStack.test_exit_raise.<locals>.<lambda>s��r)r1rvrdr��rrws& r�test_exit_raise�!TestBaseExitStack.test_exit_raisesW��
�
�
�0�
1�
1����"�"�e��
�
�-�.��!��#�2�
1�"�"��2�
1�
1�s.�A9�A&	�A9�&A6
�/A6
�1A9�9B
	�B
	c��UO29^tt^2oUOQ2]]*PPP2P!)%fhP!9h)c��P	!r�rr�s*rr�6TestBaseExitStack.test_exit_suppress.<locals>.<lambda>#���Dr�rdr�rs& r�test_exit_suppress�$TestBaseExitStack.test_exit_suppress!s4��
�_�_�
�
�%��J�J�(�)�
�a�C��
�
�
�s�A�A	�	A	c��QoUO29^tt^2oUOU[2]]*PPP2UOW[2[O
UO2oQ,UO*QQ,*oSOSTt,tFDpwOUO1MJ	toU2UOUO[2[O
UOO2oSOSTt,tFDpwOUO1MJ	toQ,2P!)%fhCK!9h[coSoPo=CK7Po=hh9httohttoh)c��Ugrrr�s&r�	raise_exc�BTestBaseExitStack.test_exit_exception_traceback.<locals>.raise_exc,����Ir)�test_exit_exception_tracebackz with self.exit_stack() as stack:)�
_exit_wrapperzcallback(*args, **kwds))r�	raise exc)rr�)
rdrkrGr�rIr�r��callback_error_internal_framesrmr�r��__context__rv)	rrrwr�r��	ve_framesrvr{�
zde_framess	&        rr�/TestBaseExitStack.test_exit_exception_traceback&sC��	�	����"�"�e����y�*�5��!��#�	
���c�:�.��(�(��):�):�;�	�
R�S��/�/�
0�
9�
'�
)�
)�	�	
���'0�1�y�!�f�f�a�f�f�
�y�1�8�	=�	
���c�o�o�/@�A��)�)�#�/�/�*G�*G�H�
����J�?�J�q�6�6�1�6�6�*�J�?�B�C�	E�'#�"�"���	��C��	��
2��@sK�E*� E�E*�'"F�)"F
�E'	�E'	�!E*�'E*�*	F�4F�5E=�=Fc
��QQ2oQQ2oQQ2oU[29^tt^2U[[29^tt^2U29^tt^2U[29^tt^2]]*PPP2PPP2PPP2PPP2UO	Q2UO]*oUOU[2UOUO[2P!)%fhK�9h)%fhK�9h)%fhK�9h)%fhK�9h[c�oSOSO[2SOSOO[2SOSOOO2Po=CK!Po=hh9h)c�4`�\sQsQsnQsQsQsQsUsP!)�JTestBaseExitStack.test_exit_exception_chaining_reference.<locals>.RaiseExciIc��VmP!rr�r�s&&rr��STestBaseExitStack.test_exit_exception_chaining_reference.<locals>.RaiseExc.__init__Jrrc��U!rrrCs&rr&�TTestBaseExitStack.test_exit_exception_chaining_reference.<locals>.RaiseExc.__enter__LrErc��UOgrr�r�s&*rr�STestBaseExitStack.test_exit_exception_chaining_reference.<locals>.RaiseExc.__exit__Ns���h�h�rr�r�rLs@r�RaiseExcrIs����
�
�
�
rr"c�4`�\sQsQsnQsQsQsQsUsP!)�UTestBaseExitStack.test_exit_exception_chaining_reference.<locals>.RaiseExcWithContextiQc� �VmV mP!r)�outer�inner)rr&r's&&&rr��^TestBaseExitStack.test_exit_exception_chaining_reference.<locals>.RaiseExcWithContext.__init__Rs��"�
�"�
rc��U!rrrCs&rr&�_TestBaseExitStack.test_exit_exception_chaining_reference.<locals>.RaiseExcWithContext.__enter__UrErc�@�UOgSOg9hr�r'r&r�s&*rr�^TestBaseExitStack.test_exit_exception_chaining_reference.<locals>.RaiseExcWithContext.__exit__Ws"��%��*�*�$��%��*�*�$�s��r,r�rLs@r�RaiseExcWithContextr$Qs����
#�
�
%�
%rr.c�.`�\sQsQsnQsQsQsUsP!)�MTestBaseExitStack.test_exit_exception_chaining_reference.<locals>.SuppressExci]c��U!rrrCs&rr&�WTestBaseExitStack.test_exit_exception_chaining_reference.<locals>.SuppressExc.__enter__^rErc�(�U[U2mP	!r�)r��
saved_detailsr�s&*rr�VTestBaseExitStack.test_exit_exception_chaining_reference.<locals>.SuppressExc.__exit__`s��+6��T�
�(�rrrKrLs@r�SuppressExcr0]s����
�
�
rr6�0Expected IndexError, but no exception was raised)
�
IndexError�KeyErrorr2rGr�r�rr�r4rv)rr"r.r6r��	inner_excs&     r�&test_exit_exception_chaining_reference�8TestBaseExitStack.test_exit_exception_chaining_referenceFs8��	�	�
	%�
	%�	�	�	J��*�%�%�(��>�B�B�$���%�j�1�1���E�2�'�C�&�
�I�I�H�I��-�-�a�0�	����i��4����i�3�3�5F�G�2�1��'���C�B��&�%��
�	G��!�!�#�/�/�8�<��!�!�#�/�/�"=�"=�~�N����c�o�o�9�9�E�E�F�F��		G�s��E�D3�D 	�D

�4
C:�>D

�D 	�D3�E�:D
�D
�D

�
D�D�D 	� D0
�)D0
�+D3�3E	�<E	�>E�	G�G�A9G�Gc�0`�QoPnU1QkoUO29^tt^2oUOU[2UOU[2UOU[2UOU2UOU[2]]*PPP2UOQ2R]*oUOU[2UOUO[2P!)%fhKb9h[c�oSOSO[2SOSOO[2SOSOOO2Po=K�Po=hh9h)c��Ugrrr�s&rr�ATestBaseExitStack.test_exit_exception_chaining.<locals>.raise_excxrrc�:�UnP	!r�r)r�r4s*�r�suppress_exc�DTestBaseExitStack.test_exit_exception_chaining.<locals>.suppress_exc|s���'�M�rr7)rdrkr8r9r2r�rGr�r�rr�rv)rrrArwr�r:r4s&     @r�test_exit_exception_chaining�.TestBaseExitStack.test_exit_exception_chainingvs$���	��
�	�
	J����"�"�e����y�*�5����y�(�3����y�.�9��
�
�<�(����y�*�5��A��
#�
�I�I�H�I�!�!�$�	����i��4����i�3�3�5F�G�##�"���	G��!�!�#�/�/�8�<��!�!�#�/�/�"=�"=�~�N����c�o�o�9�9�E�E�F�F��		G�s<�D�A3C4�D�4D	�=D	�?D�	F�F�A9F�Fc��```�QQ[2n[U1Qk2n[UU1Qk2oRU1FD5oRO29^tt^2U29^tt^2[2g	P!)%fhL9hRO	Q2L/Rc&oROSO2Po=LPo=hh9hPPP2J�)%fhJ�9h)c��\sQsQsQsP!)�PTestBaseExitStack.test_exit_exception_explicit_none_context.<locals>.MyExceptioni�rr9rrr�MyExceptionrG�r;rrHc3�h: �Pw�P![cR2oSgPSmh9hh9h3hr)�
BaseExceptionr)r�rHs �r�my_cm�JTestBaseExitStack.test_exit_exception_explicit_none_context.<locals>.my_cm�s6����
+��� �
+�!�m��+��I��&*�C�O��
+�s$�2�
�2�	/�/�"�	+�/�2c3�: �RO29^tt^2oUOR22Uw�PPP2P!)%fhP!9h3hr)rdr�)rwrKrs ��r�my_cm_with_exit_stack�ZTestBaseExitStack.test_exit_exception_explicit_none_context.<locals>.my_cm_with_exit_stack�s8�������"�"�e��#�#�E�G�,���#�"�"�"�s!�A�A�
A�A	�A	�	Ar7)r�rlr�r8r�r�r)rrNr&r�rHrKsf   @@r�)test_exit_exception_explicit_none_context�;TestBaseExitStack.test_exit_exception_explicit_none_context�s����	�)�	�
�	+�
�	+�
�	�
�	�
�/�0�B������R����(�l�*�	1�����
�I�I�P�Q��#�7��%�%�c�o�o�6�6��7��	 ����sZ�C	�B�$A3
�3B�<B�>B�C	�C�C� C�;C	�C�C	�C#
�C#
c��QoQoUO29^tt^2oUOQ2UOU[2PPP2UOQ2UO29^tt^2oUOU[2UOU2UOU[2PPP2UOQ2P!)%fhK�9h[c!oSOS[2Po=K�Po=hh9h)%fhKd9h[c"oSOS[2Po=P!Po=hh9h)c��Ugrrr�s&rr�HTestBaseExitStack.test_exit_exception_non_suppressing.<locals>.raise_exc�rrc��P	!r�rr�s*rrA�KTestBaseExitStack.test_exit_exception_non_suppressing.<locals>.suppress_exc�r�rc��P!rrrrrr�GTestBaseExitStack.test_exit_exception_non_suppressing.<locals>.<lambda>�s��trr7z.Expected KeyError, but no exception was raised)rdrkr8r�r�r�r9r�)rrrArwr�s&    r�#test_exit_exception_non_suppressing�5TestBaseExitStack.test_exit_exception_non_suppressing�s���	�	�	J����"�"�e����|�,����y�*�5�#�
�I�I�H�I�	H����"�"�e����y�(�3��
�
�<�(����y�*�5�#�
�I�I�F�G�!#�"���	3��!�!�#�z�2�2��	3��#�"���	1��!�!�#�x�0�0��	1�sv�C(�)C�
C(�$D)�<>D�:D)�C%	�C%	� C(�(	D�2D�3D�D�D&	�D&	�!D)�)	E�3E�4E�Ec��[Q2o[]2o[]2o[]2o[]2oUO29^tt^2oUOUU22UOUU22UOUU22Ug)%fhP!9h[c�oSO	Xu2SO	SO
S2SO	SO
O
S2SO	SO
O
O
S2SO
SO
O
O
O
2Po=P!Po=hh9h)c3�( �Pw�UgSg9h3hrrr�s&r�gets_the_context_right�ZTestBaseExitStack.test_exit_exception_with_correct_context.<locals>.gets_the_context_right�s���
���	��c�	�s�����)rlr�rdr�r%rr�)rr]�exc1�exc2�exc3�exc4rwr�s&       r�(test_exit_exception_with_correct_context�:TestBaseExitStack.test_exit_exception_with_correct_context�s1��	�	�
�	���|����|����|����|��
	L����"�"�e��#�#�$:�4�$@�A��#�#�$:�4�$@�A��#�#�$:�4�$@�A��
�	#�"�"��
�	L��M�M�#�$��M�M�#�/�/�4�0��M�M�#�/�/�5�5�t�<��M�M�#�/�/�5�5�A�A�4�H�������2�2�>�>�J�J�
L�
L��	L�s=�B/�AB�B,	�$B,	�&B/�,B/�/	F�9F�:B<E<�<Fc�T�Qo[]2o[]2o[]2o[]2o[]2oUO29^tt^2oUOVU2UOVU2Ug)%fhP!9h[CcoSOX�2SOSOS2SOSOOS2SOSOOOS2SOSOOOOS2SOSOOOOO2Po=P!Po=hh9h)c��UgSg9hrr)r:�	outer_excs&&r�raise_nested�QTestBaseExitStack.test_exit_exception_with_existing_context.<locals>.raise_nested�s��
 ������s��)r�rdrkr%rr�)	rrhr_r`rarb�exc5rwr�s	&        r�)test_exit_exception_with_existing_context�;TestBaseExitStack.test_exit_exception_with_existing_context�s;��	 �
��|����|����|����|����|��
	Q����"�"�e����|�4�8����|�4�8��
�#�"�"���	Q��M�M�#�$��M�M�#�/�/�4�0��M�M�#�/�/�5�5�t�<��M�M�#�/�/�5�5�A�A�4�H��M�M����,�,�8�8�D�D�d�
L�������+�+�7�7�C�C�O�O�
Q�
Q��	Q�s<�B�'A<�<B
	�B
	�B�
B�
F'�F'�DF"�"F'c��QoUO29^tt^2oUOU2]]*PPP2P!)%fhP!9h[coSOQ2Po=P!Po=hh9h)c��P	!r�rr�s*rrA�DTestBaseExitStack.test_body_exception_suppress.<locals>.suppress_excr�rz%Expected no exception, got IndexError)rdr�r8r�)rrArwr�s&   r�test_body_exception_suppress�.TestBaseExitStack.test_body_exception_suppress
s^��	�	?����"�"�e��
�
�<�(��!��#�"�"�"���	?��I�I�=�>�>��	?�s?�A�A�A�A	�A	�A�A�	A>�!A>�"A9�9A>c���UO29^tt^2oUOQ2UOQ2UOQ2PPP2P!)%fhP!9h)c��P	!r�rr�s*rr�ITestBaseExitStack.test_exit_exception_chaining_suppress.<locals>.<lambda>rrc��]]*!r-rr�s*rrrts��A�a�Crc��-]*!r-rr�s*rrrts��B�q�Err	rs& r�%test_exit_exception_chaining_suppress�7TestBaseExitStack.test_exit_exception_chaining_suppresssG��
�_�_�
�
�%��J�J�(�)��J�J�'�(��J�J�)�*��
�
�
�s�7A�A,	�$A,	c���UO29^tt^2o[Q2FDoUO[2J	PPP2P!)%fhP!9h)i')rd�rangerk�int)rrw�is&  r�test_excessive_nesting�(TestBaseExitStack.test_excessive_nestings:��
�_�_�
�
�%��5�\�����s�#�"��
�
�
�s�)A
�
A	�A	c��QQ[2oU2o[2Um[2UmUO2oUO	[
Q29^tt^2UO
U2PPP2UOU2UOUOP*]*U2P!)%fhKM9h)c��\sQsQsQsP!)�7TestBaseExitStack.test_instance_bypass.<locals>.Examplei$rr9rrr�Exampler�$s��trr�r�)
r�r&rrdr�r<r�r�r%rs)rr�r&rws&   r�test_instance_bypass�&TestBaseExitStack.test_instance_bypass#s���#�f�#�
�Y���x����h������!��
�
#�
#�I�/D�
E�
E�����#�F�
�
�
�2���
�
�e�+�+�B�/��2�B�7�F�
E�s�$B;�;C	�C	c	�`�QQ[2nQQ[2o[U1Qk2o[Q2oUOR29^tt^2oUO	29^tt^2oUOU22UOU22UQ2g)%fhL9hPPP2L)%fhL9hWOoSOSR2SOSOS2SOSOO2SOSOO2SOSOSO2P!)c��\sQsQsQsP!)�ITestBaseExitStack.test_dont_reraise_RuntimeError.<locals>.UniqueExceptioni0rr9rrr�UniqueExceptionr�0s��$rr�c��\sQsQsQsP!)�LTestBaseExitStack.test_dont_reraise_RuntimeError.<locals>.UniqueRuntimeErrori1rr9rrr�UniqueRuntimeErrorr�1s��rr�c3�V: �]w�P![coRQ2SgPo=hh9h3h)raz
new exception�r�)r�r�s �rrD�@TestBaseExitStack.test_dont_reraise_RuntimeError.<locals>.second3s/����
@�����
@�%�o�6�C�?��
@�s �)�
�)�	&�&�	!�&�)c3�F �]w�P![coSgPo=hh9h3hr-r�r�s rrB�?TestBaseExitStack.test_dont_reraise_RuntimeError.<locals>.first:s#���
�����
��	��
�s �!��!�	����!zplease no infinite loop.)r�r�rlr1rdr�r#r�rr�r�r%)rr�rDrB�err_ctx�es_ctxr�r�s&      @r�test_dont_reraise_RuntimeError�0TestBaseExitStack.test_dont_reraise_RuntimeError.s���.�i�.�4��4�	�	@�
�	@�
�	�
�	��
�
��
/�
/�7����"�"�f��$�$�V�X�.��$�$�U�W�-�(�)C�D�D�#�"��"�0�
/�
/�
/���������c�?�3����c�o�o�/A�B����#�/�/�5�5�6����#�/�/�3�3�4��
�
�c�m�m�S�_�_�5s*�C�.5B#	�#B3
�,B3
�.C�C	�	C	r)"rrrrrdrr8rArgryr�r�r�r�r�r�r�r�rr
rr;rCrPrYrcrkrprwr}r�r�rrrLs@rrara?s������J�� � �4�!�4��'%�R �D/�&G�.?�,?�04�&	)�,���
E�@.H�`H�> R�DH�6L�>Q�8?�+�$�	8� 6� 6rrac�$�\sQsQs\sQQ,sQsP!)�
TestExitStackiQr)rr)rzif cb(*exc_details):)rrrr�	ExitStackrdrrrrrr�r�Qs���J�!�,�&�"rr�c�l`�\sQsQsnPsPs\OQ2sQs	Qs
QsQsQs
QsUsP!)	�TestRedirectStreamiYc��UOOoUOP2oUOUOU2P!r)�redirect_streamrrmr>s&  rrA�%TestRedirectStream.test_instance_docs^s9���+�+�3�3���"�"�4�(��������l�3rc��[[UO2oUOP2UO	[[UO2U2P!r)�getattr�sys�orig_streamr�r%)r�orig_stdouts& r�test_no_redirect_in_init�+TestRedirectStream.test_no_redirect_in_inites=���c�4�#3�#3�4�����T�"��
�
�g�c�4�#3�#3�4�k�Brc	���[O2oQo[[UO2oUOU29^tt^2[
U[[UO2Q5PPP2UO[[UO2U2UO2O2oUOVB2P!)%fhKk9h)z<Consider an API like help(), which prints directly to stdout��file)�io�StringIOr�r�r�r��printr%�getvalue�striprm)rr{�msgr��ss&    r�test_redirect_to_string_io�-TestRedirectStream.test_redirect_to_string_iojs����K�K�M��L���c�4�#3�#3�4��
�
!�
!�!�
$�
$��#�G�C��)9�)9�:�;�%��
�
�g�c�4�#3�#3�4�k�B�
�J�J�L��� ������ �	%�
$�s�&C�C%	�C%	c��[O2oUOU29^tt^2oUOV!2PPP2P!)%fhP!9hr)r�r�r�r%)rr{�enter_results&  r�test_enter_result_is_target�.TestRedirectStream.test_enter_result_is_targetts;���K�K�M��
�
!�
!�!�
$�
$���M�M�,�*�%�
$�
$�
$�s�A�A	�A	c
�N�[O2oUOU2o[[UO
2oU9^tt^2[
QQ[[UO
2Q5PPP2U9^tt^2[
Q[[UO
2Q5PPP2UO[[UO
2U2UO2oUOUQ2P!)%fhK�9h)%fhKq9h��Hello� )�endr�zWorld!r�z
Hello World!
�
r�r�r�r�r�r�r�r%r�rm�rr{�
write_to_fr�r�s&    r�test_cm_is_reusable�&TestRedirectStream.test_cm_is_reusableys����K�K�M���)�)�!�,�
��c�4�#3�#3�4��
�Z��'�s���d�6F�6F�)G�H��
�Z��(���d�.>�.>�!?�@���
�
�g�c�4�#3�#3�4�k�B�
�J�J�L������,�-�
�Z��
�Z�s$�'D�&D�D	�
D	�D$	�D$	c�N�[O2oUOU2o[[UO
2oS9^tt^2[
QQ[[UO
2Q5U9^tt^2[
Q[[UO
2Q5PPP2PPP2UO[[UO
2U2UO2oUOUQ2P!)%fhKf9h)%fhKq9hr�r�r�s&    r�test_cm_is_reentrant�'TestRedirectStream.test_cm_is_reentrant�s����K�K�M���)�)�!�,�
��c�4�#3�#3�4��
�Z��'�s���d�6F�6F�)G�H����h�W�S�$�2B�2B�%C�D���	
�
�
�g�c�4�#3�#3�4�k�B�
�J�J�L������,�-�	����Z�s0�1D�=&D	�#D�D
�
D
�D�D$	�D$	r)rrrrr�r�rr8rAr�r�r�r�r�rrrLs@rr�r�YsF�����O��K�� � �4�!�4�C�
!�+�

.�
.�
.rr�c� �\sQsQs\sQsQsP!)�TestRedirectStdouti��stdoutr)rrrr�redirect_stdoutr�r�rrrrr�r�����%�O��Krr�c� �\sQsQs\sQsQsP!)�TestRedirectStderri��stderrr)rrrr�redirect_stderrr�r�rrrrr�r��r�rr�c�|`�\sQsQsn\O
Q2sQsQsQs	Qs
QsQsQ	s
Q
sQsQsUsP!)
�TestSuppressi�c�t�[Oo[2oUOUOU2P!r)�suppressrrmr>s&  rrA�TestSuppress.test_instance_docs�s*�� �'�'���j��������l�3rc��[[29^tt^2oUOU2PPP2P!)%fhP!9hr)r�rGr�)rr�s& r�test_no_result_from_enter�&TestSuppress.test_no_result_from_enter�s,��
�j�
!�
!�\����l�+�"�
!�
!�
!�s�5�A	�A	c��[[29^tt^2UO[]]2] 2PPP2P!)%fhP!9h)rp)r�rGrm�powrCs&r�test_no_exception�TestSuppress.test_no_exception�s2��
�j�
!�
!����S��A�Y��+�"�
!�
!�
!�s�A�A	�	A	c��[[29^tt^2[]2PPP2P!)%fhP!9h)�)r�r<r�rCs&r�test_exact_exception�!TestSuppress.test_exact_exception�s#��
�i�
 �
 ���F�!�
 �
 �
 �s�/�A	�A	c��[[29^tt^2Q]2*PPP2P!)%fhP!9h)r�)r��LookupErrorrCs&r�test_exception_hierarchy�%TestSuppress.test_exception_hierarchy�s#��
�k�
"�
"��B�K�#�
"�
"�
"�s�
-�>	�>	c	���UO[29^tt^2[[29^tt^2]]*PPP2PPP2P!)%fhK9h)%fhP!9hr-)r1rvr�r<rCs&r�test_other_exception�!TestSuppress.test_other_exception�sF��
�
�
�0�
1�
1��)�$�$��!��%�2�
1�$�$��2�
1�
1�s.�A&�
A	�A&�A#
�A#
�A&�&A7	�/A7	c	���UO[29^tt^2[29^tt^2]]*PPP2PPP2P!)%fhK9h)%fhP!9hr-)r1rvr�rCs&r�test_no_args�TestSuppress.test_no_args�sA��
�
�
�0�
1�
1�����!���2�
1����2�
1�
1�s-�A!�
A	�A!�A
�A
�A!�!A2	�*A2	c��[[[29^tt^2]]*PPP2[[[29^tt^2[]2PPP2P!)%fhKB9h)%fhP!9hr-)r�rvr<r�rCs&r�test_multiple_exception_args�)TestSuppress.test_multiple_exception_args�sL��
�'��
3�
3�
�a�C�4�
�'��
3�
3���F�4�
3�4�
3��
3�
3�
3�s#�
A"�A5�"A2	�+A2	�5B	�>B	c	��[[2oU9^tt^2PPP2U9^tt^2[]2PPP2S9^tt^2U9^tt^2[]2PPP2P	o]]*PPP2UOW2P!)%fhK}9h)%fhKr9h)%fhK\9h)%fhK\9hr)r�r�r�rt)r�ignore_exceptions�outer_continueds&  rr��!TestSuppress.test_cm_is_reentrant�s���$�Y�/��
�
���
�
���F��
�
�"�"��A��#�"�O�
�a�C�	�
	
����(��
��
�
��#�"���
�sR�B�B%�
C�B8	�$C�B"	�B"	�%B5	�.B5	�8C
�C
�C�C	�C	c��QoQo[[29^tt^2U2g)%fhL9h[[[29^tt^2S2g)%fhL9hSO[29^tt^2o[[29^tt^2S2g)%fhL9hPPP2L)%fhL9hSOWO[	Q[Q2[Q2,22[[29^tt^2[Q[2,2g)%fhL9hSO[29^tt^2o[[29^tt^2[Q[Q2[Q2,2g)%fhL9hPPP2L)%fhL9hSOSO[Q[Q2,22SO[29^tt^2o[[29^tt^2[Q[Q2[Q2,2g)%fhL9hPPP2L)%fhL9hSOSO[	Q[Q2,22P!)c�X�[Q[Q2[Q2[Q2,2!)zEG with ValueErrors only�ve1�ve2�ve3)�ExceptionGrouprGrrrr�4TestSuppress.test_exception_groups.<locals>.<lambda>�s%���&�
��
�
�5� 1�:�e�3D�E�
rc	�l�[Q[Q2[Q2[Q2[Q2,2!)� EG with many types of exceptionsr��ke1r��ke2)r�rGr9rrrrr��s*���.�
��
�����E�1B�H�U�O�T�
rr�r�r��message�gr�)	r�rGr9r1r��assertExceptionIsLiker#�
GeneratorExit�BaseExceptionGroup)r�eg_ve�eg_all�eg1s&   r�test_exception_groups�"TestSuppress.test_exception_groups�s���
��
���j�
!�
!��'�M�"�
!��
�j�(�
+�
+��(�N�,�
+��
�
�
�~�
.�
.�#��*�%�%��h��&�%��%�/�
.�
.�
.��	
�"�"��M�M��2��%��(�5�/�2�
�	
��m�
$�
$�$�Y���0A�B�B�%�
$���
�
�1�
2�
2�c��(�#�#�(��]�3�5G��RU��4W�X�X�$�#��#�3�
2�
2�
2��	
�"�"��M�M�-�i�-��:L�9M�N�	
��
�
�~�
.�
.�#��-�(�(�(��]�3�5G��RU��4W�X�X�)�(��(�/�
.�
.�
.��	
�"�"��M�M�>�)�h�s�m�_�E�	
s��'�7	�7	�A�A.	�'A.	�C�&B.	�.B>
�7B>
�9C�C	�C	�/E�E	�E	�5G�
!F.	�.F>
�7F>
�9G�G	�G	�+J�!I$	�$I4
�-I4
�/J�J	�
J	r)rrrrrr8rAr�r�r�r�r�r�r�r�r�rrrLs@rr�r��sO����� � �4�!�4�,�,����
�
�)�(
�(
rr�c�:`�\sQsQsnQsQsQsQsQsUs	P!)�	TestChdiri�c���[OO[OO[OO	[
22,UN3!r)�os�path�join�dirname�realpath�__file__)r�partss&*r�make_relative_path�TestChdir.make_relative_paths>���w�w�|�|��G�G�O�O�B�G�G�,�,�X�6�7�
�
�
�	
rc�h�[O2oUOQ2oUOV2[	U29^tt^2UO[O2U2PPP2UO[O2U2P!)%fhK79h)�data)r�getcwdr
ru�chdirrm)r�old_cwdrs&  r�test_simple�TestChdir.test_simplesm���)�)�+���(�(��0�����G�,�
�6�]�]����R�Y�Y�[�&�1���������g�.��]�s�&B!�!B1	�*B1	c�f�[O2oUOQ2oUOQ2oUOVU12[	U2[	U2qTS9^tt^2UO[O2U2S9^tt^2UO[O2U2U9^tt^2UO[O2U2PPP2UO[O2U2PPP2UO[O2U2PPP2UO[O2U2P!)%fhK�9h)%fhKw9h)%fhK]9h)r
�archivetestdata)rrr
�assertNotInrrm)rr�target1�target2�chdir1�chdir2s&     r�test_reentrant�TestChdir.test_reentrants���)�)�+���)�)�&�1���)�)�*;�<������G�"4�5��w���w���
�V����R�Y�Y�[�'�2���� � �����g�6��V��$�$�R�Y�Y�[�'�:��� � �����g�6�	�

���R�Y�Y�[�'�2��	
�������g�.�	�V������V�sN�+0F �0F
	�&E:
�1-F
	�-F �:F
�F
�F
	�
F
�F
�F � F0	�)F0	c���[O2oUOQ2oUOV2[	U29^tt^2UO[O2U2[
Q2g)%fhL69h[c&oSO[S2Q2Po=LPo=hh9hSO[O2S2P!)r
�boom)rrr
rurrmr��str)rrr�res&   r�test_exception�TestChdir.test_exception s����)�)�+���(�(��0�����G�,�	.��v���� � �����f�5�"�6�*�*�����	.����S��W�f�-�-��	.���������g�.s;�B�
1A>�>B	�B	�	B�B�	C�C�B<�<Cr)
rrrrr
rrr rrrLs@rrr�s����
�/�/�"/�/rr�__main__)#rr�rr�ror�rI�unittest�
contextlibr�r�test.supportr�test.support.testcaserr�TestCaserr]r:r]rir{r�r�r�rar�r�r�r�r�rr�mainrrr�<module>r)s^��?�	�	�
�������"�6��2A��!2�!2�2A�jF#�X�.�.�F#�R
%�h�'�'�%�D#�(�+�+�#�"�(�+�+�"�$-'�(�+�+�-'�`� ��qF�8�,�,�qF�h	O6�O6�d�%�x�'8�'8��6.�6.�r�+�X�->�->���+�X�->�->��^
�'��):�):�^
�B,/��!�!�,/�^�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit