File: //usr/local/lib/python3.10/distutils/tests/__pycache__/test_config_cmd.cpython-310.opt-2.pyc
o
�i � @ s� d dl Z d dlZd dlZd dlZd dlmZmZ d dlmZm Z d dl
mZ d dlm
Z
G dd� dejeje j�Zdd � Zed
krIee� � dS dS )� 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 �</usr/local/lib/python3.10/distutils/tests/test_config_cmd.py�_info s �zConfigTestCase._infoc s4 t t| ��� g | _tj| _| jt_tt j
�| _d S r )�superr �setUpr r �info�old_logr �dict� sysconfig�_CONFIG_VARS�old_config_vars�r
�� __class__r r r s
zConfigTestCase.setUpc s2 | j t_tj�� tj�| j� tt | ��
� d S r )r r r r r �clear�updater r r �tearDownr r r r r! s
zConfigTestCase.tearDownc C sd t j�t�d d }t|�}zt|�� �}W |�� n|�� w t|d� | � t| j
�|d � d S )Nr z.pyzI am the header� )�os�path�splitext�__file__�open�len� readlines�closer �assertEqualr )r
Z this_file�fZnumlinesr r r �test_dump_file! s
zConfigTestCase.test_dump_file�win32zcan't test on Windowsc C s� t dg�}|d ur| �d| � | �� \}}t|�}|�� |j}tjd d� dkr8d|jd � � v r8| �d� |j
dd d
�}| �|d� |j
dd d
�}| �|d� d S )
N�preprocessorzThe %r command is not found� ZaixZxlcr zAxlc: The -E option overrides the -P, -o, and -qsyntaxonly options�xxxz /* xxx */)�pattern�bodyZ_configtestr"