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 :  /Python313/Lib/test/test_interpreters/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Python313/Lib/test/test_interpreters/__pycache__/test_api.cpython-313.pyc
�

��i�����SSKrSSKrSSKrSSKJrJr SSKrSSKrSSKrSSK	r	SSK
Jr SSKJ
r
 \
R"S5rSSKJr SSKJr SSKJr SS	KJrJrJr S
SKJrJrJrJrJrJr SrS
rSr Sr!Sr"Sr#"SS\5r$"SS\5r%"SS\5r&"SS\5r'"SS\5r("SS\5r)"SS\5r*"S S!\5r+"S"S#\5r,"S$S%\5r-S&r.S'r/S(r0S)r1S*r2S+r3"S,S-5r4S9SS..S/jjr5"S0S1\5r6"S2S3\5r7"S4S5\5r8"S6S7\	Rr5r:\;S8:Xa\	Rx"5 gg):�N)�dedent�indent)�support)�
import_helper�
_interpreters)�Py_GIL_DISABLED)�interpreters)�force_not_colorized)�InterpreterError�InterpreterNotFoundError�ExecutionFailed�)�_captured_script�_run_output�_running�TestBase�requires_test_modules�_testinternalcapi�unknownzruntime init�legacy C-API�C-API�cross-interpreter C-APIz_interpreters modulec��\rSrSrSrSrg)�ModuleTests�"c��[R[R[R[R/n[R[R[R[R/nURX!5 g�N)r	�create_queue�Queue�
QueueEmpty�	QueueFull�assertEqual)�self�first�seconds   �4C:\Python313\\Lib\test\test_interpreters\test_api.py�test_queue_aliases�ModuleTests.test_queue_aliases$sj���%�%�����#�#��"�"�	
��
�%�%�����#�#��"�"�	
��	
����'��N)�__name__�
__module__�__qualname__�__firstlineno__r'�__static_attributes__r*r)r&rr"s��
(r)rc�2�\rSrSrSrSrSrSrSrSr	g)	�CreateTests�4c��[R"5nURU[R5 UR	U[R
"55 UR
[[RS5 g)Nu�)	r	�create�assertIsInstance�Interpreter�assertIn�list_all�assertRaises�UnicodeEncodeErrorr�r#�interps  r&�test_in_main�CreateTests.test_in_main6sX���$�$�&�����f�l�&>�&>�?��
�
�f�l�3�3�5�6�	
���,�m�.B�.B�H�Mr)c�.^^�[R"5mSmUU4Sjn[R"US9nT UR5 SSS5 UR	5 URT[R"55 g!,(df   ND=f)Nc�p>�[R"5mTR5 TR5 gr)r	r4�acquire�release)r<�locks��r&�f�%CreateTests.test_in_thread.<locals>.fAs#���!�(�(�*�F��L�L�N��L�L�Nr)��target)�	threading�Lock�Thread�start�joinr7r	r8)r#rD�tr<rCs   @@r&�test_in_thread�CreateTests.test_in_thread>sd����~�~�����	�

���A�&��
�
�G�G�I��	�����
�
�f�l�3�3�5�6��T�s�B�
Bc��[R"5un[R"5n[U[	S55n[R
"[
U55nUR[R"5XU/5 g)Nz�
            from test.support import interpreters
            interp = interpreters.create()
            print(interp.id)
            )r	r8r4rrr6�intr")r#�mainr<�out�interp2s     r&�test_in_subinterpreter�"CreateTests.test_in_subinterpreterLsl���%�%�'����$�$�&���&�&�*�#���
�*�*�3�s�8�4������.�.�0�4��2I�Jr)c�r�[[R"55n/n[S5H)n[R"5nURU5 M+ UHnUR
5 M [R"5nUR[[R"55X1-5 g�N�)�setr	r8�ranger4�append�closer")r#�before�
interp_lst�_�interpsr<s      r&�test_after_destroy_all�"CreateTests.test_after_destroy_allWs����\�*�*�,�-���
��q��A�"�)�)�+�G����g�&��!�F��L�L�N�!��$�$�&������\�2�2�4�5�v��7H�Ir)c��[[R"55n[R"5n[R"5n[R"5nUR	5 UR	5 [R"5nUR[[R"55XU1-5 gr)rZr	r8r4r]r")r#r^�interp1rT�interp3r<s      r&�test_after_destroy_some�#CreateTests.test_after_destroy_somees����\�*�*�,�-���%�%�'���%�%�'���%�%�'���
�
���
�
���$�$�&������\�2�2�4�5�v�&�@Q�7Q�Rr)r*N)
r+r,r-r.r=rNrUrbrgr/r*r)r&r1r14s��N�7�	K�J�Sr)r1c�&�\rSrSrSrSrSrSrg)�GetMainTests�sc�f�[R"5nURURS5 g�Nr)r	�get_mainr"�id�r#rRs  r&�test_id�GetMainTests.test_idus$���$�$�&��������!�$r)c�z�[R"5n[R"5nURX5 gr)r	rn�get_current�assertIs�r#rR�currents   r&�test_current�GetMainTests.test_currentys*���$�$�&���*�*�,���
�
�d�$r)c�z�[R"5n[R"5nURX5 gr)r	rnru)r#�main1�main2s   r&�test_idempotent�GetMainTests.test_idempotent~s*���%�%�'���%�%�'���
�
�e�#r)r*N)r+r,r-r.rqrxr}r/r*r)r&rjrjss��%�%�
$r)rjc�6�\rSrSrSrSrSr\S5rSr	g)�GetCurrentTests�c�z�[R"5n[R"5nURX!5 gr)r	rnrtr"rvs   r&�	test_main�GetCurrentTests.test_main�s,���$�$�&���*�*�,������'r)c��[R"5n[R"5n[U[	S55n[R
"[
U55nURXB5 URXA5 g)Nz�
            from test.support import interpreters
            cur = interpreters.get_current()
            print(cur.id)
            )	r	rnr4rrr6rQr"�assertNotEqual)r#rRr<rSrws     r&�test_subinterpreter�#GetCurrentTests.test_subinterpreter�sh���$�$�&���$�$�&���&�&�*�#���
