Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_support.cpython-312.opt-2.pyc

�

'Μg5l��,�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZddlmZddlmZddlmZddlmZej,ZGd�d	ej.�Zed
k(rej4�yy)�N)�support)�
import_helper)�	os_helper)�
script_helper)�
socket_helper)�warnings_helperc��eZdZed��Zed��Zd�Zd�Zd�Zd�Z	e
jd�d��Zd	�Z
d
�Zd�Zd�Zej$�d
��Zej$�d��Zej$�d��Zd�Zd�Zd�Zd�Zej4�d��Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d �Z'd!�Z(d"�Z)d#�Z*d$�Z+d%�Z,d&�Z-Gd'�d(�Z.Gd)�d*�Z/d+�Z0d,�Z1d-�Z2e
jfe4e5d.�xr	e4e5d/�d0�ej4�d1���Z6ejn�dBd3��Z8ejrd4�d5��Z:d6�Z;e
jxejzd7�e
jxej|d8�d9���Z?d:�Z@d;�ZAd<�ZBd=�ZCd>�ZDd?�ZEd@�ZFdA�ZGy2)C�TestSupportc��ttj�}tjdd��|_tjtd��|_y)Nztest.support.warnings_helperz.*used in test_support.*)�likez!.*You should NOT be seeing this.*)�len�warnings�filtersr�ignore_deprecations_from�_warnings_helper_token�__name__�_test_support_token��cls�orig_filter_lens  �./usr/local/lib/python3.12/test/test_support.py�
setUpClasszTestSupport.setUpClasssF���h�.�.�/��%,�%E�%E�*�1K�&
��"�#*�"B�"B��>�#
���c��ttj�}tj|j
|j�y�N)r
rrr�clear_ignored_deprecationsrrrs  r�
tearDownClasszTestSupport.tearDownClass&s2���h�.�.�/���*�*��&�&��#�#�	
rc�>�	tjd��5}tj�tjdt
�|D�cgc]}t
|j���}}ddd�|jt�d|�ycc}w#1swY�+xYw)NT)�recordzYou should NOT be seeing this.r)
r�catch_warningsr�_warn_about_deprecation�warn�DeprecationWarning�str�message�assertEqualr
)�self�warning_objs�w�messagess    r�$test_ignored_deprecations_are_silentz0TestSupport.test_ignored_deprecations_are_silent/sx��G�
�
$�
$�D�
1�\��3�3�5��M�M�:�<N�O�0<�=��1��A�I�I���H�=�2�	
����X���8�4��>�2�
1�s�3B�B�'B�B�Bc��tjd�|jtjtjd�y)N�ftplib�foo)r�
import_module�assertRaises�unittest�SkipTest�r's r�test_import_modulezTestSupport.test_import_module7s1���#�#�H�-����(�+�+�'�5�5�u�	>rc�.�tjd�y)Nr-)r�import_fresh_moduler3s r�test_import_fresh_modulez$TestSupport.test_import_fresh_module<s���)�)�(�3rc���|jtj|d�|j�|j	t
jtj|d�y)N�test_get_attributer.)r&r�
get_attributer9r0r1r2r3s rr9zTestSupport.test_get_attribute?sI������.�.�t�5I�J��/�/�	1����(�+�+�W�-B�-B�D�%�Przfailing buildbotsc�h�|jtj�tj�yr)r&r�get_original_stdout�sys�stdoutr3s r�test_get_original_stdoutz$TestSupport.test_get_original_stdoutDs������4�4�6��
�
�Crc��ddl}|jdtj�t	j
d�|j
dtj�y)Nr�sched)rA�assertInr=�modulesr�unload�assertNotIn)r'rAs  r�test_unloadzTestSupport.test_unloadHs9����
�
�g�s�{�{�+����W�%�����#�+�+�.rc��ttdd��5}	ddd�tjt�|j	t
jjt��tjt�y#1swY�nxYw)Nr)�utf-8��encoding)�open�TESTFNr�unlink�assertFalse�os�path�exists)r'�fs  r�test_unlinkzTestSupport.test_unlinkNsX��
�&�#��
0�A��1����� ����������/�0����� �	1�
0�s�B�Bc���tjdz}tjj	|d�}tj
|�tj
|�tj|�|jtjj|��tjtdd�5tj|�ddd�tj
|�tj
|�tj|tjtjz�tjtdd�5tj|�ddd�|jtjj|��tj
|�tj
|�tj|d�tjtdd�5tj|�ddd�|jtjj|��y#1swY��xxYw#1swY��xYw#1swY�QxYw)N�d�subdir�verboser)rrLrOrP�join�mkdir�rmtreerNrQr�	swap_attr�chmod�stat�S_IRUSR�S_IXUSR)r'�dirpath�
subdirpaths   r�test_rmtreezTestSupport.test_rmtreeUs����"�"�S�(���W�W�\�\�'�8�4�
�
�����
���������!����������0�1�
�
�
�w�	�1�
5����W�%�6�	�����
�����
����$�,�,�t�|�|�3�4�
�
�
�w�	�1�
5����W�%�6����������0�1�
�����
�����
����!��
�
�
�w�	�1�
5����W�%�6����������0�1�6�
5��6�
5��6�
5�s$�<I�I�;I!�I�I�!I*c���tdz}t|dd��5}td|��ddd�tjjdtj�tj�	tt�}|jttj�tjt�|jttj�tjd=t!j"|�t!j$d�y#1swY��xYw#tjd=t!j"|�t!j$d�wxYw)	Nz.pyr)rHrIzfoo = 1��filer�__pycache__)rLrK�printr=rP�insertrO�curdir�	importlib�invalidate_caches�
__import__rBrCr�forgetrErrMrZ)r'�mod_filenamerR�mods    r�test_forgetzTestSupport.test_forgetms�����~��
�,��g�
6�!��)�!�$�7�������2�9�9�%��#�#�%�		,��V�$�C��M�M�&�#�+�+�.�� � ��(����V�S�[�[�1���������\�*����]�+�7�
6����������\�*����]�+�s�D�1A0D)�D&�)=E&c�n�tjtjdf�}|j	�y)Nr)�socket�
create_serverr�HOST�close�r'�ss  r�	test_HOSTzTestSupport.test_HOST~s&��� � �-�"4�"4�a�!8�9��	���	rc��tj�}tjtj|f�}|j�yr)r�find_unused_portrrrsrtru)r'�portrws   r�test_find_unused_portz!TestSupport.test_find_unused_port�s4���-�-�/��� � �-�"4�"4�d�!;�<��	���	rc��tj�}tj|�|j�|j	�yr)rrr�	bind_port�listenrurvs  r�test_bind_portzTestSupport.test_bind_port�s-���M�M�O������"�	���
�	���	rc��	tj�}tjj	|�}	tjj|d�}|j
tjj|��tj|�5}|j||�|jtjj|��ddd�|j
tjj|��tj|�y#1swY�MxYw#tj|�wxYw)N�temp)
�tempfile�mkdtemprOrP�realpathrXrN�isdirr�temp_dirr&�
assertTruerZ)r'�
parent_dirrP�	temp_paths    r�
test_temp_dirzTestSupport.test_temp_dir�s���F��%�%�'�
��W�W�%�%�j�1�
�	)��7�7�<�<�
�F�3�D����R�W�W�]�]�4�0�1��#�#�D�)�Y�� � ��D�1�������
�
�d� 3�4�*�
���R�W�W�]�]�4�0�1����Z�(�*�)��

