|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/distutils/tests/__pycache__/ |
U
@��g� � @ s� d Z ddlZddlZddlZddlmZmZ ddlmZm Z ddl
mZ ddlm
Z
G dd� dejejej�Zd d
� Zedkr�ee� � dS )z#Tests for distutils.command.config.� N)�run_unittest�missing_compiler_executable)� dump_file�config)�support)�logc sb e Zd Zdd� Z� fdd�Z� fdd�Zdd� Ze�e j
d kd
�dd� �Zd
d� Zdd� Z
� ZS )�ConfigTestCasec G s |� � D ]}| j�|� qd S �N)�
splitlines�_logs�append)�self�msg�args�line� r �>/opt/cppython/lib/python3.8/distutils/tests/test_config_cmd.py�_info s zConfigTestCase._infoc s( t t| ��� g | _tj| _| jt_d S r )�superr �setUpr r �info�old_logr �r
�� __class__r r r s zConfigTestCase.setUpc s | j t_tt| ��� d S r )r r r r r �tearDownr r r r r s zConfigTestCase.tearDownc C s\ t j�t�d d }t|�}zt|�� �}W 5 |�� X t|d� | � t| j
�|d � d S )Nr z.pyzI am the header� )�os�path�splitext�__file__�open�close�len� readlinesr �assertEqualr )r
Z this_file�fZnumlinesr r r �test_dump_file s
zConfigTestCase.test_dump_file�win32zcan't test on Windowsc C s� dd l }tdg�}|d k r(| �d| � | �� \}}t|�}|�� |j}tjd d� dkrxd|j d �
� krx| �d� |jdd d
�}| �|d� |jdd d
�}| �|d� d S )
Nr �preprocessorzThe %r command is not found� ZaixZxlczAxlc: The -E option overrides the -P, -o, and -qsyntaxonly options�xxxz /* xxx */)�patternZbodyZ_configtestr )
�shutilr ZskipTest�create_distr Z_check_compiler�compiler�sys�platformr) �lowerZ
search_cppr% )r
r- �cmd�pkg_dir�distr/ �matchr r r �test_search_cpp( s
$
zConfigTestCase.test_search_cppc C sr | � � \}}t|�}dtj |_d|_dtj |_|�� | �|jddg� | �|jdg� | �|jddg� d S )Nzone%stwo�onezthree%sfour�twoZthreeZfour) r. r r �pathsepZinclude_dirsZ librariesZlibrary_dirsZensure_finalizedr% )r
r4 r5 r3 r r r �test_finalize_options<