Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.11/distutils/tests/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.11/distutils/tests/__pycache__/test_build_clib.cpython-311.pyc

�

SԚg����dZddlZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
Gd�de
je
jej��Zed	krej��dSdS)
z'Tests for distutils.command.build_clib.�N)�missing_compiler_executable�requires_subprocess)�
build_clib)�DistutilsSetupError)�supportc���eZdZ�fd�Z�fd�Zd�Zd�Zd�Zd�Ze	j
ejdkd��e
��d	�����Z�xZS)
�BuildCLibTestCasec���t�����ttj��|_dS�N)�super�setUp�dict�	sysconfig�_CONFIG_VARS�_backup_CONFIG_VARS��self�	__class__s ��</usr/local/lib/python3.11/distutils/tests/test_build_clib.pyr
zBuildCLibTestCase.setUps-���
���
�
����#'�	�(>�#?�#?�� � � �c����t�����tj���tj�|j��dSr)r�tearDownrr�clear�updaterrs �rrzBuildCLibTestCase.tearDownsN���
����������$�$�&�&�&���%�%�d�&>�?�?�?�?�?rc���|���\}}t|��}|�t|jd��|�t|jddg��|�t|jddg��|�t|jddg��|�t|jdifd	g��difdd
difg}|�|��dS)N�foo�foo1�foo2)�r)�namer)r r)zanother/namerr )�anotherr�ok�good)�create_distr�assertRaisesr�check_library_list)r�pkg_dir�dist�cmd�libss     r�test_check_library_distz)BuildCLibTestCase.test_check_library_dists(���(�(�*�*�
��������	
���-�s�/E�u�M�M�M�	
���-�s�/E�!�6�*�	,�	,�	,�
	
���-�s�/E�&�(8�9�	;�	;�	;�	
���-�s�/E�+�3�5�	6�	6�	6�
	
���-�s�/E�"�B�<�.�0�	1�	1�	1�
���v��f�~�6�7�����t�$�$�$�$�$rc�T�|���\}}t|��}difg|_|�t|j��dddifg|_|�t|j��ddddgifg|_|�|���ddg��dddifg|_|�|���ddg��dddifdddd	gifg|_|�|���gd
���dS)Nr �sourcesr�a�b)r.r/�name2�c�d)r.r/r1r2)r$r�	librariesr%r�get_source_files�assertEqual�rr'r(r)s    r�test_get_source_filesz'BuildCLibTestCase.test_get_source_files:sH���(�(�*�*�
��������!�"����
����-�s�/C�D�D�D� �9�a�.�1�2��
����-�s�/C�D�D�D� �9�s�C�j�"9�:�;��
�����-�-�/�/�#�s��<�<�<� �9�j�"9�:�;��
�����-�-�/�/�#�s��<�<�<� �9�j�"9�:�!�I��S�z�#:�;�=��
�����-�-�/�/�1E�1E�1E�F�F�F�F�Frc�z�|���\}}t|��}Gd�d��}|��|_dddifg}|�t|j|��ddt
��ifg}|�|��ddt��ifg}|�|��dS)Nc��eZdZd�ZeZdS)�<BuildCLibTestCase.test_build_libraries.<locals>.FakeCompilerc��dSr�)�args�kws  r�compilezDBuildCLibTestCase.test_build_libraries.<locals>.FakeCompiler.compileUs���rN)�__name__�
__module__�__qualname__r?�create_static_libr<rr�FakeCompilerr:Ts%������
�
�
� '���rrDr r-�notvalid)r$r�compilerr%r�build_libraries�list�tuple)rr'r(r)rD�libs      r�test_build_librariesz&BuildCLibTestCase.test_build_librariesPs����(�(�*�*�
��������	(�	(�	(�	(�	(�	(�	(�	(�
$�|�~�~�����J�/�0�1�����-�s�/B�C�H�H�H���D�F�F�+�,�-�����C� � � ���E�G�G�,�-�.�����C� � � � � rc��|���\}}t|��}d|_|���|�|jdg��d|_|���|�|jg��d|j_|�t|j��dS)Nzone-dir�WONTWORK)	r$r�include_dirs�finalize_optionsr5�distributionr3r%rr6s    r�test_finalize_optionsz'BuildCLibTestCase.test_finalize_optionses����(�(�*�*�
��������$�������������)�I�;�7�7�7��������������)�2�.�.�.�%/���"����-�s�/C�D�D�D�D�Dr�win32zcan't test on Windowsc�$�|���\}}t|��}tj�|d��}|�|d��dd|gifg|_tj�|d��}tj|��||_||_t��}|�|�
d|z��|���|�dtj
|����dS)Nzfoo.czint main(void) { return 1;}
rr-�buildzThe %r command is not foundzlibfoo.a)r$r�os�path�join�
write_filer3�mkdir�
build_tempr�skipTest�run�assertIn�listdir)rr'r(r)�foo_crZ�ccmds       r�test_runzBuildCLibTestCase.test_runts����(�(�*�*�
������������W�g�.�.������>�?�?�?��)�e�W�!5�6�7��
��W�\�\�'�7�3�3�
�
������#���#���+�,�,�����M�M�7�$�>�?�?�?�	���	�	�	�	
�
�
�j�"�*�Z�"8�"8�9�9�9�9�9r)r@rArBr
rr+r7rKrQ�unittest�skipIf�sys�platformrra�
__classcell__)rs@rr	r	s��������@�@�@�@�@�@�@�@�@�@�
%�%�%�<G�G�G�,!�!�!�*
E�
E�
E��X�_�S�\�W�,�.E�F�F�����:�:���G�F�:�:�:�:�:rr	�__main__)�__doc__rbrUrdr�test.supportrr�distutils.command.build_clibr�distutils.errorsr�distutils.testsr�TempdirManager�LoggingSilencer�TestCaser	r@�mainr<rr�<module>rqs���-�-�����	�	�	�	�
�
�
�
�������������4�3�3�3�3�3�0�0�0�0�0�0�#�#�#�#�#�#�~:�~:�~:�~:�~:��.��/� �)�~:�~:�~:�@�z����H�M�O�O�O�O�O��r

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