���Z�(�s%�A#D2�AD&�6D2�&D/�+D2�2E	c��	tj�5}|jtjj|��ddd�|j
tjj��y#1swY�8xYwr)rr�r�rOrPr�rN)r'r�s  r�test_temp_dir__path_nonez$TestSupport.test_temp_dir__path_none�sU��#�
�
�
�
!�Y��O�O�B�G�G�M�M�)�4�5�"���������y�1�2�"�
!�s�/A<�<Bc��	d�}tj�}tjj	|�}	|jtjj
|��|jt||�|jtjj
|��tj|�y#tj|�wxYw)Nc�\�tj|�5}td��#1swYyxYw�Nzshould not get here)rr��	Exception)rPr�s  r�
call_temp_dirzMTestSupport.test_temp_dir__existing_dir__quiet_default.<locals>.call_temp_dir�s'���#�#�D�)�Y�� 5�6�6�*�)���"�+)r�r�rOrPr�r�r�r0�FileExistsError�shutilrZ)r'r�rPs   r�*test_temp_dir__existing_dir__quiet_defaultz6TestSupport.test_temp_dir__existing_dir__quiet_default�s���;�	7����!���w�w����%��	 ��O�O�B�G�G�M�M�$�/�0����o�}�d�C��O�O�B�G�G�M�M�$�/�0��M�M�$���F�M�M�$��s�A3C�Cc���	tj�}tjj	|�}	tj�5}tj|d��5}|j||�ddd�|jD�cgc]}t|j���}}ddd�|jtjj|��tj |�|jt#�d|�|d}|j|j%d|�d��|�y#1swY��xYwcc}w#1swY��xYw#tj |�wxYw)NT��quiet�rz5tests may fail, unable to create temporary directory �: )r�r�rOrPr�r�check_warningsrr�r&rr$r%r�r�r�rZr
�
startswith)r'rP�recorderr�r)rr"s       r�'test_temp_dir__existing_dir__quiet_truez3TestSupport.test_temp_dir__existing_dir__quiet_true�s ��K����!���w�w����%��	 � �/�/�1�X��'�'��D�9�Y��$�$�T�9�5�:�4<�4E�4E�F�4E�q�C��	�	�N�4E��F�2�

