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__osx_support.cpython-312.pyc

�

'Μg{6���dZddlZddlZddlZddlZddlZddlmZddlZejejjd�d�Gd�dej��Ze
dk(rej�yy)	z=
Test suite for _osx_support: shared OS X support functions.
�N)�	os_helper�darwinz
requires OS Xc�x�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zy)�Test_OSXSupportc�>�d|_d|_tjj	tj
��|_|jtj��|_
dD],}||jvs�|jj|��.y)N�bogus_program_xxxx)
�CFLAGS�LDFLAGS�CPPFLAGS�
BASECFLAGS�	BLDSHARED�LDSHARED�CC�CXX�	PY_CFLAGS�
PY_LDFLAGS�PY_CPPFLAGS�PY_CORE_CFLAGS�PY_CORE_LDFLAGS)�maxDiff�	prog_name�os�path�abspath�getcwd�
temp_path_dir�enterContextr�EnvironmentVarGuard�env�unset)�self�cvs  �3/usr/local/lib/python3.12/test/test__osx_support.py�setUpzTest_OSXSupport.setUpsq�����-����W�W�_�_�R�Y�Y�[�9����$�$�Y�%B�%B�%D�E���A�B��T�X�X�~������r�"�A�c�>����j��fd��D��y)Nc3�H�K�|]}�|�|k7rd|z�|f���y�w)�_OSX_SUPPORT_INITIAL_N�)�.0�k�config_vars�
expected_varss  ��r#�	<genexpr>zDTest_OSXSupport.add_expected_saved_initial_values.<locals>.<genexpr>!s;�����;�)4�A�"�1�~��q�)9�9�6�q�8��A�� �)4�s�")�update�r!r,r-s ``r#�!add_expected_saved_initial_valuesz1Test_OSXSupport.add_expected_saved_initial_valuess ���	���;�)4�;�	;r%c� �|jdr|jddz|jd<|jdtjj|j�z|jd<tj|j�|jtj|j��|jt
j|j�t|jd�5}|jd�ddd�tj|jtj �|j#|jtj|j��y#1swY�qxYw)N�PATH�:�wz#!/bin/sh
/bin/echo OK
)rrrrrr�unlinkr�assertIsNone�_osx_support�_find_executable�
addCleanup�open�write�chmod�stat�S_IRWXU�assertEqual�r!�fs  r#�test__find_executablez%Test_OSXSupport.test__find_executable%s���8�8�F��#�x�x��/�#�5�D�H�H�V���8�8�F�+�b�g�g�o�o�d�>P�>P�.Q�Q������������(����,�7�7����G�H����	�(�(�$�.�.�9�
�$�.�.�#�
&�!�
�G�G�/�0�'�
���������.�������(�9�9�$�.�.�I�	K�'�
&�s�F�F
c��|jdr|jddz|jd<|jdtjj|j�z|jd<tj|j�|jt
j|j�t|jd�5}|jd�ddd�tj|jtj�|jdtj |j��y#1swY�gxYw)Nr3r4r5z##!/bin/sh
/bin/echo ExpectedOutput
�ExpectedOutput)rrrrrrr6rr:r;r<r=r>r?r@r8�_read_outputrAs  r#�test__read_outputz!Test_OSXSupport.test__read_output2s����8�8�F��#�x�x��/�#�5�D�H�H�V���8�8�F�+�b�g�g�o�o�d�>P�>P�.Q�Q������������(����	�(�(�$�.�.�9�
�$�.�.�#�
&�!�
�G�G�;�<�'�
���������.����)�(�5�5�d�n�n�E�	G�'�
&�s�E�Ec��tjd�}|jtjj|�d�y)N�ccz!cc not found - check xcode-select)r8�_find_build_tool�
assertTruerr�isfile)r!�outs  r#�test__find_build_toolz%Test_OSXSupport.test__find_build_tool>s1���+�+�D�1����������s�+�?�	Ar%c��|jtj�djt	j
���y)Nr)rK�platform�mac_ver�
startswithr8�_get_system_version)r!s r#�test__get_system_versionz(Test_OSXSupport.test__get_system_versionCs7������(�(�*�1�-�8�8�$0�$D�$D�$F�H�	Ir%c��ddi}ddi}d}d}tj|||�|j||�tj|�|j	||�y�Nr�gcc-test -pthreads�clang -pthreads)r8�_save_modified_value�assertNotEqual�_remove_original_valuesr@�r!r,r-r"�newvalues     r#�test__remove_original_valuesz,Test_OSXSupport.test__remove_original_valuesGsj���"�
��	
��
�
���$���)�)�+�r�8�D����M�;�7��,�,�[�9������4r%c��ddi}ddi}|j||�d}d}tj|||�|j||�yrV)r1r8rYr@r\s     r#�test__save_modified_valuez)Test_OSXSupport.test__save_modified_valueUs\���"�
��	
��
�
�	
�.�.�{�M�J�
��$���)�)�+�r�8�D������4r%c��ddi}|j�}d}d}tj|||�|j||�y)NrrW)�copyr8rYr@r\s     r#�#test__save_modified_value_unchangedz3Test_OSXSupport.test__save_modified_value_unchangedbsK���"�
��$�(�(�*�
�
��'���)�)�+�r�8�D������4r%c���ddl}td�|j�djd�ddD��}|j	|dk\tj��y)Nrc3�2K�|]}t|����y�w)N)�int)r*�is  r#r.zBTest_OSXSupport.test__supports_universal_builds.<locals>.<genexpr>ns����C�A�*+�c�!�f�A�s��.�)�
�)rP�tuplerQ�splitr@r8�_supports_universal_builds)r!rP�
mac_ver_tuples   r#�test__supports_universal_buildsz/Test_OSXSupport.test__supports_universal_buildslsc����C�,�H�,�,�.�q�1�7�7��<�Q�q�A�C�C�
�����'�1�(�C�C�E�	Gr%c��d}dddddddd	�}d
dddddd
d	�}|j||�|jdrd|jdznd}tjj	|j
�|z|jd<|D]�\}}t
j|�|jtj|�t|d�5}|jd|z�ddd�tj|tj���|j|tj |��y#1swY�UxYw)N))zgcc-testz i686-apple-darwin11-llvm-gcc-4.2)�clangzclang version 3.1rWz	cc++-test�3-fno-strict-aliasing  -g -O3 -arch ppc -arch i386  �-arch ppc -arch i386   -g�--I. -isysroot /Developer/SDKs/MacOSX10.4u.sdkz(gcc-test -bundle -arch ppc -arch i386 -gzRgcc-test -bundle -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g)rrr	r
rr
rrXzclang++z%clang -bundle -arch ppc -arch i386 -gzOclang -bundle -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -gr3r4�r5z#!/bin/sh
/bin/echo )r1rrrrrrr6r:r;r<r=r>r?r@r8�_find_appropriate_compiler)r!�	compilersr,r-�suffix�c_name�c_outputrBs        r#�test__find_appropriate_compilerz/Test_OSXSupport.test__find_appropriate_compilerss5���	�
#��G�.�C�?�G�	
�� ��G�.�C�<�G�	
�
�	
�.�.�{�M�J�-1�X�X�f�-=�#�����(�(�2���7�7�?�?�4�+=�+=�>��G������ )��F�H����V�$��O�O�I�,�,�f�5��f�c�"�a����/�(�:�;�#��H�H�V�T�\�\�*�!*�	
����(�C�C�$/�1�	2�#�"�s�D7�7E	c��dddddd�}ddd	d
dd�}|j||�|j|tj|��y)Nrsrtru�(gcc-4.0 -bundle  -arch ppc -arch i386 -g�Rgcc-4.0 -bundle  -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g�r	r
rr
r� -fno-strict-aliasing  -g -O3    �    -g�-I.  �gcc-4.0 -bundle    -g�gcc-4.0 -bundle      -g�r1r@r8�_remove_universal_flagsr0s   r#�test__remove_universal_flagsz,Test_OSXSupport.test__remove_universal_flags�sf��G�.�C�?�G�
��5���,�-�
�
�	
�.�.�{�M�J�����(�@�@�$/�1�	2r%c��dddddd�}ddd	d
dd�}|j||�|j|tj|��y)Nrsrtz,-I. -isysroot/Developer/SDKs/MacOSX10.4u.sdkr~zQgcc-4.0 -bundle  -arch ppc -arch i386 -isysroot/Developer/SDKs/MacOSX10.4u.sdk -gr�r�r�r�r�r�r�r0s   r#�&test__remove_universal_flags_alternatez6Test_OSXSupport.test__remove_universal_flags_alternate�si��H�.�B�?�F�
��5���,�-�
�
�	
�.�.�{�M�J�����(�@�@�$/�1�	2r%c�h�ddddddd�}ddd	dd
dd�}|j||�|jdrd
|jdznd}tjj	|j
�|z|jd<d}t
j|�|jtj|�t|d�5}|jd�ddd�tj|tj�|j|tj |��y#1swY�SxYw)Nrrrsrtrur~r�rr	r
rr
rz*-fno-strict-aliasing  -g -O3  -arch i386  z -arch i386   -gzgcc-4.0 -bundle   -arch i386 -gzIgcc-4.0 -bundle   -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -gr3r4rvr5z#!/bin/sh
exit 255)r1rrrrrrr6r:r;r<r=r>r?r@r8�_remove_unsupported_archs)r!r,r-ryrzrBs      r#�test__remove_unsupported_archsz.Test_OSXSupport.test__remove_unsupported_archs�s���G�.�C�?�G�

