D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
python38
/
lib
/
python3.8
/
distutils
/
tests
/
__pycache__
/
Filename :
test_cygwinccompiler.cpython-38.pyc
back
Copy
U �i�_ � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl mZmZm Z mZmZmZ ddlmZ G dd � d e�ZG d d� dejej�Zdd � Zedkr�ee� � dS )z$Tests for distutils.cygwinccompiler.� N)�BytesIO)�run_unittest)�cygwinccompiler)�check_config_h�CONFIG_H_OK�CONFIG_H_NOTOK�CONFIG_H_UNCERTAIN�get_versions� get_msvcr)�supportc @ s e Zd ZdZdd� ZdS )� FakePopenNc C sD |� � d | _| jj}| j|kr2t|| j �| _nt�|d�| _d S )Nr �r)�split�cmd� test_class�_exesr �stdout�os�popen)�selfr �shellr Zexes� r �C/opt/python38/lib/python3.8/distutils/tests/test_cygwinccompiler.py�__init__ s zFakePopen.__init__)�__name__� __module__�__qualname__r r r r r r r s r c sP e Zd Z� fdd�Z� fdd�Zdd� Zdd� Zd d � Zdd� Zd d� Z � Z S )�CygwinCCompilerTestCasec st t t| ��� tj| _tj�| �� d�| _ ddl m} |j| _ | j|_tj| _| jt_i | _tj| _| t_tt_d S )Nzpython.hr �� sysconfig)�superr �setUp�sys�versionr �path�join�mkdtemp�python_h� distutilsr �get_config_h_filename�old_get_config_h_filename�_get_config_h_filenamer �find_executable�old_find_executable�_find_executabler �Popen� old_popenr r �r r �� __class__r r r! s zCygwinCCompilerTestCase.setUpc s>