�O�O�B�G�G�M�M�$�/�0��M�M�$������X���8�4���{��������+?�?C�h�b�)J�K��	�:�9��F�2�1��
�M�M�$��sG�E�
E�"D;�5E�E�'E�)6E�;E	�E�E�E�E/c�X�	tjdtjd��y)N�-ca
            import os
            from test import support
            from test.support import os_helper
            with os_helper.temp_cwd() as temp_path:
                pid = os.fork()
                if pid != 0:
                    # parent process

                    # wait for the child to terminate
                    support.wait_process(pid, exitcode=0)

                    # Make sure that temp_path is still present. When the child
                    # process leaves the 'temp_cwd'-context, the __exit__()-
                    # method of the context must not remove the temporary
                    # directory.
                    if not os.path.isdir(temp_path):
                        raise AssertionError("Child removed temp_path.")
        )r�assert_python_ok�textwrap�dedentr3s r�test_temp_dir__forked_childz'TestSupport.test_temp_dir__forked_child�s'��M�	�&�&�t�X�_�_�>�.
�	rc��tj�}tj�5}tj|�5}|j||�|jtj�|�ddd�ddd�|jtj�|�y#1swY�6xYw#1swY�:xYwr)rO�getcwdrr��
change_cwdr&)r'�original_cwdr��new_cwds    r�test_change_cwdzTestSupport.test_change_cwd�s����y�y�{��
�
�
�
!�Y��%�%�i�0�G�� � ��)�4�� � �����g�6�1�"�
	
�������l�3�	1�0��"�
!�s"�B7�7B+�6B7�+B4	�0B7�7Cc�<�	tj�}d�}tj�5}tjj|d�}|j
t||�ddd�|jtj�|�y#1swY�.xYw)Nc�\�tj|�5}td��#1swYyxYwr�)rr�r�)rPr�s  r�call_change_cwdzFTestSupport.test_change_cwd__non_existent_dir.<locals>.call_change_cwd�s'���%�%�d�+�w�� 5�6�6�,�+�r��does_not_exist)	rOr�rr�rPrXr0�FileNotFoundErrorr&)r'r�r�r��non_existent_dirs     r�!test_change_cwd__non_existent_dirz-TestSupport.test_change_cwd__non_existent_dir�sw��4��y�y�{��	7��
�
�
!�Z�!�w�w�|�|�J�8H�I�����/��.�
0�"�
	
