관리-도구
편집 파일: test_scripts.cpython-37.pyc
B ��Fd � @ s� d Z ddlmZmZmZ ddlZddlmZm Z m Z mZ ddlZddl mZmZ ddlZddlmZ ddlmZ ddlmZ dd lmZ e ee ej�d d��Zdd d�Zee�dd� �ZdS )z\ Test scripts Test that we can run executable scripts that have been installed with numpy. � )�division�print_function�absolute_importN)�join�isfile�dirname�basename)�Popen�PIPE)� basestring)�assert_equal)�skipif)�assert_z..zsetup.pyTc C s� t | t�r| gnt| �} tjdkr0dd� | D �} t| ttd�}|�� \}}|�� dkr^|� � |r�|j dkr�td�dd d ddd d dg�� | ||���|j ||fS )ap Run command sequence `cmd` returning exit code, stdout, stderr Parameters ---------- cmd : str or sequence string with command name or sequence of strings defining command check_code : {True, False}, optional If True, raise error for non-zero return code Returns ------- returncode : int return code from execution of `cmd` stdout : bytes (python 3) or str (python 2) stdout from `cmd` stderr : bytes (python 3) or str (python 2) stderr from `cmd` Raises ------ RuntimeError If `check_code` is True, and return code !=0 �ntc S s"