OwlCyberSecurity - MANAGER
Edit File: test_exec_command.cpython-38.pyc
U �p�]; � @ 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�ZdS )� )�division�absolute_import�print_functionN)� TemporaryFile)�exec_command)� get_pythonexe)�tempdir�assert_�assert_warns� )�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 �I/usr/lib/python3/dist-packages/numpy/distutils/tests/test_exec_command.py�__init__ s zredirect_stdout.__init__c C s t j| _| jt _d S r )r r � old_stdoutr �r r r r � __enter__ s zredirect_stdout.__enter__c C s | j �� | jt_| j �� d S r )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 r )r �stderr�_stderr)r r&