�������l�3�"�
!�s�8B�Bc���	tj�}tj�5}tjj|d�}t
j�5}tj|d��5}|j||�|jtj�|�ddd�|jD�cgc]}t|j���}}ddd�ddd�|jt�d|�|d}|j|jd�d��|�y#1swY��xYwcc}w#1swY�ixYw#1swY�mxYw)Nr�Tr�r�r�Btests may fail, unable to change the current working directory to r�)rOr�rr�rPrXrr�r�r&rr$r%r
r�r�)	r'r�r��bad_dirr�r�r)rr"s	         r�-test_change_cwd__non_existent_dir__quiet_truez9TestSupport.test_change_cwd__non_existent_dir__quiet_trues��D��y�y�{��
�
�
�
!�Z��g�g�l�l�:�/?�@�G� �/�/�1�X��)�)�'��>�'��$�$�W�l�;��$�$�R�Y�Y�[�'�:�?�5=�4E�4E�F�4E�q�C��	�	�N�4E��F�	2�"�	
����X���8�4���{��������+.�.5�[��)<�=��	�?�>��G�	2�1��"�
!�sG�5E�E
�77D9�.E
�E� E
�"E�9E�>E
�
E	�E�Ec��	tdz}tj�5}tj|d��5	ddd�|j
D�cgc]}t
|j���}}ddd�|jt�d|�|d}|j|jd|�d��|�y#1swY��xYwcc}w#1swY�axYw)N�_does_not_existT)rPr�r�rr�r�)rLrr�rr�rr$r%r&r
r�r�)r'rPr�r)r*�msgs      r�test_change_cwd__chdir_warningz*TestSupport.test_change_cwd__chdir_warnings���>��)�)��
�
+�
+�
-���%�%�4�t�<��=�08�0A�0A�B�0A�1��A�I�I��0A�H�B�.�
	
����X���8�4��q�k��������*-�-1�H�B�(8�9��	�
=�<��B�.�
-�s-�C
�B<�C
�C�+C
�<C	�C
�
Cc��tj�}tjt��5|jtjjtj��t�ddd�|jtjjt��|jtj�|�y#1swY�`xYw�N)�name)
rOr�r�temp_cwdrLr&rP�basenamerNrQ)r'�heres  r�
test_temp_cwdzTestSupport.test_temp_cwd&s���y�y�{��
�
�
�V�
,����R�W�W�-�-�b�i�i�k�:�F�C�-����������/�0��������d�+�-�
,�s�AC�Cc��	tj�}tjd��5}|j	||�|jtjj|��|jtj�|�ddd�|jtj�|�y#1swY�.xYwr�)	rOr�rr��assertNotEqualr�rPr�r&)r'r�r�s   r�test_temp_cwd__name_nonez$TestSupport.test_temp_cwd__name_none.s���.��y�y�{��
�
�
�T�
*�g������6��O�O�B�G�G�M�M�'�2�3����R�Y�Y�[�'�2�+�	
�������l�3�	+�
*�s�A%B>�>Cc�V�|jtjdddd��d�y)N��r�)r�r�r�z{1: 1, 2: 2, 3: 3})r&r�sortdictr3s r�
test_sortdictzTestSupport.test_sortdict7s$������)�)�Q�!�q�/�:�<P�Qrc��tj�}|jt�5}t	j
|d�ddd�|j
jjtj�y#1swY�>xYw)Nsfoo)
r�make_bad_fdr0�OSErrorrO�writer&�	exception�errno�EBADF)r'�fd�cms   r�test_make_bad_fdzTestSupport.test_make_bad_fd:sZ��
�
"�
"�
$��
�
�
�w�
'�2��H�H�R�� �(�������+�+�U�[�[�9�(�
'�s�A>�>Bc��tj|ddd��|jt�5tj|d�ddd�y#1swYyxYw)Nz	def classr��)�lineno�offsetzx=1)r�check_syntax_errorr0�AssertionErrorr3s r�test_check_syntax_errorz#TestSupport.test_check_syntax_error@s@���"�"�4��Q�q�I�
�
�
�~�
.��&�&�t�U�3�/�
.�
.�s�A�Ac��ddl}tjd�5|jd�ddd�y#1swYyxYw)Nr�pprint)rjr�CleanImportr/)r'rjs  r�test_CleanImportzTestSupport.test_CleanImportEs/���
�
&�
&�x�
0�#�I�#�#�H�-�1�
0�
0�s�6�?c�Z�tjdd�5|jdtj�|jdtj�ddd�|jdtj�|jdtj�y#1swY�JxYw)Nr.�bar)r�
DirsOnSysPathrBr=rPrEr3s r�test_DirsOnSysPathzTestSupport.test_DirsOnSysPathJsn��
�
(�
(���
6��M�M�%����*��M�M�%����*�7�	
�������)��������)�	7�
6�s�AB!�!B*c��tj�5}td�ddd�|jj	�d�y#1swY�*xYw)N�hello�hello
)r�captured_stdoutrgr&�getvalue)r'r>s  r�test_captured_stdoutz TestSupport.test_captured_stdoutQs<��
�
$�
$�
&�&��'�N�'�������*�I�6�'�
&�s�A
�
Ac���tj�5}tdtj��ddd�|jj
�d�y#1swY�*xYw)Nr�rdr�)r�captured_stderrrgr=�stderrr&r�)r'r�s  r�test_captured_stderrz TestSupport.test_captured_stderrVsC��
�
$�
$�
&�&��'��
�
�+�'�������*�I�6�'�
&�s�A�A#c���tj�5}|jd�|jd�t	�}ddd�|jd�y#1swY�xYw)Nr�rr�)r�captured_stdinr��seek�inputr&)r'�stdin�captureds   r�test_captured_stdinzTestSupport.test_captured_stdin[sN��
�
#�
#�
%���K�K�	�"��J�J�q�M��w�H�	&�
	