���>�%�C�6�G�

�
�	
�.�.�{�M�J�-1�X�X�f�-=�#�����(�(�2���7�7�?�?�4�+=�+=�>��G������������ ����	�(�(�&�1�
�&�#�
�!�
�G�G�)�*��
�������&�����(�B�B�$/�1�	2��
�s�D(�(D1c��d|jd<ddddddd	�}dd
dddd
d	�}|j||�|j|tj|��y)Nz-arch x86_64�	ARCHFLAGSrrrsrtrur~zQgcc-4.0 -bundle -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -gr�z--fno-strict-aliasing  -g -O3     -arch x86_64z    -g -arch x86_64z"gcc-4.0 -bundle    -g -arch x86_64zKgcc-4.0 -bundle   -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -arch x86_64)rr1r@r8�_override_all_archsr0s   r#�test__override_all_archsz(Test_OSXSupport.test__override_all_archs�s}�� .�������G�.�C�?�G�

���A�(�C�9�J�

�
�	
�.�.�{�M�J�����(�<�<�$/�1�	2r%c��ddddddd�}dddd	dd
d�}|j||�|j|tj|��y)Nrr�[-fno-strict-aliasing  -g -O3 -arch ppc -arch i386  -isysroot /Developer/SDKs/MacOSX10.1.sdkrtz,-I. -isysroot /Developer/SDKs/MacOSX10.1.sdkr~zQgcc-4.0 -bundle  -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.1.sdk -gr��4-fno-strict-aliasing  -g -O3 -arch ppc -arch i386   r��)gcc-4.0 -bundle  -arch ppc -arch i386  -g�r1r@r8�_check_for_unavailable_sdkr0s   r#�test__check_for_unavailable_sdkz/Test_OSXSupport.test__check_for_unavailable_sdkss���C�.�B�?�F�	
����.��?��	
�
�	
�.�.�{�M�J�����(�C�C�$/�1�	2r%c��ddddddd�}dddd	dd
d�}|j||�|j|tj|��y)NrrzZ-fno-strict-aliasing  -g -O3 -arch ppc -arch i386  -isysroot/Developer/SDKs/MacOSX10.1.sdkrtz+-I. -isysroot/Developer/SDKs/MacOSX10.1.sdkr~zPgcc-4.0 -bundle  -arch ppc -arch i386 -isysroot/Developer/SDKs/MacOSX10.1.sdk -gr�r�r�r�r�r0s   r#�)test__check_for_unavailable_sdk_alternatez9Test_OSXSupport.test__check_for_unavailable_sdk_alternatesu���B�.�A�?�E�	
����.��?��	
�
�	
�.�.�{�M�J�����(�C�C�$/�1�	2r%c�b�ddd�}tj|ddd�}|jd|�y)Nr��10.6)r	�MACOSX_DEPLOYMENT_TARGET� )�macosxr��fat)r8�get_platform_osxr@)r!r,�results   r#�test_get_platform_osxz%Test_OSXSupport.test_get_platform_osx:s;��C�$*�
��
�.�.�{�C��c�J�����2�F�;r%N)�__name__�
__module__�__qualname__r$r1rCrGrNrTr^r`rcrpr|r�r�r�r�r�r�r�r)r%r#rrsc��
#�;�K�
G�A�
I�5�5�5�G�%2�N2�,2�. 2�D2�42�62�8	<r%r�__main__)�__doc__rrPr>�sys�unittest�test.supportrr8�
skipUnlessrR�TestCaserr��mainr)r%r#�<module>r�s}���
���
��"������S�\�\�,�,�X�6��H�s<�h�'�'�s<�I�s<�j	�z���H�M�M�O�r%

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