�*�*�3�s�8�4������)����G�*r)c���URS5 [R"5n[R"5nURX5 SSS5 URS5 [R"5n[U[
S55nSUR55upVURXV5 SSS5 URS5 [R"5n[U[
S55n[U5n[U5nURXx5 SSS5 g!,(df   N�=f!,(df   N�=f!,(df   g=f)NrR�subinterpreterz�
                from test.support import interpreters
                cur = interpreters.get_current()
                print(id(cur))
                cur = interpreters.get_current()
                print(id(cur))
                c3�8# �UHn[U5v� M g7fr)rQ)�.0�vs  r&�	<genexpr>�2GetCurrentTests.test_idempotent.<locals>.<genexpr>�s���?�.>��c�!�f�f�.>�s�zper-interpreterz�
                from test.support import interpreters
                cur = interpreters.get_current()
                print(id(cur))
                )�subTestr	rtrur4rr�
splitlinesr"rQror�)	r#�cur1�cur2r<rS�objid1�objid2�id1�id2s	         r&r}�GetCurrentTests.test_idempotent�s��
�\�\�&�
!��+�+�-�D��+�+�-�D��M�M�$�%�"�
�\�\�*�
+�!�(�(�*�F��f�f�.�'��C�@�c�n�n�.>�?�N�F����V�,�,��\�\�+�
,�!�(�(�*�F��f�f�.�'��C�
�c�(�C��V�*�C�����)�-�
,�#"�
!��
,�
+��-�
,�s%�<D0�'AE�AE�0
D>�
E�
E c���[R"5nURS[RS35n[U5up4UR
X15 UR
U[5 g)N�
            import z{ as interpreters
            interp = interpreters.get_current()
            print((interp.id, interp.whence))
            )r�next_interpreter_id�run_temp_from_capir	r+�evalr"�WHENCE_STR_CAPI)r#�expected�text�interpid�whences     r&�test_created_with_capi�&GetCurrentTests.test_created_with_capi�sg��$�8�8�:���&�&�,� �)�)�*�+
�(���
 ��:�������,������1r)r*N)
r+r,r-r.r�r�r}rr�r/r*r)r&r�r��s%��(�

+�*�:�	2��	2r)r�c�2�\rSrSrSrSrSrSrSrSr	g)	�ListAllTests�c�d�[R"5nURS[U55 g�Nr)r	r8r"�len)r#ras  r&�test_initial�ListAllTests.test_initial�s$���'�'�)������C��L�)r)c�X�[R"5n[R"5n[R"5n/n[R"5HnUR	UR
5 M  UR
XAR
UR
UR
/5 gr)r	rtr4r8r\ror"�r#rRr$r%�idsr<s      r&�test_after_creating� ListAllTests.test_after_creating�sw���'�'�)���#�#�%���$�$�&����"�+�+�-�F��J�J�v�y�y�!�.�	
����w�w����&�)�)�<�=r)c�b�[R"5n[R"5n[R"5nUR5 /n[R"5HnURUR5 M  URXARUR/5 gr)r	rtr4r]r8r\ror"r�s      r&�test_after_destroying�"ListAllTests.test_after_destroying�sz���'�'�)���#�#�%���$�$�&��
���
���"�+�+�-�F��J�J�v�y�y�!�.�	
����w�w��	�	�2�3r)c� �[R"5n[R"5n[R"5nXU/n[R"5nUR	XT5 [XT5HupgUR
Xg5 M gr)r	rtr4r8r"�zipru)r#rRr$r%r��actualrerTs        r&r}�ListAllTests.test_idempotent�sp���'�'�)���#�#�%���$�$�&����(���&�&�(������*� #�F� 5��G��M�M�'�+�!6r)c�:�[R5tp[R5n[R5n[R5nUS-nUS-nU[4U[4U[4U[4U[
4U[4/nUSSn	UR
S[RS35n
[U
5n[R"5Vs/sHo�RUR4PM n
nURX�5 URX�5 gs snf)Nr���r�z� as interpreters
            interp = interpreters.create()
            print(
                [(i.id, i.whence) for i in interpreters.list_all()])
            )rrnr4�WHENCE_STR_RUNTIME�WHENCE_STR_STDLIBr�r�r	r+r�r8ror�r")r#�mainidr`�	interpid1�	interpid2�	interpid3�	interpid4�	interpid5r��	expected2r��res�i�res2s              r&r��#ListAllTests.test_created_with_capi�s��"�+�+�-�
��!�(�(�*�	�!�(�(�*�	�!�(�(�*�	���M�	���M�	�
�'�(�
�)�*�
�)�*�
�)�*�
��(�
�)�*�

���S�b�M�	��&�&�,� �)�)�*�+
�(����4�j��*6�*?�*?�*A�B�*A�Q���q�x�x� �*A��B�����'�����)��Cs�!Dr*N)
r+r,r-r.r�r�r�r}r�r/r*r)r&r�r��s��*�	>�
4�
,�*r)r�c�\�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrg)�InterpreterObjectTestsic��[R"5Rn[R"U5nUR	URU5 gr)r	rtror6r"�r#r�r<s   r&�
test_init_int�$InterpreterObjectTests.test_init_ints:���+�+�-�0�0���)�)�(�3��������H�-r)c��[R"5Rn[R"U5nUR	URU5 gr)r	rt�_idr6r"r�s   r&�test_init_interpreter_id�/InterpreterObjectTests.test_init_interpreter_id
s:���+�+�-�1�1���)�)�(�3��������X�.r)c��[R"5Rn[U5[	U5[5SS4HZnUR
[U55 UR[5 [R"U5 SSS5 SSS5 M\ g!,(df   N=f!,(df   M=f�N�)r	rtro�str�float�objectr��reprr9�	TypeErrorr6)r#�actualidr�s   r&�test_init_unsupported�,InterpreterObjectTests.test_init_unsupporteds����+�+�-�0�0����M��(�O��H���
�H����d�8�n�-��&�&�y�1� �,�,�X�6�2�.�-�
�2�1��.�-�s$�B1�4B �B1� 
B.�*B1�1
C	c��[R"5n[R"UR5nUR	X!5 gr)r	rnr6roru�r#rRr<s   r&r}�&InterpreterObjectTests.test_idempotents0���$�$�&���)�)�$�'�'�2���
�
�f�#r)c��UR[5 [R"S5 SSS5 g!,(df   g=f�Ni@B)r9rr	r6�r#s r&�test_init_does_not_exist�/InterpreterObjectTests.test_init_does_not_exist$s+��
�
�
�7�
8��$�$�Y�/�9�
8�
8��	�6�
Ac��UR[5 [R"S5 SSS5 g!,(df   g=f)N���)r9�
ValueErrorr	r6r�s r&�test_init_bad_id�'InterpreterObjectTests.test_init_bad_id(s*��
�
�
�z�
*��$�$�R�(�+�
*�
*�r�c�B�[R"5n[R"5n[R"5nUR	UR
[5 UR	UR
[5 UR	UR
[5 gr)r	rnrtr4r5rorQ)r#rRrwr<s    r&�test_id_type�#InterpreterObjectTests.test_id_type,sh���$�$�&���*�*�,���$�$�&�����d�g�g�s�+����g�j�j�#�.����f�i�i��-r)c��[R"5nUR[5 SUlSSS5 g!,(df   g=fr�)r	r4r9�AttributeErrorror;s  r&�test_id_readonly�'InterpreterObjectTests.test_id_readonly4s1���$�$�&��
�
�
�~�
.�!�F�I�/�
.�
.�s	�<�
A
c���[R"5n[R"5nURS5 UR	UR
[5 SSS5 URS5 UR	UR
[5 SSS5 URS5 URS[RS35n[U5nUR	U[5 SSS5 URS5 S[[[[4HKnUR[5 XRlSSS5 UR[5 XQlSSS5 MM SSS5 g!,(df   GN(=f!,(df   N�=f!,(df   N�=f!,(df   Ns=f!,(df   M�=f!,(df   g=f)NrR�from _interpreters�
from C-APIz
                import z� as interpreters
                interp = interpreters.get_current()
                print(repr(interp.whence))
                �readonly)r	rnr4r�r"r�r�r�r�r+r�r��WHENCE_STR_UNKNOWNr9r�)r#rRr<r�r��values      r&�test_whence�"InterpreterObjectTests.test_whence9s`���$�$�&���$�$�&��
�\�\�&�
!����T�[�[�*<�=�"��\�\�.�
/����V�]�]�,=�>�0��\�\�,�
'��*�*�0�$�-�-�.�/�,��D�
�$�Z�F����V�_�5�(��\�\�*�
%��"�"�!�����&�&�~�6�$)�M�7��&�&�~�6�"'�K�7�6��&�
%�"�
!��0�
/��(�
'��"7�6��6�6��&�
%�s`�!E>�6!F�0AF!�0G�>F2�G�"G�)G�>
F
�
F�!
F/�2
G�<G�
G�
G�
G#c��[R"5n[UR5n[U5nUR	X25 gr)r	r4�hashror")r#r<r�r�s    r&�
test_hashable�$InterpreterObjectTests.test_hashableYs4���$�$�&����	�	�?���f�������*r)c��[R"5n[R"5nURX5 URX5 gr)r	r4r"r�)r#rerTs   r&�
test_equality�$InterpreterObjectTests.test_equality_s:���%�%�'���%�%�'������*����G�-r)c��[R"5n[R"U5n[R"U5nURX15 gr)r	r4�pickle�dumps�loadsr")r#r<�data�	unpickleds    r&�test_pickle�"InterpreterObjectTests.test_picklees:���$�$�&���|�|�F�#���L�L��&�	�����+r)r*N)r+r,r-r.r�r�r�r}r�r�r�r�r�r�r�rr/r*r)r&r�r�s?��.�
/�
7�$�
0�)�.�"�
(�@+�.�,r)r�c�h�\rSrSrSr\R"S5S5rSrSr	Sr
SrS	rS
r
g)�TestInterpreterIsRunningilc�l�[R"5nURUR55 gr)r	rn�
assertTrue�
is_runningrps  r&r��"TestInterpreterIsRunning.test_mainns#���$�$�&��������)�*r)�Fails on FreeBSDc�2�[R"5nURUR55 [	U5 URUR55 SSS5 URUR55 g!,(df   N.=fr)r	r4�assertFalser
rrr;s  r&r��,TestInterpreterIsRunning.test_subinterpreterssi���$�$�&������*�*�,�-�
�f�
��O�O�F�-�-�/�0������*�*�,�-��
�s� B�
Bc��UR5up[R"5nURSUS35 UR	UR55 UR
[R"US5S5 g)Nz4if True:
            import os
            os.write(z, b'x')
            r�x)	�piper	r4�execrr
r"�os�read)r#�r�wr<s    r&�
test_finished�&TestInterpreterIsRunning.test_finished|sp���y�y�{����$�$�&�������S�
��	�	
����*�*�,�-��������A���-r)c��[R"5n[U[SURS355nURUR
5S5 g)NzJ
            import _interpreters
            if _interpreters.is_running(zZ):
                print(True)
            else:
                print(False)
            �True)r	r4rrror"�strip)r#r<rSs   r&�test_from_subinterpreter�1TestInterpreterIsRunning.test_from_subinterpreter�sS���$�$�&���&�&�.)�)/����4
�*�#���	
�������f�-r)c���[R"5nUR5 UR[5 UR5 SSS5 g!,(df   g=fr)r	r4r]r9rr
r;s  r&�test_already_destroyed�/TestInterpreterIsRunning.test_already_destroyed�s@���$�$�&������
�
�
�7�
8�����9�
8�
8���A�
A#c��UR5upUR5up4SnSn[R"5nURSUSU<SUSU<S3	5 UR	UR55 [R"XE5 URS5 UR[R"US	5U5 g)
N�D�F�qif True:
            import os
            import threading

            def task():
                v = os.read(�!, 1)
                assert v == �
                os.write(�, �R)
            t = threading.Thread(target=task)
            t.start()
            �t.join()r)
rr	r4rrr
r�writer"r)r#�r_interp�w_interp�r_thread�w_thread�DONE�FINISHEDr<s        r&�!test_with_only_background_threads�:TestInterpreterIsRunning.test_with_only_background_threads�s���!�Y�Y�[���!�Y�Y�[��������$�$�&������
&�J�'�!�H�%�"��2�h�\�2
�
�
	�	
����*�*�,�-�
���� ����J���������1�-�x�8r)c�^�[S[RS35nU4SjnTRS5 TR	5nTRX1SS9nSSS5 U"W5nTR
U5 SSS5 TRS5 TRU5nU"U5nTRU5 SSS5 TRS5 TR5upcUR5nTRUSS9 UR5nSSS5 UR5n	SSS5 TRW5 TR
W5 TRW	5 SSS5 TRS	5 TR5upcUR5nTRUS
S9 UR5nSSS5 UR5n	SSS5 TRW5 TRW5 TRW	5 SSS5 TRS5 TR5upjUR5nSSS5 TRW5 SSS5 g!,(df   GN-=f!,(df   GN=f!,(df   GN�=f!,(df   GN�=f!,(df   GN�=f!,(df   GNq=f!,(df   GN%=f!,(df   GN=f!,(df   N�=f!,(df   N�=f!,(df   g=f)Nr�zt as interpreters
            interp = interpreters.get_current()
            print(interp.is_running())
            c�>�TRUS5 [U5$![a [[U55ef=fr�)r�r��	Exceptionr�)r�r#s �r&�
parse_results�FTestInterpreterIsRunning.test_created_with_capi.<locals>.parse_results�s@�������b�)�
,��D�z�!���
,���T�
�+�+�
,�s�
 �?�running __main__ (from self)T�rR�%running, but not __main__ (from self)�running __main__ (from other)�&running, but not __main__ (from other)F�not running (from other))rr	r+r��interpreter_from_capi�
run_from_capirr�r�interpreter_obj_from_capir
�running_from_capi)r#�scriptr;r�r��runningr<r^�during�afterr`s`          r&r��/TestInterpreterIsRunning.test_created_with_capi�s������ �)�)�*�+
����
	,��\�\�8�
9��+�+�-���)�)�(��)�F��.�#�D�)�G��O�O�G�$�	:��\�\�A�
B��*�*�6�2�D�#�D�)�G����W�%�C�
�\�\�9�
:��/�/�1�5G�f��*�*�,���+�+�H�4�+�@�#�.�.�0�F�A��)�)�+��	2�

���V�$��O�O�F�#����U�#�;��\�\�B�
C��/�/�1�5G�f��*�*�,���+�+�H�5�+�A�#�.�.�0�F�B��)�)�+��	2�

���V�$����V�$����U�#�D��\�\�4�
5��/�/�1�[�f� �+�+�-��2����W�%�6�
5�=.�-��:�
9��C�
B��A�@��2�1��;�
:��B�A��2�1��D�
C��2�1��6�
5�s��J�I>�!J�+J"�K�'#K�
J4�K�3;K�L�#K<�;K*�K<�$;L�8L0�	L�L0�>
J
	�J�
J�"
J1�4
K�>K�
K	�K�
K'�*
K9�4K<�<
L	�L�
L�
L-	�)L0�0
L>r*N)r+r,r-r.r��unittest�skipr�rr r#r6r�r/r*r)r&r
r
ls>��+�
�]�]�%�&�.�'�.�.�	.� �9�2/&r)r
c�z�\rSrSrSrSrSrSrSrSr	Sr
\R"S	5S
5r
SrSrS
rg)�TestInterpreterClosei�c��[R"5n[R"5n[R"5n[R"5nUR[	[R
"55XX415 UR
5 UR[	[R
"55XU15 gr)r	rnr4r"rZr8r])r#rRrerTrfs     r&�
test_basic�TestInterpreterClose.test_basic�s����$�$�&���%�%�'���%�%�'���%�%�'������\�2�2�4�5���:�	<��
�
������\�2�2�4�5���1�	3r)c��[[R"55n[5n[S5H)n[R"5nURU5 M+ UR
[[R"55X-5 UHnUR5 M UR
[[R"55U5 grX)rZr	r8r[r4�addr"r])r#r^rar`r<s     r&�test_all�TestInterpreterClose.test_all�s����\�*�*�,�-���%���q��A�!�(�(�*�F��K�K����	
����\�2�2�4�5�v�7G�H��F��L�L�N������\�2�2�4�5�v�>r)c�*^^�[R"5umTR[5 TR	5 SSS5 UU4Sjn[
R"US9nUR5 UR5 g!,(df   NJ=f)Nc�>�TR[5 TR5 SSS5 g!,(df   g=fr)r9rr])rRr#s��r&rD�)TestInterpreterClose.test_main.<locals>.f�s'����"�"�#3�4��
�
��5�4�4�s�1�
?rF)	r	r8r9rr]rHrJrKrL)r#rDrMrRs`  @r&r��TestInterpreterClose.test_main�sb����%�%�'���
�
�
�/�
0��J�J�L�1�	�
���A�&��	���	�	����1�
0�s�B�
Bc���[R"5nUR5 UR[5 UR5 SSS5 g!,(df   g=fr)r	r4r]r9rr;s  r&r#�+TestInterpreterClose.test_already_destroyeds=���$�$�&������
�
�
�7�
8��L�L�N�9�
8�
8�r%c�@�[R"5un[R"5n[U[	SUR
S355nUR
UR5S5 UR
[[R"55X15 g)Nza
            from test.support import interpreters
            interp = interpreters.Interpreter(z�)
            try:
                interp.close()
            except interpreters.InterpreterError:
                print('failed')
            �failed)	r	r8r4rrror"rrZ)r#rRr<rSs    r&�test_from_current�&TestInterpreterClose.test_from_current
s����%�%�'����$�$�&���&�&�./�/5�y�y�k�:
�*�#���	
�������h�/�����\�2�2�4�5��~�Fr)c��[R"5un[R"5n[R"5nUR[	[R"55XU15 UR[
SURS355 UR[	[R"55X15 g)Nzb
            from test.support import interpreters
            interp2 = interpreters.Interpreter(zr)
            interp2.close()
            interp3 = interpreters.create()
            interp3.close()
            )r	r8r4r"rZrrro)r#rRrerTs    r&�test_from_sibling�&TestInterpreterClose.test_from_siblings����%�%�'����%�%�'���%�%�'������\�2�2�4�5���1�	3����V�!0�07�
�
�|�<
���	�	
����\�2�2�4�5���Gr)c�^�[R"5mU4Sjn[R"US9nUR	5 UR5 g)Nc�&>�TR5 gr)r])r<s�r&rD�6TestInterpreterClose.test_from_other_thread.<locals>.f,s����L�L�Nr)rF)r	r4rHrJrKrL)r#rDrMr<s   @r&�test_from_other_thread�+TestInterpreterClose.test_from_other_thread*s:����$�$�&��	�
���A�&��	���	�	���r)rc�b�[R"5un[R"5n[U5 UR	[
5 UR
5 SSS5 URUR55 SSS5 g!,(df   N6=f!,(df   g=fr)	r	r8r4rr9rr]rr
r�s   r&�test_still_running�'TestInterpreterClose.test_still_running4sr���%�%�'����$�$�&��
�f�
��"�"�#3�4�����5��O�O�F�-�-�/�0��
�4�4���
�s#�B �B�'B �
B	�B � 
B.c��UR5upUR5up4Sn[R"5nURSUSU<S35 UR	5 UR[R"US5U5 g)Nr(a�if True:
            import os
            import threading
            import time

            done = False

            def notify_fini():
                global done
                done = True
                t.join()
            threading._register_atexit(notify_fini)

            def task():
                while not done:
                    time.sleep(0.1)
                os.write(r,r-r)rr	r4rr]r"rr)r#r0r1r2r3r5r<s       r&�test_subthreads_still_running�2TestInterpreterClose.test_subthreads_still_running=s��!�Y�Y�[���!�Y�Y�[������$�$�&������ #��2�h�\�2
�!�	�(	�����������1�-�x�8r)c	�P�[S[RS35nURS5 UR	5nUR[S5 URX!SS9 SSS5 SSS5 SSS5 URS5 UR[S5 URU5 SSS5 SSS5 URS5 UR5up2URUSS9 UR[S	5 UR5 SSS5 URURU55 SSS5 SSS5 SSS5 URS
5 UR5up2URUSS9 UR[S	5 UR5 SSS5 URURU55 SSS5 SSS5 SSS5 URS5 UR5up2UR[S	5 UR5 SSS5 URURU55 SSS5 SSS5 g!,(df   GN(=f!,(df   GN2=f!,(df   GN<=f!,(df   GN=f!,(df   GN=f!,(df   GN�=f!,(df   GN�=f!,(df   GN�=f!,(df   GN�=f!,(df   GNn=f!,(df   GNX=f!,(df   GNb=f!,(df   GNl=f!,(df   GN*=f!,(df   GN=f!,(df   g=f)
Nr�zh as interpreters
            interp = interpreters.get_current()
            interp.close()
            r=zInterpreterError.*unrecognizedTr>r?r@�unrecognizedrAFrB)rr	r+r�rC�assertRaisesRegexr
rDr�rErFrr]r�
interp_exists)r#rGr�r<s    r&r��+TestInterpreterClose.test_created_with_capi\s����� �)�)�*�+
�����\�\�8�
9��+�+�-���+�+�O�,L�N��&�&�x�d�&�C�N�.�:��\�\�A�
B��'�'��(H�J��'�'��/�J�C�
�\�\�9�
:��/�/�1�5G�f��+�+�H�4�+�@��/�/�0@�.�Q�����R��O�O��*�*�8�4�6�	A�2�;��\�\�B�
C��/�/�1�5G�f��+�+�H�5�+�A��/�/�0@�.�Q�����R��O�O��*�*�8�4�6�	B�2�D��\�\�4�
5��/�/�1�5G�f��+�+�,<�n�M��L�L�N�N�����&�&�x�0�2�2�6�
5�?N�N��.�-��:�
9��J�J��C�
B��R�Q��A�@��2�1��;�
:�� R�Q��B�A��2�1��D�
C��N�M��2�1��6�
5�sC�J-�J�J	�(J�0J-�K�(J?�:K�L�,L�?K5�K#	�'(K5�L�L�8M!�	M�L=�3L+	�(L=�,M�4M!�N�&N�?M3�(N�8N�	
J�J�
J*	�%J-�-
J<�?
K	�	K�
K �#
K2
�-K5�5
L�?L�
L	�L�
L(�+
L:
�5L=�=
M�M�
M	�M!�!
M0�3
N�=N�
N	�N�
N%r*N)r+r,r-r.rQrUr�r#r_rbrgrLrMrjrmr�r/r*r)r&rOrO�sO��	3�	?���G�
H���]�]�%�&�1�'�1�9�>-2r)rOc�N�\rSrSrSrSrSrSrSrSr	Sr
\S	5rS
r
g)�TestInterpreterPrepareMaini�c��[R"5nUR[5 UR	5 SSS5 g!,(df   g=fr)r	r4r9r��prepare_mainr;s  r&�
test_empty�%TestInterpreterPrepareMain.test_empty�s6���$�$�&��
�
�
�z�
*����!�+�
*�
*�s�A�
Ac���SSS.n[R"5nURU5 [U[	S55nURUR
5S5 g�N�*�ham��spam�eggs�+
            print(spam, eggs)
            �42 ham�r	r4rwrrr"r�r#�valuesr<rSs    r&�	test_dict�$TestInterpreterPrepareMain.test_dict�sX���e�,���$�$�&�����F�#��&�&�*�#���	
�������h�/r)c��SSS.n[UR55n[R"5nUR	U5 [U[
S55nURUR5S5 gr{)	�tuple�itemsr	r4rwrrr"rr�s    r&�
test_tuple�%TestInterpreterPrepareMain.test_tuple�sh���e�,���v�|�|�~�&���$�$�&�����F�#��&�&�*�#���	
�������h�/r)c���SSS.n[R"5nUR"S0UD6 [U[	S55nURUR
5S5 g)Nr|r}r~r�r�r*r�r�s    r&�test_kwargs�&TestInterpreterPrepareMain.test_kwargs�s[���e�,���$�$�&�����%�f�%��&�&�*�#���	
�������h�/r)c���SSS.n[R"5nURUSS9 [U[	S55nURUR
5S5 g)Nr|r}r~�bar)�fooz0
            print(spam, eggs, foo)
            z
42 ham barr�r�s    r&�test_dict_and_kwargs�/TestInterpreterPrepareMain.test_dict_and_kwargs�s]���e�,���$�$�&�����F���.��&�&�*�#���	
�������l�3r)c��[R"5nUR[5 UR	SSS.S9 SSS5 UR[
5 UR
S5 SSS5 UR[
5 UR
S5 SSS5 g!,(df   Nm=f!,(df   NO=f!,(df   g=f)Nr�r�)rr��rz
print(foo)zprint(spam))r	r4r9r�rwr
rr;s  r&�test_not_shareable�-TestInterpreterPrepareMain.test_not_shareable�s����$�$�&��
�
�
�z�
*����f�U�%C��D�+��
�
��
/��K�K��%�0�
�
�
��
/��K�K�
�&�0�
/�
+�
*��0�
/��
/�
/�s#�B%�B6�
C�%
B3�6
C�
Cc�R�[R"5nURSS05 URU5 UR	[
S5 URSS05 SSS5 SSS5 UR
S5 g!,(df   N(=f!,(df   N1=f)NrTrHF�assert spam is True)r	r4rwrHrqrrr;s  r&�test_running�'TestInterpreterPrepareMain.test_running�s~���$�$�&�����V�T�N�+�
�\�\�&�
!��'�'�(8�)�D��#�#�V�U�O�4�E�"�	���)�*�E�D��"�
!�s#�B�B�%B�
B	�B�
B&c�f�UR5upUR[S5 URSS05 SSS5 UR[S5 URUS5 SSS5 SSS5 g!,(df   NH=f!,(df   N(=f!,(df   g=f)NrprT�	NameErrorr�)rErqrrwr
rD)r#r<r�s   r&r��1TestInterpreterPrepareMain.test_created_with_capi�s���
�
+�
+�
-�1C�&��'�'�(8�.�I��#�#�V�T�N�3�J��'�'���E��"�"�8�-B�C�F�.�
-�I�I��E�E��.�
-�s9�B"�B�B"�B�/B"�
B	�
B"�
B	�B"�"
B0r*N)r+r,r-r.rxr�r�r�r�r�r�rr�r/r*r)r&ruru�s;��"�
0�0�0�4�
'�+��D��Dr)ruc��\rSrSrSrSr\S5rSr\	R"5S5r\R"S5S5rS	rS
rSrSrS
rg)�TestInterpreterExeci�c��[R"5n[S5up#U URU5 SSS5 UR	5nUR5 URnURUS5 g!,(df   NM=f)N�print("it worked!", end="")�
it worked!)r	r4rr�final�raise_if_failed�stdoutr")r#r<rG�resultsrSs     r&�test_success� TestInterpreterExec.test_success�si���$�$�&��*�+H�I���
��K�K�����-�-�/�����!��n�n������l�+�
�W�s�A>�>
Bc��[R"5nUR[5 UR	S5 SSS5 g!,(df   g=f)Nzraise Exception)r	r4r9r
rr;s  r&�test_failure� TestInterpreterExec.test_failure�s7���$�$�&��
�
�
��
/��K�K�)�*�0�
/�
/���A�
Ac�d�UR5nURSUSS9nURSUSS9nURU5upESUlSUR55unUR
U[SUSUR5S	US
USUS355 UR
US
5 g)Nrz�
            def ham():
                raise RuntimeError('uh-oh!')

            def eggs():
                ham()
            )r�z	script.pyz�
            from test.support import interpreters

            def script():
                import spam
                spam.eggs()

            interp = interpreters.create()
            interp.exec(script)
            c3�6# �UHnSU;dMUv� M g7f)z execNr*)r��ls  r&r��GTestInterpreterExec.test_display_preserved_exception.<locals>.<genexpr>�s���J�&9��W��\�1�1�&9�s�
�	zC            Traceback (most recent call last):
              File "zm", line 9, in <module>
                interp.exec(script)
                ~~~~~~~~~~~^^^^^^^^
              z�
                raise ExecutionFailed(excinfo)
            test.support.interpreters.ExecutionFailed: RuntimeError: uh-oh!

            Uncaught in the interpreter:

            Traceback (most recent call last):
              File "za", line 6, in script
                spam.eggs()
                ~~~~~~~~~^^
              File "zS", line 6, in eggs
                ham()
                ~~~^^
              File "zl", line 3, in ham
                raise RuntimeError('uh-oh!')
            RuntimeError: uh-oh!
            r�)	�temp_dir�make_module�make_script�assert_python_failure�maxDiffr�r"rr)r#�tempdir�modfile�
scriptfiler��stderr�interpmod_lines       r&� test_display_preserved_exception�4TestInterpreterExec.test_display_preserved_exception�s����-�-�/���"�"�6�7�:�"����%�%�k�7�	B�%�	�
��3�3�J�?������J�f�&7�&7�&9�J��������-��L�!��#�#�%�&�'� �L�!��I���I�
�%)�"�	�,	
�����$r)c�x^^�[R"5m[S5umnU UU4Sjn[R"US9nUR5 UR
5 SSS5 UR5nUR5 URnURUS5 g!,(df   NM=f)Nr�c�(>�TRT5 gr)r)r<rGs��r&rD�-TestInterpreterExec.test_in_thread.<locals>.fs������F�#r)rFr�)r	r4rrHrJrKrLr�r�r�r")r#r�rDrMrSr<rGs     @@r&rN�"TestInterpreterExec.test_in_threads�����$�$�&��*�+H�I����
�
$�� � ��*�A�
�G�G�I�
�F�F�H�
��-�-�/�����!��n�n������l�+��W�s�<B+�+
B9c��[R"5nSSKnURSSS9nUR	S5 UR5 Sn[
SURSUS	35nURU5 URS5 UR5nURXd5 SSS5 g!,(df   g=f)
Nrzw+zutf-8)�encodingr�zspam spam spam spam spamz�
                import os
                try:
                    os.fork()
                except RuntimeError:
                    with open('zE', 'w', encoding='utf-8') as out:
                        out.write('z')
                )r	r4�tempfile�NamedTemporaryFiler/�flushr�namer�seekrr")r#r<r��filer�rG�contents       r&�	test_fork�TestInterpreterExec.test_fork(s����$�$�&���
�
(�
(���
(�
@�D��J�J�r�N��J�J�L�1�H��! �
!%�	�	�{�+$�$,�:�.�
��F�
�K�K����I�I�a�L��i�i�k�G����W�/�#A�
@�
@�s�BB6�6
Crc��[R"5n[U5 UR[5 URS5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)Nz
print("spam"))r	r4rr9�RuntimeErrorrr;s  r&�test_already_running�(TestInterpreterExec.test_already_running@sO���$�$�&��
�f�
��"�"�<�0����O�,�1��
�0�0���
�s"�A+�A�	A+�
A(	�$A+�+
A9c��[R"5nUR[5 UR	S5 SSS5 g!,(df   g=f)N�
�r	r4r9r�rr;s  r&�test_bad_script�#TestInterpreterExec.test_bad_scriptGs5���$�$�&��
�
�
�y�
)��K�K��O�*�
)�
)�r�c��[R"5nUR[5 UR	S5 SSS5 g!,(df   g=f)Ns
print("spam")r�r;s  r&�test_bytes_for_script�)TestInterpreterExec.test_bytes_for_scriptLs7���$�$�&��
�
�
�y�
)��K�K�(�)�*�
)�
)�r�c�:�UR5upUR5up4SnSnSn[R"5nURSUSU<SUSU<SUSU<S	3
5 URS
USU<S	35 [R
"XF5 URS5 UR
[R"US5U5 UR
[R"US5U5 UR
[R"US5U5 g)
N�Rr'r(r)r*r+r,z[)
            t = threading.Thread(target=task)
            t.start()
            os.write(z)
            zif True:
            os.write(r.r)rr	r4rrr/r"r)	r#r0r1r2r3�RANr4r5r<s	         r&�*test_with_background_threads_still_running�>TestInterpreterExec.test_with_background_threads_still_runningQs��!�Y�Y�[���!�Y�Y�[����������$�$�&������
&�J�'�!�H�%�"��2�h�\�2��Z�r�#��)
��	�	�����Z�r�#��)
��	�	���� ����J���������1�-�s�3��������1�-�s�3��������1�-�x�8r)c���UR5upUR[S5 URS5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)Nrp�raise Exception("it worked!"))rErqrr)r#r<r`s   r&r��*TestInterpreterExec.test_created_with_capipsN��
�
+�
+�
-��&��'�'�(8�.�I����;�<�J�.�
-�I�I��.�
-�s!�A�A
�A�
A	�A�
A,)r�N)r+r,r-r.r�r�r
r�rNr�
requires_forkr�rLrMr�r�r�r�r�r/r*r)r&r�r��su��	,�+�
�.%��.%�`,� 
����0��0�.�]�]�%�&�-�'�-��
*�
9�>=r)r�c��grr*r*r)r&�call_func_noopr�ys��r)c��g)N)rNr*r*r)r&�call_func_return_shareabler�}s��r)c�
�/SQ$)N�r�rYr*r*r)r&�call_func_return_not_shareabler��s���r)c��[S5e)N�spam!)r:r*r)r&�call_func_failurer��s
��
�G�
�r)c��U$rr*�r�s r&�call_func_identr��s���Lr)c�^�U4SjnU$)Nc�>�T$rr*r�s�r&�call_func_closure�0get_call_func_closure.<locals>.call_func_closure�s����r)r*)r�r�s` r&�get_call_func_closurer��s�����r)c�L�\rSrSr\S5r\S5rSrSr	Sr
SrSrg	)
�Spami�c��grr*r*r)r&�noop�	Spam.noop�s��r)c��U"U5$rr*)�clsr�s  r&�from_values�Spam.from_values�s���6�{�r)c��Xlgrr�)r#r�s  r&�__init__�
Spam.__init__�s���
r)c��URX4$rr��r#�args�kwargss   r&�__call__�
Spam.__call__�����
�
�D�)�)r)c�j�[U[5(d[$URUR:H$r)�
isinstancer��NotImplementedr�)r#�others  r&�__eq__�Spam.__eq__�s(���%��&�&�!�!��z�z�U�[�[�(�(r)c��URX4$rr�rs   r&�run�Spam.run�rr)r�N)
r+r,r-r.�staticmethodr��classmethodr�rrr
rr/r*r)r&r�r��s<���
��
������*�)�
*r)r�)�excc���UbUeUS:Xa[S5eUS:XaU(dU(a[X445eU$US:XaXU4$US:Xa$UcU(dU(a
[XU45e[$US:Xa=UcU(dU(a
[XU45e[R"5R
$US:Xa%U(dU(a[X445e[
U5$US:Xa%U(dU(a[X445e[U5$US	:Xa1U(dU(a[X445e"S
S[5nU"U5$[U[5(d[U5e[U5e)Nr�z
missing op�ident�
full-ident�globalsr��closure�custom�custom-innerc��\rSrSrSrg)�call_func_complex.<locals>.Eggsi�r*N)r+r,r-r.r/r*r)r&�Eggsr�s��r)r)r�r:r+r	rtror�r�r
r�r��NotImplementedError)�opr�rrrrs      r&�call_func_complexr!�sE��
���	�	�R�x���&�&�	�w���6��T�N�+�+���	�|�	��V�$�$�	�y�������U�&�1�2�2���	�z�	������U�&�1�2�2��'�'�)�,�,�,�	�y���6��T�N�+�+�$�U�+�+�	�x���6��T�N�+�+��E�{��	�~�	��6��T�N�+�+�	�4�	��E�{��
��C�
 �
 ���m��!�"�%�%r)c� �\rSrSrSrSrSrg)�TestInterpreterCalli�c��[R"5n[[S04[S04[
S04[RS04/5HLunup4nURSUS-35 URU5nURUS5 SSS5 MN [[S04[S04[S5S04[RS04[RS04[S04[
S	5S04[
S
5RS04[S04[S04[S
SS04[S04[S04[SSS04[S04[S04[SS[!S504/5Hrunup4nURSUS-35 UR#[$5 U(dU(a[%XE45eURU5 SSS5 SSS5 Mt UR#[&5 UR[(5 SSS5 g!,(df   GM�=f!,(df   Na=f!,(df   M�=f!,(df   g=f�Nr*zsuccess case #r)�spamspamspam)r|r|r��???�eiu')rr)rr)rrr}r�z!!!)r)r�)rr�z~~~)rr�)rzeggs!)r'rrzinvalid case #)r	r4�	enumerater�r�r�r�r�r��callrur�r�r�rr!r�r9r:r
r�)r#r<r��callablerrr�s       r&�	test_call�TestInterpreterCall.test_call�s2���$�$�&��+4�
�R��$�
'��R�0�
+�R��4�
�Y�Y��B��	6
�,�'�A�'�������q��s�e�4�5��k�k�(�+���
�
�c�4�(�6�5�
,�,5�
�/��4�
"�E�2�.�
"�2�
&��B�/�
�
�
�r�2�&�
�
�
�y�"�-�
�E�B��
�#�Y��B��
�%�[�_�_�b�"�%�
� 1�2�6�
� 6��;�
� =����O�
��b�1�
�
�r�2�
��w��.>�?�
� 3�R�8�
� 9�2�>�
��5�*�V�2D�*E�F�#6
�,�'�A�'���&����q��s�e�4�5��&�&�y�1��v�'���7�7��K�K��)�2�6�5�',�2�
�
��
/��K�K�)�*�0�
/�;6�5��02�1��6�5��0�
/�s<�+$H�
H8� ,H'�H8�5I
�
H$	�'
H5�1H8�8
I	�

Ic���[R"5n[[S04[S04[
S04[RS04/5H~unup4nURSUS-35 UR5nURU5nUR5 SSS5 URWR5 SSS5 M� [[S04[S04[S5S04[R S04[R S04[S04[
S	5S04[
S
5R"S04[$S04[$S04[$S
SS04[$S04[$S04[$SSS04[$S04[$S04[$SS['S504/5H�unup4nURSUS-35 U(dU(aSSS5 M:UR5nURU5nUR5 SSS5 UR)WR5 SSS5 M� UR5nUR[*5nUR5 SSS5 UR)WR5 g!,(df   GN�=f!,(df   GMh=f!,(df   N�=f!,(df   GM;=f!,(df   Ns=fr%)r	r4r)r�r�r�r�r�r��captured_thread_exception�call_in_threadrL�assertIsNone�caughtr�r�r�rr!r��assertIsNotNoner�)r#r<r�r+rr�ctxrMs        r&�test_call_in_thread�'TestInterpreterCall.test_call_in_threads����$�$�&��+4�
�R��$�
'��R�0�
+�R��4�
�Y�Y��B��	6
�,�'�A�'�������q��s�e�4�5��3�3�5���-�-�h�7�A��F�F�H�6��!�!�#�*�*�-�	6�5�
,�,5�
�/��4�
"�E�2�.�
"�2�
&��B�/�
�
�
�r�2�&�
�
�
�y�"�-�
�E�B��
�#�Y��B��
�%�[�_�_�b�"�%�
� 1�2�6�
� 6��;�
� =����O�
��b�1�
�
�r�2�
��w��.>�?�
� 3�R�8�
� 9�2�>�
��5�*�V�2D�*E�F�#6
�,�'�A�'���&����q��s�e�4�5��6��6�5��3�3�5���-�-�h�7�A��F�F�H�6��$�$�S�Z�Z�0�
6�5�',�6�
+�
+�
-���%�%�&7�8�A�
�F�F�H�.�	
���S�Z�Z�(�G6�5��6�5��86�5��6�5��.�
-�sZ�+J#�<"J�#J#�<K�K�&"J6�#K�&K�
J �J#�#
J3	�6
K�K�
K	�
K(r*N)r+r,r-r.r,r5r/r*r)r&r#r#�s��@'+�R-)r)r#c� �\rSrSrSrSrSrg)�TestIsShareableiLc���/SQnUHDnURU5 [R"U5nURU5 SSS5 MF g!,(df   MX=f)N)
N�spamrr�i����TFgY@r*)rr~T)r�r	�is_shareabler)r#�
shareables�obj�	shareables    r&�test_default_shareables�'TestIsShareable.test_default_shareablesNsL��
�
��C����c�"�(�5�5�c�:�	����	�*�#�"��"�"�s�(A�
A	c�b�"SS5n"SS[5n[S[[[5[	5UU"S5U"S5/	nUHKnUR[
U55 UR[R"U55 SSS5 MM g!,(df   M_=f)Nc� �\rSrSrSrSrSrg)�2TestIsShareable.test_not_shareable.<locals>.Cheeseicc��Xlgr�r�)r#r�s  r&r�;TestIsShareable.test_not_shareable.<locals>.Cheese.__init__ds�� �	r)c��UR$rrEr�s r&�__str__�:TestIsShareable.test_not_shareable.<locals>.Cheese.__str__fs���y�y� r)rEN)r+r,r-r.rrHr/r*r)r&�CheeserCcs��
!�
!r)rJc��\rSrSrSrSrg)�4TestIsShareable.test_not_shareable.<locals>.SubBytesiizA subclass of a shareable type.r*N)r+r,r-r.�__doc__r/r*r)r&�SubBytesrLis��1r)rN.�Wensleydaler:)
�bytesr�typer�r:r�r�rr	r;)r#rJrN�not_shareablesr=s     r&r��"TestIsShareable.test_not_shareablebs���	!�	!�	2�u�	2�
����������}�%���!�
��"�C����d�3�i�(�� � � �-�-�c�2�4�)�(�"�(�(�s�,&B�
B.	r*N)r+r,r-r.r?r�r/r*r)r&r8r8Ls��+�(4r)r8c�z�\rSrSrSrSrSrSrSr\	S5r
Sr\	S	5rS
r
SrSr\	S
5rSrg)�
LowLevelTestsi�c
��[RS5nURS5 [R5nURX!5 UR	X!5 SSS5 URS5 [RS5nURX15 UR	X15 [RS5nURXC5 UR	XC5 SSS5 SHYnURSU<S35 [RU5nURX!5 UR	X!5 SSS5 M[ [
R"SSSSSSS	S
9[
R"SSSSS[[5SS
9[
R"SSSSSSSS
9S.n/S
QnUR5GHeup�URSUS35 U	n
[RU5nURX:5 UR	X:5 [RU5nURXC5 UR	XC5 SSS5 URSUS35 U	n
[U	5n[R"U40UD6nURX*5 SSS5 URSUS35 [U	5R5VV
s0sHup�X�(+_M nnn
UHWnU	RU:XaMX�S'[
R"S!0UD6n
[R"U40UD6nURX*5 MY SSS5 [U	5R5H�unnUS:XaUV
s/sHo�U:wdM
U
PM nn
OU(+/nUH�nURUSUSU<SU<S35 UU0n[
R"S!0[[U	540UD6D6n
[R"U40UD6nURX*5 SSS5 M� M� GMh URS5 UR[5 [RSS9 SSS5 SSS5 [US5R5H�unnUS:XaM[U[5(deSSSSS[!54H[nURSUSU<S35 UR["5 [R"S!0UU0D6 SSS5 SSS5 M] M� SSSS[!54HSnURSU<S35 UR["5 [RUS9 SSS5 SSS5 MU S HSnURSU<S35 UR[5 [RUS9 SSS5 SSS5 MU g!,(df   GN�=f!,(df   GN=f!,(df   GM)=f!,(df   GN�=f!,(df   GN�=fs sn
nf!,(df   GN=fs sn
f!,(df   GM�=f!,(df   GN=f!,(df   GN =f!,(df   GN�=f!,(df   GM�=f!,(df   GNI=f!,(df   GM�=f!,(df   GN=f!,(df   GMs=f)"N�isolatedzno arg�default)r�rXz	default (�)FT�own)�use_main_obmalloc�
allow_fork�
allow_exec�
allow_threads�allow_daemon_threads�check_multi_interp_extensions�gil�shared)rW�legacy�empty)rXrbrZzsupported (znoop override (zoverride all (ra�.z (z -> zextra overrider�rdrr�rg�?zbad override (�=zbad override (gil=)ra)r�rr*)r�
new_configr��assert_ns_equal�assertIsNot�types�SimpleNamespace�boolrr��varsra�dictr9r�r
r�r�)r#rX�config�config1�config2�arg�	supported�
gil_supportedr��vanillar��	overrides�kr�ra�field�oldr��valr�s                    r&�test_new_config�LowLevelTests.test_new_config�s��� �*�*�:�6��
�\�\�(�
#�"�-�-�/�F�� � ��1����V�-�$�
�\�\�)�
$�#�.�.�y�9�G�� � ��2����W�.�#�.�.�y�9�G�� � ��2����W�.�%�#�C����	�#���2�3�&�1�1�#�6���$�$�V�5�� � ��1�4�3�#��-�-�"'� � �"�%*�.2����+�+�"&���"�%)�.2�?�.C����*�*�"'� � �#�%*�.3���'
�	�:5�
�&�_�_�.�M�D�����D�6��3�4�"��'�2�2�4�8���$�$�W�7�� � ��3�'�2�2�4�8���$�$�W�6�� � ��2�5������v�Q�7�8�"�� ��M�	�&�1�1�$�D�)�D���$�$�V�6�	9�����t�f�A�6�7�26�w�-�2E�2E�2G�H�2G�$�!�Q��X�2G�	�H�(�C��{�{�c�)� �'*�e�$�$�4�4�A�y�A�H�*�5�5�d�H�i�H�F��(�(��:�
)�8�#�7�m�1�1�3�
��s��E�>�)6�C��A�s�(�a��F�C�F�"%�g�Y�F�!�C������a��w�b���t�C�7�!�&L�M�%*�C�L�	�#(�#8�#8�$�"�4��=�>�I�>�$��"/�!9�!9�$�!L�)�!L���,�,�V�>�
N�M�"�4�9/�T�\�\�*�
+��"�"�:�.��(�(�d�(�3�/�,�
!��7�!3�4�:�:�<�L�E�5���~���e�T�*�*�*�*��R���d�F�H�=���\�\�N�5�'��5�)�1�"E�F��*�*�9�5�%�0�0�B�E�5�>�B�6�G�F�>�	=��A�s�D�&�(�3�E���� 2�5�)�1�=�>��&�&�y�1�!�,�,��,�7�2�?�>�4�"�E���� 2�5�)�1�=�>��&�&�z�2�!�,�,��,�7�3�?�>�"�a$�
#��
%�
$��4�3��J5�4��9�8��I�8�7��D�N�M��/�.��,�
+��6�5��G�F��2�1��?�>��
3�2��?�>�s�7W%�7A/W7�	8X	�A1X�%6X.�8Y�Y
�(A Y�9	Y�Y�;AY	�7Z�
Y0�!Z�Z&�4Z	�
Z&�
[�#Z9�7[�&[0�<[�[0�%
W4�7
X�	
X	�
X+	�.
X=	�Y�
Y	�
Y-
�0
Y?	�:Z�
Z�
Z#
�Z&�&
Z6�9
[�[�
[	�
[-�([0�0
\	c��[R5upURUS5 URU[R5 UR[R	U5[R5 grm)rrnr"�WHENCE_RUNTIMEr�)r#r�r�s   r&�
test_get_main�LowLevelTests.test_get_mains^��(�1�1�3�������1�%������!=�!=�>����� � ��*��(�(�	*r)c�~�URS5 [R5tp[R5up4UR	X15 UR	U[R
5 SSS5 SnSnURS5 [R
5nURXu5nU"U5up4UR	X75 UR	U[R5 SSS5 URS5 Sn	[R5Htp�[X�5n	M U	S-nURU5nU"U5up4UR	X;5 UR	U[R5 SSS5 g!,(df   GN#=f!,(df   N�=f!,(df   g=f)NrRz�
            import _interpreters
            interpid, whence = _interpreters.get_current()
            print((interpid, whence))
            c�"�[U5upX4$r)r�)r�r�r�s   r&�parse_stdout�4LowLevelTests.test_get_current.<locals>.parse_stdouts��#�D�z��H��#�#r)r�r�rr)
r�rrnrtr"r~r4�run_and_capture�
WHENCE_STDLIBr8�maxr��WHENCE_CAPI)r#rRr`r�r�rGr��origr��lastror�s            r&�test_get_current�LowLevelTests.test_get_currentse��
�\�\�&�
!�$�-�-�/�H�D�,�8�8�:��H����X�,����V�]�%A�%A�B�	"�
��
	$��\�\�.�
/� �'�'�)�D��'�'��5�D�+�D�1��H����X�,����V�]�%@�%@�A�0��\�\�,�
'��D�'�0�0�2����4�}��3��a�x�H��*�*�6�2�D�+�D�1��H����X�0����V�]�%>�%>�?�(�
'�-"�
!��0�
/��(�
'�s&�AF�
A!F�A;F.�
F�
F+�.
F<c��[R5tp[R5n[R5n[R5nU[R4U[R4U[R4U[R4/nURS5 [R
5nURXv5 SSS5 URS5 URUS5n[U5nURXv5 SSS5 URS5 US-n	U	S-n
UU	[R4U
[R4/-nUU
[R4/-nURS5n[U5n
[R
5nURX�5 URX�5 SSS5 g!,(df   GN=f!,(df   N�=f!,(df   g=f)NrRzvia interp from _interpretersz{
                import _interpreters
                print(
                    _interpreters.list_all())
                zvia interp from C-APIrz�
                import _interpreters
                _interpreters.create()
                print(
                    _interpreters.list_all())
                )rrnr4r~r�r�r8r"r�r�r�r�)r#r�r`r�r�r�r�r�r�r�r�r��	expected3r��res3s               r&�
test_list_all�LowLevelTests.test_list_all,s���"�+�+�-�
��!�(�(�*�	�!�(�(�*�	�!�(�(�*�	�
�]�1�1�2�
�
�3�3�4�
�
�3�3�4�
�
�3�3�4�	
���\�\�&�
!��(�(�*�C����S�+�"��\�\�9�
:��'�'�	�8��D��t�*�C����S�+�;��\�\�1�
2�!�A�
�I�!�A�
�I� ��M�5�5�6��M�7�7�8�$��I�!��M�7�7�8�$��I��*�*�0��D���:�D� �)�)�+�D����T�-����T�-�'3�
2�"�
!��;�
:��3�
2�s%�)&G�(/G%�0BG6�
G"�%
G3�6
Hc�2�[RS5n[RS5nUnURS5 [R5n[R	U5nURXS5 SSS5 URS5 [RS5n[R	U5nURXS5 SSS5 URS5 UR
[5 [RS5 SSS5 SSS5 UUUUS.R5H^upgURSU<35 [RU5n[R	U5nURXW5 SSS5 M` URS	5 [RS5nS
Ul	[[5UlSUl
[RU5n[R	U5nURXX5 SSS5 URS5 [R5nU?
UR
[5 [RU5 SSS5 SSS5 URS
5 [R5nS
UlUR
[5 [RU5 SSS5 SSS5 URS5 [R5nUR![R#U5[R$5 SSS5 g!,(df   GN�=f!,(df   GN�=f!,(df   GNk=f!,(df   GNu=f!,(df   GMs=f!,(df   GN�=f!,(df   GNN=f!,(df   GNX=f!,(df   GN
=f!,(df   GN=f!,(df   g=f)NrWrc�no argszconfig: Nonezconfig: 'empty'rd)r�rXrWrcz	str arg: rTrbzmissing fieldszextra fieldsr�)rrgr�r4�
get_configrhr9rr�r[rlrr`rar�rr"r�r�)	r#rWrcrXr�rorrr�r�s	         r&�test_create�LowLevelTests.test_create[s��� �+�+�J�7���)�)�(�3����
�\�\�)�
$�$�+�+�-�H�"�-�-�h�7�F�� � ��1�%�
�\�\�.�
)�$�+�+�D�1�H�"�-�-�h�7�F�� � ��1�*�
�\�\�-�
.��"�"�#3�4��$�$�W�-�5�/��� ��	
�
�%�'��M�C����	�#��1�2�(�/�/��4��&�1�1�(�;���$�$�V�6�3�2�
��\�\�(�
#� �+�+�G�4�D�%)�D�"�15�o�1F�D�.��D�H�$�+�+�D�1�H�"�-�-�h�7�F�� � ��.�$��\�\�*�
+� �+�+�-�D����"�"�:�.��$�$�T�*�/�,��\�\�.�
)� �+�+�-�D��D�I��"�"�:�.��$�$�T�*�/�*��\�\�(�
#�$�+�+�-�H�����$�$�X�.��+�+�
-�$�
#�_%�
$��
*�
)��5�4��/�
.��3�2��
$�
#��/�.��,�
+��/�.��*�
)��$�
#�s��;M�<M%�'N	�=M7�N	�<N�+A3N.�7,O�#O�9O�1O6�O$�!O6�AP�
M"�%
M4�7
N	�N	�	
N�
N+	�.
N=�
O	�
O�
O!�$
O3	�.O6�6
P�
Pc��URS5 [R5n[R5VVs/sHtp#UPM nnn[R	U5 [R5VVs/sHtp#UPM nnnURX5 UR
X5 URURU55 SSS5 URS5 [R5tpUR[5 [R	U5 SSS5 SSS5 URS5 [R"5nUR[S5 [R	USS9 SSS5 URURU55 [R	U5 URURU55 SSS5 gs snnfs snnf!,(df   GN5=f!,(df   N�=f!,(df   N�=f!,(df   N�=f!,(df   g=f)Nr�rRr�rpT��restrict)r�rr4r8�destroyr7�assertNotInrrrrnr9rr�create_interpreterrqr)r#r�ror`r^rJs      r&�test_destroy�LowLevelTests.test_destroy�s���
�\�\�.�
/�$�+�+�-�H�'4�'=�'=�'?�@�'?�V�R�b�'?�F�@��!�!�(�+�&3�&<�&<�&>�?�&>�F�B�R�&>�E�?��M�M�(�+����X�-�����"�"�8�,�
.�0��\�\�&�
!�(�1�1�3�L�H��"�"�#3�4��%�%�h�/�5�"��\�\�,�
'�(�;�;�=�H��'�'�(8�.�I��%�%�h��%�>�J��O�O��"�"�8�,�
.��!�!�(�+�����"�"�8�,�
.�(�
'��A��?�	0�
/��5�4��"�
!��J�I��(�
'�sr�,G:�
G.�/G:�:
G4�AG:�%+H�H�&H�,H?�3H.�AH?�.G:�:
H	�
H	�H�
H+�.
H<	�8H?�?
I
c���URS5 [RS5nSUl[(aSUl[R
5tp#[RU5nURXA5 SSS5 URS5 [RS5n[RS5n[RU5nURXA5 SSS5 URS5 [RS5n[RS5n[RU5nURXA5 SSS5 URS5 [RS5nURU5nUR[S5 [RUSS	9 SSS5 [RU5nSSS5 URWU5 SSS5 g!,(df   GN�=f!,(df   GN/=f!,(df   N�=f!,(df   N{=f!,(df   No=f!,(df   g=f)
NrRrcrZFrWr�rpTr�)
r�rrgrarr`rnr�rhr4rCrqr)r#r�r�r`ror�s      r&�test_get_config�LowLevelTests.test_get_config�s����\�\�&�
!�$�/�/��9�H� �H�L���9>��6�(�1�1�3�L�H�"�-�-�h�7�F�� � ��2�"��\�\�*�
%�$�/�/�
�;�H�$�+�+�J�7�H�"�-�-�h�7�F�� � ��2�	&��\�\�(�
#�$�/�/��9�H�$�+�+�H�5�H�"�-�-�h�7�F�� � ��2�	$��\�\�,�
'� �+�+�J�7�D��+�+�D�1�X��+�+�,<�n�M�!�,�,�X��,�E�N�&�1�1�(�;��2�
� � ���.�
(�
'�+"�
!��&�
%��$�
#��N�M��2�1��(�
'�sb�A*G<�AH�?AH �)'I�I�'H1�<I�I�<
H�
H� 
H.�1
H?�;I�
I	�I�
I!c�T�URS5 [R5tp[RU5nUR	U[R
5 SSS5 URS5 [R
5n[RU5nUR	U[R5 SSS5 [RS[RS[RS[RS0R5HeupEURSUSUS	35 URUS
9n[RU5nSSS5 UR	WU5 SSS5 Mg URS5 UR[S5S
S9n[!U5nUR	U[R5 SSS5 URS5 UR[S5SS9n[!U5nUR	U[R5 SSS5 g!,(df   GN�=f!,(df   GN�=f!,(df   GN=f!,(df   GMm=f!,(df   N�=f!,(df   g=f)NrR�stdlibz	not readyrrrzfrom C-API (z: rY)r�zfrom C-API, runningz�
                import _interpreters
                interpid, *_ = _interpreters.get_current()
                print(_interpreters.whence(interpid))
                T)rozfrom legacy C-API, runningF)r�rrnr�r"r~r4r��WHENCE_UNKNOWN�WHENCE_LEGACY_CAPIr��	WHENCE_XIr�rCr�rr�)r#r�r`r�r�r�r�s       r&r��LowLevelTests.test_whence�s*��
�\�\�&�
!�(�1�1�3�L�H�"�)�)�(�3�F����V�]�%A�%A�B�"�
�\�\�(�
#�$�+�+�-�H�"�)�)�(�3�F����V�]�%@�%@�A�$�
�(�(�+��,�,�n��%�%�w��#�#�%>�	
�
�%�'��J�D�����T�F�"�T�F�!�<�=��/�/�t�/�<��*�1�1�(�;�F�=�� � ���.�>�=�
��\�\�/�
0��*�*�6�7�,�
�+��D��$�Z�F����V�]�%>�%>�?�1��\�\�6�
7���*�*�6�7�,�
�+��D��$�Z�F����V�]�%E�%E�F�8�
7�?"�
!��
$�
#��=�<��>�=��
1�
0��8�
7�sW�AH?�6A
I�5I5�I#�I5�AJ�0AJ�?
I�
I �#
I2�-I5�5
J	�
J�
J'c�v^�U4SjnTRS5 [R5nTRU5 [R	U5nTRU5 SSS5 SSS5 TRS5 [R5n[R	U5nTR
U5 SSS5 TRS5 [R5tp$U"US5 SSS5 TRS5 TR5nTRUSS9 U"US5 SSS5 SSS5 SSS5 TRS5 TR5nTRUS	S9 U"US	5 SSS5 SSS5 SSS5 TRS
5 TR5nU"US	5 SSS5 SSS5 g!,(df   GN�=f!,(df   GN�=f!,(df   GNR=f!,(df   GN,=f!,(df   N�=f!,(df   GN=f!,(df   GN=f!,(df   N�=f!,(df   N�=f!,(df   N�=f!,(df   N�=f!,(df   g=f)Nc��>�TR[S5 [RUSS9 SSS5 [RU5nTR	X!5 g!,(df   N5=f)NrpTr�)rqrrr
ru)r�r�rHr#s   �r&�check�,LowLevelTests.test_is_running.<locals>.checksS����'�'�(8�.�I��(�(��D�(�A�J�#�.�.�x�8�G��M�M�'�,�J�I�s�A�
A*zfrom _interpreters (running)z from _interpreters (not running)rRTzfrom C-API (running __main__)r>z&from C-API (running, but not __main__)Fzfrom C-API (not running))
r�rr4rHr
rrrnrCrF)r#r�r�rHr`s`    r&�test_is_running�LowLevelTests.test_is_running�s����	-��\�\�8�
9�$�+�+�-�H����h�'�'�2�2�8�<������(�(�:��\�\�<�
=�$�+�+�-�H�#�.�.�x�8�G����W�%�>�
�\�\�&�
!�(�1�1�3�L�H��(�D�!�"��\�\�9�
:��+�+�-���+�+�H�4�+�@��(�D�)�A�.�;�
�\�\�B�
C��+�+�-���+�+�H�5�+�A��(�E�*�B�.�D�
�\�\�4�
5��+�+�-���h��&�.�6�
5�/(�'��:�
9��>�
=��
"�
!��A�@��.�-��;�
:��B�A��.�-��D�
C��.�-��6�
5�s��&G;�'G)�&G;�;H
�H�I�$I�5
H1�?I�I�(J�9I7�

I&�I7�J�=J*�
J�J*�)
G8	�3G;�;
H
�
H�
H.�1
H?�;I�
I	�I�
I#�&
I4�0I7�7
J	�J�
J�
J'	�#J*�*
J8c��URS5 [R5n[S5up#U [R	X5nSSS5 UR5nUR
5 URnURUS5 SSS5 URS5 [R5n[S5up#U [R	X5nUR5nSSS5 URWS5 URW[R"[R"SSSS	9S
URURS95 SSS5 URS5 UR5nUR[ S
5 [R	USSS9 SSS5 [R	US5nSSS5 UR#WS5 URUR$S5 SSS5 g!,(df   GN�=f!,(df   GN�=f!,(df   GNH=f!,(df   N�=f!,(df   N�=f!,(df   N�=f!,(df   g=f)Nz
run scriptr�r��uncaught exceptionzg
                raise Exception('uh-oh!')
                print("it worked!", end="")
                r�r:�builtins�r+r-r,zuh-oh!�rQ�msg�	formatted�
errdisplayr�rpr�Tr�)r�rr4rrr�r�r�r"rhrjrkr�r�rCrqrrir�)r#r�rGr�rrSs      r&�	test_exec�LowLevelTests.test_exec#s���
�\�\�,�
'�$�+�+�-�H�.�/L�M�O�F��#�(�(��:����m�m�o�G��#�#�%��.�.�C����S�,�/�(��\�\�.�
/�$�+�+�-�H�.�0��O�F��#�(�(��:���n�n�&���
���S�"�%�� � ��e�&;�&;��*�*�(�!,�)��
��-�-��>�>�
'�

�0�,�\�\�,�
'��+�+�-���+�+�,<�n�M�!�&�&�x�1P�04�'�6�N�$�(�(��3R�S��	.�

���S�$�'����S�W�W�l�3�(�
'�;���(�
'�� ���
0�
/��0N�M��.�-��(�
'�s��$H$�H�AH$�+$I�&H6�5A)I�7I;�I*�I�5I*�6I;�
H!	�H$�$
H3�6
I	�I�
I�
I'�#I*�*
I8	�4I;�;
J	c�*�URS5 [R5n[RU[5nURUS5 SSS5 URS5 [R5n[RU[5nURU[R"[R"SSSS9SURURS95 SSS5 g!,(df   N�=f!,(df   g=f)Nr�r�r:r�r�r�r�)r�rr4r*r�rur�r"rjrkr�r�)r#r�rs   r&r,�LowLevelTests.test_callMs���
�\�\�)�
$�$�+�+�-�H��$�$�X�/I�J�C��M�M�#�t�$�%�
�\�\�.�
/�$�+�+�-�H��$�$�X�/@�A�C����S�%�"7�"7��*�*�(�!,�)��
��-�-��>�>�
#�

�0�
/�%�
$��
0�
/�s�AC3�,A>D�3
D�
Dc	��URS5 [R5n[RUS5n[RUS5nUR	UR
RS5 UR	UR
RS5 [RU[SSS95 [RUS5n[RUS5n[RUS5nURUS5 URUS5 UR	UR
RS	5 UR[5 [RUS
S05 SSS5 SSS5 URS5 UR5nUR[S
5 [RUSS0SS9 SSS5 [RUSS05 [R "US5nSSS5 UR	WS5 SSS5 g!,(df   N�=f!,(df   N�=f!,(df   N�=f!,(df   N\=f!,(df   g=f)Nr�zassert spam == 'eggs'zassert ham == 42r�r�r|)rr}zassert spam == 42�AssertionError�rr�rprTr�r�r)r�rr4rr"rQr+�set___main___attrsrnrur9r�rCrqrr�exec_interpreter)r#r��before1�before2�after1�after2�after3�rcs        r&�test_set___main___attrs�%LowLevelTests.test_set___main___attrsbs���
�\�\�.�
/�$�+�+�-�H�#�(�(��3L�M�G�#�(�(��3E�F�G����W�\�\�2�2�K�@����W�\�\�2�2�K�@��,�,�X�t���8�
�#�'�'��2K�L�F�"�'�'��2D�E�F�"�'�'��2E�F�F��M�M�&�$�'��M�M�&�$�'����V�[�[�1�1�3C�D��"�"�:�.��0�0��F�A�;�G�/�%0�,�\�\�,�
'��+�+�-���+�+�,<�n�M�!�4�4�X���~�>B�5�D�N��0�0��F�D�>�J�&�7�7��)���.�
���R��#�(�
'�	/�.��%0�
/��0N�M��.�-��(�
'�s`�EI�H2�7I�I6�)I%�I�7I%�I6�2
I	�<I�
I�
I"�I%�%
I3	�/I6�6
Jr*N)r+r,r-r.r{rr�r�r�rr�r�r�r�r�r,r�r/r*r)r&rUrU�sw��x8�t*�@�B-.�^8-�t�.��.�8/�B�)G��)G�V"'�H(4�T�*�!$��!$r)rUc��\rSrSrSrSrSr\R"S/S/SS/45S5r	\
R"\RS	5S
5r
Srg)
�CaptureExceptionTestsi�c��[R"[RSU5 [RU5sSSS5 $!,(df   g=f)N�format)r�	swap_attr�	traceback�TracebackExceptionr�capture_exception)r#r�	formatters   r&�capture_with_formatter�,CaptureExceptionTests.capture_with_formatter�s5��
�
�
�y�;�;�X�y�
Q� �2�2�3�7�R�
Q�
Q�s�A�
Ac��[R[S55nURURR
S5 URURRS5 URURRS5 URURS5 URURS5 g)N�hellor�r�zValueError: hello)
rr�r�r"rQr+r-r,r�r�)r#�captureds  r&�test_capture_exception�,CaptureExceptionTests.test_capture_exception�s��� �2�2�:�g�3F�G��������/�/��>�������3�3�\�B�������1�1�:�>�������w�/�����+�+�-@�Ar)c���[S5nSnURX5nURURS5 URURS5 URUR
S5 g)Nz	good bye!c�
�SS/$)Nzhello
zworld
r*r�s r&�<lambda>�LCaptureExceptionTests.test_capture_exception_custom_format.<locals>.<lambda>�s	��)�Y�!7r)zValueError: good bye!zhello
world)r�r�r"r�r�r�)r#rr�r�s    r&�$test_capture_exception_custom_format�:CaptureExceptionTests.test_capture_exception_custom_format�sb����%��7�	��.�.�s�>��������{�3�����+�+�-D�E�����,�,�n�=r)�	exc_lineszx-no-nlzy-no-nlc�^�U4SjnUR[5U5nURURS5 URURS5 URUR
SR
T55 g)Nc�>�T$rr*)r#r�s �r&r��MCaptureExceptionTests.test_capture_exception_invalid_format.<locals>.<lambda>�s���r)r�zValueError: )r�r�r"r�r�r�rL)r#r�r�r�s `  r&�%test_capture_exception_invalid_format�;CaptureExceptionTests.test_capture_exception_invalid_format�se���*�	��.�.�z�|�Y�G��������r�*�����+�+�^�<�����,�,�b�g�g�i�.@�Ar)zBprinting subinterpreter unraisable exceptions requires DEBUG buildc��Sn[R"5nUR[5U5nUR	[US55 UR
URR[5 UR
[URR5S5 SSS5 g!,(df   g=f)Nc��gr�r*r�s r&r��SCaptureExceptionTests.test_capture_exception_unraisable_exception.<locals>.<lambda>�s��r)r�zcan only join an iterable)r�catch_unraisable_exceptionr�r�r�hasattrr"�
unraisable�exc_typer�r��	exc_value)r#r��cmr�s    r&�+test_capture_exception_unraisable_exception�ACaptureExceptionTests.test_capture_exception_unraisable_exception�s���
#�	�
�
/�
/�
1�R��2�2�:�<��K�H����W�X�|�<�=����R�]�]�3�3�Y�?����S����!8�!8�9�8�
:�	2�
1�
1�s�BB1�1
B?r*N)r+r,r-r.r�r�r�r�subTestsr�rL�
skipUnless�Py_DEBUGr�r/r*r)r&r�r��so��
8�B�>�
���k�B���i��5K�#L�M�B�N�B�������L��:�	�:r)r��__main__r)=rr�sys�textwraprrrHr�rjrL�testr�test.supportr�
import_modulerrr	r
�test.support.interpretersrrr
�utilsrrrrrrr�r��WHENCE_STR_LEGACY_CAPIr��
WHENCE_STR_XIr�rr1rjr�r�r�r
rOrur�r�r�r�r�r�r�r�r!r#r8rU�TestCaser�r+rRr*r)r&�<module>r�s���	�
�
�#������&��+�+�O�<�
�(�%�,�������#��'����)�
�*��(�(�(�$<S�(�<S�~$�8�$�":2�h�:2�zB*�8�B*�Jc,�X�c,�Ls&�x�s&�lg2�8�g2�TFD��FD�R^=�(�^=�H	������*�*�2$&�D�$&�Nv)�(�v)�r14�h�14�hD$�H�D$�N.:�H�-�-�.:�b�z���M�M�O�r)

Youez - 2016 - github.com/yon3zu
LinuXploit