����7�+�&�
%�s�-A�A&c�,�tj�yr)r�
gc_collectr3s r�test_gc_collectzTestSupport.test_gc_collectcs�����rc�T�|jtj�t�yr)�assertIsInstancer�python_is_optimized�boolr3s r�test_python_is_optimizedz$TestSupport.test_python_is_optimizedfs�����g�9�9�;�T�Brc��Gd�d�}|�}d|_tj|dd�5}|j|jd�|j|d�ddd�|j|jd�tj|dd�5}|j|jd�|j|�ddd�|j
t|d��tj|dd�5|`ddd�|j
t|d��y#1swY��xYw#1swY�nxYw#1swY�=xYw)Nc��eZdZy)�'TestSupport.test_swap_attr.<locals>.ObjN)r�
__module__�__qualname__�rr�Objr�js��rrr��xr��y)rrr[r&r�assertIsNonerN�hasattr)r'r�objrrs     r�test_swap_attrzTestSupport.test_swap_attris��	�	��e�����
�
�
�s�C��
+�q����S�U�U�A�&����Q��"�,�	
�������"�
�
�
�s�C��
+�q����S�U�U�A�&����a� �,�	
�����c�*�+�
�
�
�s�C��
+���,������c�*�+�,�
+��,�
+��,�
+�s#�/D)�.D5�E�)D2�5D>�E
c�&�ddi}tj|dd�5}|j|dd�|j|d�ddd�|j|dd�tj|dd�5}|j|dd�|j|�ddd�|j	d|�tj|dd�5|d=ddd�|j	d|�y#1swY��xYw#1swY�]xYw#1swY�4xYw)Nrr�r�r)r�	swap_itemr&rrE)r'�Drrs    r�test_swap_itemzTestSupport.test_swap_itemzs���
��G��
�
�
�q�#�q�
)�Q����Q�s�V�Q�'����Q��"�*�	
����3���#�
�
�
�q�#�q�
)�Q����Q�s�V�Q�'����a� �*�	
����a� �
�
�
�q�#�q�
)��#��*�����a� �*�
)��*�
)��*�
)�s#�(C/�8'C;�D�/C8�;D�Dc��eZdZdZdZdZdZy)�TestSupport.RefClassN)rr�r�
attribute1�
attribute2�_hidden_attribute1�__magic_1__rrr�RefClassr�s���
��
�!���rrc��eZdZdZdZdZdZy)�TestSupport.OtherClassN)rr�rr�
attribute3r�__magic_2__rrr�
OtherClassr�s���
��
����rrc��tj|j|j�}|j	dh|�tj|j|j�}|j	ddh|�y)Nrrr)r�detect_api_mismatchrrr&)r'�
missing_itemss  r�test_detect_api_mismatchz$TestSupport.test_detect_api_mismatch�se���3�3�D�M�M�48�O�O�E�
����,���7��3�3�D�O�O�48�M�M�C�
����,�
�6�
�Frc�$�gd�}tj|j|j|��}|j	t�|�tj|j|j|��}|j	t�|�y)N)rrr�
not_in_either)�ignore)rrrrr&�set)r'rrs   r� test_detect_api_mismatch__ignorez,TestSupport.test_detect_api_mismatch__ignore�si��M���3�3��
�
�t���v�?�
������
�.��3�3�������v�?�
������
�.rc���dh}dh}tj|t||��hd�}hd�}tj|td||��|j	t
tj|t�y)N�tempdir�template)�extra�not_exported>�	makeSuite�
findTestCases�TextTestResult�installHandler�getTestCaseNames>�
load_tests�TestProgram�
BaseTestSuite)zunittest.resultz
unittest.casezunittest.suitezunittest.loaderz
unittest.mainzunittest.runnerzunittest.signalszunittest.async_case)r�check__all__r�r1r0r�)r'r%r&s   r�test_check__all__zTestSupport.test_check__all__�su�����"�|�����T�%�#(�*6�	8�

��F�����T�%�I�$)�*6�	8�	
���.�'�*>�*>��h�Or�waitpid�WNOHANGz need os.waitpid() and os.WNOHANGc���tj�tj�}|dk(rtjd�tj
}	dt_t
j�}tjtj�D]V}tjtjd|�5tj�ddd�tj
s�Vnd|z}|j||j��|jtj
�|t_tj�y#1swY��xYw#|t_wxYw)NrF�orig_stderrz2Warning -- reap_children() reaped child process %s)r�
reap_childrenrO�fork�_exit�environment_altered�io�StringIO�sleeping_retry�
SHORT_TIMEOUTr[�
print_warningrBr�r�)r'�pid�was_alteredr��_r�s      r�test_reap_childrenzTestSupport.test_reap_children�s��
	�����g�g�i���!�8��H�H�Q�K��1�1��	6�*/�G�'��[�[�]�F��+�+�G�,A�,A�B���&�&�w�'<�'<�m�V�T��)�)�+�U�
�.�.��C�G��L�C��M�M�#�v���0�1��O�O�G�7�7�8�*5�G�'�	����!U�T��+6�G�'�s,�A*E�>E�E�,AE�E	�E�
E,Nc���d|�d|�d�}tjg|�d�|�}tjj	�D��cic]\}}|jd�s||��}}}t
j|tjtjd|��}	|�|}|j|	jj�t|��|j|	jd�ycc}}w)	Nzfrom test.support import z
; print(repr(z()))r��PYTHONT)r>r��universal_newlines�envr)r=�
executablerO�environ�itemsr��
subprocess�run�PIPE�DEVNULLr&r>�rstrip�repr�
returncode)
r'�args�func�expected�code�cmd�key�valuerE�procs
          r�
check_optionszTestSupport.check_options�s���*�4�&�
�d�V�4�H���~�~�1��1�d�1�D�1��,.�J�J�,<�,<�,>�0�,>�j�c�5��n�n�X�.��E�z�,>��0��~�~�c�%/�_�_�%/�%7�%7�15�"%�	'��
���H�������+�+�-�t�H�~�>�������!�,��0s�C-�cpuc��gdgdgdgdgdgdgdgdgd	gd
gdgdgd
dggd�d
dgd
dgd
dgd
dgd
dgfD]/}|j|��5|j|d�ddd��1|jgd�dd	g�y#1swY�RxYw)Nz-B�-sz-S�-Ez-vz-b�-Pz-q�-Iz-bbz-vvv�-Wignore�-X�dev)r_r`ra�faulthandler�
importtime�showrefcount�tracemallocz
tracemalloc=3��opts�args_from_interpreter_flags)r^r\r[r]��subTestrX�r'rgs  r� test_args_from_interpreter_flagsz,TestSupport.test_args_from_interpreter_flags�s���

