D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
python38
/
lib
/
python3.8
/
distutils
/
tests
/
__pycache__
/
Filename :
test_spawn.cpython-38.pyc
back
Copy
U �i�_" � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZmZ ddl m Z ddlm Z ddlmZ ddlmZ dd lmZ ddlm Z G d d� de je jej�Zdd � Zedkr�ee� � dS )zTests for distutils.spawn.� N)�mock)�run_unittest� unix_shell)�support)�find_executable)�_nt_quote_args)�spawn)�DistutilsExecErrorc @ s6 e Zd Zdd� Ze�ejdkd�dd� �Zdd� Z d S ) � SpawnTestCasec C sB ddgddgfddgddgffD ]\}}t |�}| �||� q d S )Nz with spaceZnospacez"with space"Znochange)r �assertEqual)�self�argsZwanted�res� r �9/opt/python38/lib/python3.8/distutils/tests/test_spawn.py�test_nt_quote_args s ���z SpawnTestCase.test_nt_quote_args)�nt�posixzRuns only under posix or ntc C s� | � � }tjdkr2tj�|d�}| �|dt � ntj�|d�}| �|d� t�|d� | � t t|g� tjdkr�tj�|d�}| �|dt � ntj�|d�}| �|d� t�|d� t|g� d S ) N�win32zfoo.shz#!%s exit 1zfoo.batzexit 1i� z#!%s exit 0zexit 0)�mkdtemp�sys�platform�os�path�joinZ write_filer �chmodZassertRaisesr r )r ZtmpdirZexer r r � test_spawn s zSpawnTestCase.test_spawnc C s� t �� ���}t j}|d }tj�||�}t|d�� W 5 Q R X t�|tj � t ||d�}| �||� tj dkr�t ||d�}| �||� t �|�� t |�}| �||� W 5 Q R X d| }t ||d�}| �|� t �� ��}d|d<