Edit File: test_exec_command.cpython-37.pyc
B ��FdU � @ s� d dl mZmZmZ d dlZd dlZd dlmZ d dlm Z d dl mZ d dlm Z mZmZ ejd dkrxd dlmZ nd dlmZ G d d � d e�ZG dd� de�ZG d d� de�Zdd� Zdd� ZG dd� de �Zedkr�e� dS )� )�division�absolute_import�print_functionN)� TemporaryFile)�exec_command)� get_pythonexe)�TestCase�run_module_suite�tempdir� )�StringIOc @ s* e Zd ZdZd dd�Zdd� Zdd� ZdS ) �redirect_stdoutz9Context manager to redirect stdout for exec_command test.Nc C s |pt j| _d S )N)�sys�stdout�_stdout)�selfr � r ��/builddir/build/BUILDROOT/alt-python37-numpy-1.13.3-8.el8.x86_64/opt/alt/python37/lib64/python3.7/site-packages/numpy/distutils/tests/test_exec_command.py�__init__ s zredirect_stdout.__init__c C s t j| _| jt _d S )N)r r � old_stdoutr )r r r r � __enter__ s zredirect_stdout.__enter__c C s | j �� | jt_| j �� d S )N)r �flushr r r �close)r �exc_type� exc_value� tracebackr r r �__exit__ s zredirect_stdout.__exit__)N)�__name__� __module__�__qualname__�__doc__r r r r r r r r s r c @ s* e Zd ZdZd dd�Zdd� Zdd� ZdS ) �redirect_stderrz9Context manager to redirect stderr for exec_command test.Nc C s |pt j| _d S )N)r �stderr�_stderr)r r"