�
�F�
�F�
�F�
�F�
�F�
�F�
�F�
�F�
�F�
�G�
�H�
�L�
�5�M�%�
�>�"�
�<� �
�>�"�
�=�!�
�?�#�3
�D�6���4��(��"�"�4�)F�G�)�(�7
�<	
���3�8� �6�	#�)�(�s�A:�:B	c��gdgdgdgfD]/}|j|��5|j|d�ddd��1y#1swY�<xYw)Nz-Oz-OOz-OOOOrf�!optim_args_from_interpreter_flagsrirks  r�&test_optim_args_from_interpreter_flagsz2TestSupport.test_optim_args_from_interpreter_flagssT��
�
�F�
�G�
�I�
�D����4��(��"�"�4�)L�M�)�(�
�)�(�s	�=�A	zUnstable in EmscriptenzUnavailable on WASIc�.�tj�}tjttj
�}	tj�}tj|�|j||z
d�y#tj|�wxYw�Nr�)r�fd_countrOrK�__file__�O_RDONLYrur&)r'�startr��mores    r�
test_fd_countzTestSupport.test_fd_count)sg���"�"�$��
�W�W�X�r�{�{�
+��	��%�%�'�D��H�H�R�L�������q�)��
�H�H�R�L�s�A=�=Bc�
�tj�}tjtjd|�5tj|�ddd�|j|j
�|�y#1swY�*xYw)Nr4)r9r:rr[r=r&r�)r'r�rRr�s    r�check_print_warningzTestSupport.check_print_warning9sZ�������
�
�
�w�4�4�m�V�
L��!�!�#�&�M�������*�H�5�M�
L�s�A9�9Bc�L�|jdd�|jdd�y)Nr�zWarning -- msg
za
bzWarning -- a
Warning -- b
)ryr3s r�test_print_warningzTestSupport.test_print_warning?s)��� � ��!3�	5�� � ��!?�	Arc���tjstjdk(r |j	tj
�y|j
tj
�y)N�win32)r�
is_emscriptenr=�platformrN�has_strftime_extensionsr�r3s r�test_has_strftime_extensionsz(TestSupport.test_has_strftime_extensionsEs<��� � �C�L�L�G�$;����W�<�<�=��O�O�G�;�;�<rc�Z�tjd�}tjd|�y)Nap
            from test import support
            import sys

            def check(cond):
                if not cond:
                    raise AssertionError("test failed")

            # depth 1
            check(support.get_recursion_depth() == 1)

            # depth 2
            def test_func():
                check(support.get_recursion_depth() == 2)
            test_func()

            def test_recursive(depth, limit):
                if depth >= limit:
                    # cannot call get_recursion_depth() at this depth,
                    # it can raise RecursionError
                    return
                get_depth = support.get_recursion_depth()
                print(f"test_recursive: {depth}/{limit}: "
                      f"get_recursion_depth() says {get_depth}")
                check(get_depth == depth)
                test_recursive(depth + 1, limit)

            # depth up to 25
            with support.infinite_recursion(max_depth=25):
                limit = sys.getrecursionlimit()
                print(f"test with sys.getrecursionlimit()={limit}")
                test_recursive(2, limit)

            # depth up to 500
            with support.infinite_recursion(max_depth=500):
                limit = sys.getrecursionlimit()
                print(f"test with sys.getrecursionlimit()={limit}")
                test_recursive(2, limit)
        r�)r�r�rr�)r'rSs  r�test_get_recursion_depthz$TestSupport.test_get_recursion_depthKs(�����& �&
