3
§ fÆ$ ã @ s¤ d Z ddlmZ ddlZddlmZ ddlmZ ddlZG dd„ dejƒZ G dd „ d e
ƒZG d
d„ dƒZG dd
„ d
ejƒZ
G 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}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© )ÚselfÚotherr r ú?/opt/alt/python36/lib64/python3.6/idlelib/idle_test/test_run.pyÚ__eq__ s zKRunTest.test_print_exception_unhashable..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 Ú s z9RunTest.test_print_exception_unhashable..é 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! r r r r r
s r c @ s<