3
2a$ @ s d dl mZ d dlZd dlmZ d dlmZ d dlZG dd dejZG dd de Z
G d d
d
ZG dd dejZG d
d dejZ
edkrejdd dS ) )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}tjjtd}dd |_tj W d Q R X W d Q R X Y nX Y nX |j j j
}| jdt| | j
d |d
| j
d|d d S )
Nc @ s e Zd Zdd ZdS )zDRunTest.test_print_exception_unhashable..UnhashableExceptionc S s dS )NT )selfotherr r -/opt/alt/python36/lib64/python3.6/test_run.py__eq__ s zKRunTest.test_print_exception_unhashable..UnhashableException.__eq__N)__name__
__module____qualname__r
r r r r UnhashableException
s r ex1ex2Zcleanup_tracebackc S s | S )Nr )ter r r s z9RunTest.test_print_exception_unhashable.. zUnhashableException: ex2 zUnhashableException: ex1
) Exceptionr r Zpatchobjectr Zside_effectprint_exceptiongetvaluestrip
splitlinesassertEquallenZassertIn)r r r r outputZcttbr r r test_print_exception_unhashable s$
(z'RunTest.test_print_exception_unhashableN)r r r
r! r r r r r
s r c @ s<