��N	�&�&�t�T�2rc����fd��dD]Y}tj|�5tj�}�|�	�|dz�|jd�ddd��[tjd�5	�d�|jd�ddd�y#t$rY�NwxYw#1swY��xYw#t$rY�/wxYw#1swYyxYw)Nc�"��|r�|dz
�yyrqr)�depth�recursive_functions �rr�z6TestSupport.test_recursion.<locals>.recursive_functionxs����"�5�1�9�-�r)r���r�zRecursionError was not raisedr�)r�infinite_recursion�get_recursion_available�fail�RecursionError)r'�	max_depth�	availabler�s   @r�test_recursionzTestSupport.test_recursionvs����	.�&�I��+�+�I�6�#�;�;�=�	�#�9�-�
?�&�y�1�}�5��I�I�=�>�7�6�&�$�
'�
'��
*�
;�"�1�%��	�	�9�:�
+�
*��
&�����7�6��("�
��
��+�
*�s^�B-�B�
B-�:C�<B9�C�	B*�'B-�)B*�*B-�-B6	�9	C�C�C�C�Cc�,�tj}d}|dz}|dz}|dz}|j|d�d�|j|d�d|z�|j|d�td|z��|j|d�td	|z��|j|d
�|�dD]C}|j	|��5|jt�5||�ddd�ddd��Ey#1swY�xYw#1swY�\xYw)
Ni�0kr�3kr�z2.4mg333333@�4g��1t)��3z3.5.10k�10x)�limit)r�_parse_memlimitr&�intrjr0�
ValueError)r'�parse�KiB�MiB�GiB�TiBr�s       r�test_parse_memlimitzTestSupport.test_parse_memlimit�s����'�'�����D�j���D�j���D�j������t��a�(�����t��a�#�g�.�����v���C�#�I��7�����t��c�!�c�'�l�3�����t��c�*�0�E����E��*��&�&�z�2��%�L�3�+�*�1�2�2��+�*�s$�D
�"	C>�+D
�>D�D
�
D	c�*�d}d}tj}tj}	tjdkDr�tj
d�|j
tj|�|j
tj|�ddz|z}tj
|�d��|j
tjtj�|j
tj||z�nctj
d�|j
tjtj�|j
tj|�|t_|t_y#|t_|t_wxYw)Nllr�r��d�t)r�
max_memuse�real_max_memuser=�maxsize�set_memlimitr&)r'�_4GiBr��old_max_memuse�old_real_max_memuse�bigs      r�test_set_memlimitzTestSupport.test_set_memlimit�s%������ �+�+��%�5�5��	:��{�{�U�"��$�$�T�*�� � ��!3�!3�U�;�� � ��!8�!8�%�@���f��m���$�$��u�A�Y�/�� � ��!3�!3�S�[�[�A�� � ��!8�!8�#��)�D��$�$�T�*�� � ��!3�!3�S�[�[�A�� � ��!8�!8�%�@�!/�G��&9�G�#��"0�G��&9�G�#�s�D=E:�:Fc��tjd�}|stjd�}tjj	|�}tjj|�s|j
d|���tjj|d�}tjj|�s|j
d|�d��ddh}tj|�}|jtj||�|dhz�tjj|d	�}|jtj|tj|��|dd
hz�tjj|d�}|jtj|tj|��|�y)N�
abs_srcdir�srcdirz,cannot access Python source code directory: �Modulesz landmark is missingz.gitrf�build�Doc�venv�Objects)�	sysconfig�get_config_varrOrP�abspathrQ�skipTestrX�listdirr&r�copy_python_src_ignore)r'�src_dir�landmark�ignored�namesrPs      r�test_copy_python_src_ignorez'TestSupport.test_copy_python_src_ignore�sr���*�*�<�8����.�.�x�8�G��'�'�/�/�'�*���w�w�~�~�g�&��M�M��%�[�*�
+��7�7�<�<���3���w�w�~�~�h�'��M�M��&�\�)=�?�
@��=�)���
�
�7�#������7�7���G� �G�9�,�	.��w�w�|�|�G�U�+������7�7��b�j�j��>N�O� �G�V�#4�4�	6��w�w�|�|�G�Y�/������7�7��b�j�j��>N�O� �	"rr)Hrr�r�classmethodrrr+r4r7r9r1�skipr?rFrSrbrpr�requires_working_socketrxr|r�r�r�r�r��
requires_forkr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrr!r0�
skipUnlessrrOrA�requires_subprocessrX�requires_resourcerlro�skipIfr~�is_wasirwryr{r�r�r�r�r�r�rrrr
r
s����<��<��<��<�5�>�
4�Q�
�X�]�]�&�'�D�(�D�/�!�2�0,�"%�W�$�$�&��'��%�W�$�$�&��'��
%�W�$�$�&��'��
)�3� � �*�W�������44�
4��*
�",�4�R�:�4�
.�
*�7�
7�
,��C�,�"!�����G�	/�P�6�X�����Y�/�J�G�B�	�4J�;�=��W����  ��=�  �D!�W� � �"�
-�#�
-��W���u�%�"#�&�"#�H
N��X�_�_�W�*�*�,D�E��X�_�_�W�_�_�&;�<�*�=�F�*�6�A�=�)3�V;�@!�":�.""rr
�__main__)r�rjr9rOr�rrr]rIr=r�r�r�r1r�testr�test.supportrrrrrrL�TestCaser
r�mainrrr�<module>r�s{����	�	�
�
���
�������&�"�&�&�(�	�	�	��F"�(�#�#�F"�|�z���H�M�M�O�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists