관리-도구
편집 파일: test_run.cpython-37.pyc
B � f�- � @ s� d Z ddlmZ ddlZddlmZ ddlmZ ddlZddlZG dd� dej �Z G dd � d e�ZG d d� d�Z G dd � d ej �ZG dd� dej �ZG dd� dej �Zedkr�ejdd� dS )zTest run, coverage 42%.� )�runN)�mock)�captured_stderrc @ s e Zd Zdd� ZdS )�RunTestc C s� G dd� dt �}|d�}|d�}y ||�W np |k r� y|�W nR |k r� t� �2}tj�td��}dd� |_t�� W d Q R X W d Q R X Y nX Y nX |�� � � � � }| �dt|�� | � d |d � | � d|d � d S ) Nc @ s e Zd Zdd� ZdS )zDRunTest.test_print_exception_unhashable.<locals>.UnhashableExceptionc S s dS )NT� )�self�otherr r �?/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_run.py�__eq__ s zKRunTest.test_print_exception_unhashable.<locals>.UnhashableException.__eq__N)�__name__� __module__�__qualname__r r r r r �UnhashableException s r �ex1�ex2Zcleanup_tracebackc S s | S )Nr )�t�er r r �<lambda> � z9RunTest.test_print_exception_unhashable.<locals>.<lambda>� zUnhashableException: ex2� zUnhashableException: ex1� )� Exceptionr r Zpatch�objectr Zside_effect�print_exception�getvalue�strip� splitlines�assertEqual�lenZassertIn)r r r r �outputZct�tbr r r �test_print_exception_unhashable s$ (z'RunTest.test_print_exception_unhashableN)r r r r"