Current File : //usr/local/apps/python3/lib/python3.11/distutils/tests/__pycache__/test_sysconfig.cpython-311.pyc |
�
�Ke�) � � � d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z ddl
mZ ddlm
Z
ddlmZmZmZmZ ddlmZ ddlmZ G d � d
e
j ej � � Zd� Zedk r e e� � � � dS dS )
zTests for distutils.sysconfig.� N)� sysconfig)�get_default_compiler)�support)�run_unittest� swap_item�requires_subprocess�is_wasi)�TESTFN)�check_warningsc � � � e Zd Z� fd�Z� fd�Zd� Z ej ed� � d� � � Z d� Z
d� Z ej ed� � d� � � Zd � Z
d
� Z ej e� � dk d� � d
� � � Zd� Zd� Zd� Z ej ej d� � d� � d� � � Z e� � d� � � Z� xZS )�SysconfigTestCasec �d �� t t | � � � � � d | _ d S �N)�superr
�setUp�makefile��self� __class__s ��H/usr/local/apps/python3/lib/python3.11/distutils/tests/test_sysconfig.pyr zSysconfigTestCase.setUp s+ �� �
���&�&�,�,�.�.�.���
�
�
� c � �� | j �t j | j � � | � � � t t
| � � � � � d S r )r �os�unlink�cleanup_testfnr r
�tearDownr s �r r zSysconfigTestCase.tearDown sR �� ��=�$��I�d�m�$�$�$�������
���&�&�/�/�1�1�1�1�1r c � � t j � t � � rt j t � � d S t j � t � � rt
j t � � d S d S r )r �path�isfiler
�remove�isdir�shutil�rmtree�r s r r z SysconfigTestCase.cleanup_testfn sd � �
�7�>�>�&�!�!� "��I�f������
�W�]�]�6�
"�
"� "��M�&�!�!�!�!�!� "� "r z,Incompatible with WASI mapdir and OOT buildsc � � t j � � }| � t j � |� � |� � d S r )r �get_config_h_filename�
assertTruer r r )r �config_hs r �test_get_config_h_filenamez,SysconfigTestCase.test_get_config_h_filename# s8 � ��2�4�4���������x�0�0�(�;�;�;�;�;r c � � | � t j � � t j t �� � � � d S )N)�prefix)�assertNotEqualr �get_python_libr
r$ s r �test_get_python_libz%SysconfigTestCase.test_get_python_lib( sG � �
���I�4�6�6�%�4�F�C�C�C� E� E� E� E� Er c � � t j � � }| � |t � � | � |� � d S r )r �get_config_vars�assertIsInstance�dictr'