£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
B
     f.}                 @   sN  d Z ddlmZ ddlZddlZddlZddlmZmZ ddl	Z	ddl	m
Z
 ddlZddlmZ ejZejZi Zed Zed< ed Zed	< ed Zed
< ed Zed< dd Zdd ZG dd de	jZG dd de	jZG dd de	jZG dd de	jZG dd de	jZG dd de	jZedkrJe	j dd dS )zTest config, coverage 93%.
(100% for IdleConfParser, IdleUserConfParser*, ConfigChanges).
* Exception is OSError clause in Save method.
Much of IdleConf is also exercised by ConfigDialog and test_configdialog.
    )configN)captured_stderrfindfile)mock)Func main	highlightkeys
extensionsc               C   s   t t_dt_d S )NT)testcfgidleConfuserCfgidlelibtesting r   r   B/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_config.pysetUpModule   s    r   c               C   s   t t_dt_d S )NF)usercfgr   r   r   r   r   r   r   r   tearDownModule!   s    r   c               @   s4   e Zd ZdZdZdd Zdd Zdd Zd	d
 ZdS )IdleConfParserTestzTest that IdleConfParser worksz
        [one]
        one = false
        two = true
        three = 10

        [two]
        one = a string
        two = true
        three = false
    c             C   s   t d}|| j  | j}| |jddddd | |jddddd ||jddd	dd
 ||ddd | |jddddd | |jddddd ||ddd ||ddd | |dd ||jddddd d S )Nr   onebool)typeFtwoTthreeint
   za stringtruefalsenotZexistZDEFAULT)default)r   IdleConfParserread_stringassertEqualZassertIsGetZassertIsNone)selfparsereqr   r   r   test_get5   s    
zIdleConfParserTest.test_getc             C   s\   t d}|| j  |j}| |ddddg | |ddddg | |dg  d S )Nr   r   r   r   z	not exist)r   r"   r#   GetOptionListassertCountEqualr$   )r&   r'   Zget_listr   r   r   test_get_option_listJ   s    
z'IdleConfParserTest.test_get_option_listc             C   s&   t d}|  | | g  d S )Nr   )r   r"   Loadr$   sections)r&   r'   r   r   r   test_load_nothingR   s    
z$IdleConfParserTest.test_load_nothingc             C   sF   t d}t|}|  | |ddd | |ddg d S )Nzcfgparser.1zFoo Barfoonewbar)r   r   r"   r-   r$   r%   r*   )r&   config_pathr'   r   r   r   test_load_fileW   s
    
z!IdleConfParserTest.test_load_fileN)	__name__
__module____qualname____doc__r   r)   r,   r/   r3   r   r   r   r   r   &   s   r   c               @   sJ   e Zd ZdZdddZdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dS )IdleUserConfParserTestz"Test that IdleUserConfParser worksr   c             C   s
   t |S )N)r   IdleUserConfParser)r&   pathr   r   r   
new_parserd   s    z!IdleUserConfParserTest.new_parserc             C   s   |   }|d | |ddd | |ddd | |ddd | |ddd | |ddd | | ddg | |ddd d S )NFoobarr   r   Bar)	r;   add_section
assertTrue	SetOptionassertFalser$   r%   r+   r.   )r&   r'   r   r   r   test_set_optiong   s    
z&IdleUserConfParserTest.test_set_optionc             C   sZ   |   }|d |ddd | |dd | |dd | |dd d S )Nr<   r=   r   ZNotZExist)r;   
AddSectionrA   r@   ZRemoveOptionrB   )r&   r'   r   r   r   test_remove_optionw   s    
z)IdleUserConfParserTest.test_remove_optionc             C   sN   |   }| | g  |d |d |d | | ddg d S )Nr<   r>   )r;   r$   r.   rD   r+   )r&   r'   r   r   r   test_add_section   s    


z'IdleUserConfParserTest.test_add_sectionc             C   s^   |   }|d |d |ddd | | dddg |  | | dg d S )Nr<   r>   ZIdlenameval)r;   rD   rA   r+   r.   ZRemoveEmptySectionsr$   )r&   r'   r   r   r   test_remove_empty_sections   s    

z1IdleUserConfParserTest.test_remove_empty_sectionsc             C   sv   |   }|d |d | |  | | g  |ddd |d | |  | | dg d S )Nr<   r>   r=   r   )	r;   rD   r@   ZIsEmptyr$   r.   rA   rB   r+   )r&   r'   r   r   r   test_is_empty   s    


z$IdleUserConfParserTest.test_is_emptyc          	   C   s   t  }tj|d}| |}|d |ddd | tj	| |
  | tj	| |d |
  | tj	| W d Q R X d S )Nztest.cfgr<   r=   r   )tempfileZTemporaryDirectoryosr:   joinr;   rD   rA   rB   existsZSaver@   remove_section)r&   Ztdirr:   r'   r   r   r   	test_save   s    



z IdleUserConfParserTest.test_saveN)r   )r4   r5   r6   r7   r;   rC   rE   rF   rI   rJ   rP   r   r   r   r   r8   a   s   
	
r8   c               @   s,  e Zd ZdZedd Zedd ZdAddZd	d
 Ze	
ejdddd Ze	
ejd ddd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zd d! Zd"d# Zd$d% Zd&d' Zd(d) Zd*d+ Zd,d- Zd.d/ Zd0d1 Zd2d3 Z d4d5 Z!d6d7 Z"d8d9 Z#d:d; Z$d<d= Z%d>d? Z&d@S )BIdleConfTestzTest for idleConfc          
   C   s   i | _ tjdd}tdkr(tjt}ntjt	jd }xD|j
D ]:}tj|d| }t|d}| | j |< W d Q R X qBW tj| _t t_d S )NT)_utest__main__r   z../config-%s.defr)config_stringr   IdleConfr4   rL   r:   dirname__file__abspathsysconfig_typesrM   openread_warn	orig_warnr   )clsconfidle_dirctyper2   fr   r   r   
setUpClass   s    zIdleConfTest.setUpClassc             C   s   | j t_d S )N)r_   r   r^   )r`   r   r   r   tearDownClass   s    zIdleConfTest.tearDownClassFc             C   s   t j|dS )N)rR   )r   rV   )r&   rR   r   r   r   
new_config   s    zIdleConfTest.new_configc             C   sl   t jdd}xZ|jD ]P}t d|j|< |j| | j|  t d|j|< |j| | j|  qW |S )zbReturn a mocked idleConf

        Both default and user config used the same config-*.def
        T)rR   r   )	r   rV   r[   r"   
defaultCfgr#   rU   r9   r   )r&   ra   rc   r   r   r   mock_config   s    zIdleConfTest.mock_configwinzthis is test for unix systemc             C   s   | j dd}tjddd0 tjddd | | d W d Q R X W d Q R X tjdddF tjd	d
d, td | | d W d Q R X W d Q R X W d Q R X tjddd: | t$ | t |  W d Q R X W d Q R X W d Q R X d S )NT)rR   zos.path.expanduserz	/home/foo)return_valuezos.path.existsz/home/foo/.idlerc~z	os.getcwdz/home/foo/cpythonzos.mkdirz/home/foo/cpython/.idlerczos.path.joinz/path/not/exists)rg   r   patchr$   GetUserCfgDirassertRaises
SystemExitFileNotFoundError)r&   ra   r   r   r   test_get_user_cfg_dir_unix   s    $
$z'IdleConfTest.test_get_user_cfg_dir_unixzthis is test for Windows systemc             C   s   | j dd}tjddd0 tjddd | | d W d Q R X W d Q R X tjdddF tjd	d
d, td | | d W d Q R X W d Q R X W d Q R X tjddd: | t$ | t |  W d Q R X W d Q R X W d Q R X d S )NT)rR   zos.path.expanduserzC:\foo)rk   zos.path.existszC:\foo\.idlercrl   z	os.getcwdzC:\foo\cpythonzos.mkdirzC:\foo\cpython\.idlerczos.path.joinz/path/not/exists)rg   r   rm   r$   rn   ro   rp   rq   )r&   ra   r   r   r   test_get_user_cfg_dir_windows   s    $
$z*IdleConfTest.test_get_user_cfg_dir_windowsc          
   C   s6  | j dd}d}tjddi( tjd|d |  W d Q R X W d Q R X | |j |j | |j	 |j x |j
 D ]}| |tj qW x |j	
 D ]}| |tj qW x6|j D ](\}}| |jtj|d| d	 qW x>|j	 D ]0\}}| |jtj|jpd
d| d qW d S )NT)rR   z	/home/foor4   Z__foo__zos.path.dirname)rk   zconfig-z.def#z.cfg)rg   r   rm   dictZCreateConfigHandlersr+   rh   r
   r[   r   valuesZassertIsInstancer   r"   r9   itemsr$   filerL   r:   rM   Zuserdir)r&   ra   rb   Zdefault_parserZuser_parserZcfg_typer'   r   r   r   test_create_config_handlers  s"    z(IdleConfTest.test_create_config_handlersc             C   s   | j dd}td}t||jd< t||jd< |  | j}||jd 	ddd ||jd 
ddg ||jd 	ddd ||jd 
ddg d S )NT)rR   zcfgparser.1r0   zFoo Barr1   )rg   r   r   r"   rh   r9   r   ZLoadCfgFilesr$   r%   r*   )r&   ra   r2   r(   r   r   r   test_load_cfg_files&  s    z IdleConfTest.test_load_cfg_filesc          	   C   s>   |   }td"}|  | |jt|j W d Q R X d S )Nz&idlelib.config.IdleUserConfParser.Save)ri   r   rm   ZSaveUserCfgFilesr$   
call_countlenr   )r&   ra   mr   r   r   test_save_user_cfg_files;  s    z%IdleConfTest.test_save_user_cfg_filesc          	   C   s   |   }| j}||dddd ||jdddddd tdV}||jddd	ddd  ||ddd
d  ||jddd
ddd ||jd W d Q R X d S )Nr   EditorWindowwidthZ80r   )r   P   zidlelib.config._warnZfont	NotExistsZNE)r!      )ri   r$   	GetOptionr   rm   r{   )r&   ra   r(   r^   r   r   r   test_get_optionB  s    zIdleConfTest.test_get_optionc             C   s2   |   }|dddd | |dddd d S )Nr   r<   r=   r1   )ri   rA   r$   r   )r&   ra   r   r   r   rC   N  s    zIdleConfTest.test_set_optionc             C   s   |   }| |ddddddddd	d
g | |ddddddddd	d
g | tj |dd W d Q R X | tj |dd W d Q R X d S )Nr!   r   ZGeneralr   ZPyShellIndentThemeKeysZHistory	HelpFilesuserZfoobarZ	notexists)ri   r+   GetSectionListro   r   InvalidConfigSetZInvalidConfigType)r&   ra   r   r   r   test_get_section_listT  s    



z"IdleConfTest.test_get_section_listc          	   C   s   |   }| j}||ddddd ||ddddd |dd	d
d |dd	dd td ||d	dddd W d Q R X d S )NzIDLE ClassicZnormalz#000000z#ffffff)Z
foregroundZ
backgroundZcursorZblackr	   Foobarznormal-foregroundz#747474znormal-backgroundz#171717zidlelib.config._warn)ri   r$   ZGetHighlightrA   r   rm   )r&   ra   r(   r   r   r   test_get_highlighte  s    

zIdleConfTest.test_get_highlightc          	   C   sL   |   }| |dd|dd | tj |dd W d Q R X d S )Nr!   zIDLE Classicr   bad)ri   r$   ZGetThemeDictro   r   ZInvalidTheme)r&   ra   r   r   r   test_get_theme_dictw  s    
z IdleConfTest.test_get_theme_dictc             C   s8   |   }| | |d | | |d d S )Nr   r   )ri   r$   ZCurrentThemecurrent_colors_and_keysCurrentKeys)r&   ra   r   r   r   test_get_current_theme_and_keys  s    z,IdleConfTest.test_get_current_theme_and_keysc             C   s   |   }| |dd d S )Nr   zIDLE Classic)ri   r$   r   )r&   ra   r   r   r   test_current_colors_and_keys  s    z)IdleConfTest.test_current_colors_and_keysc             C   s^   t j}| jdd}dt _| | d dt _| | d dt _| | d |t _d S )	NT)rR   Zwin32zIDLE Classic WindowsdarwinzIDLE Classic OSXz
some-linuxzIDLE Modern Unix)rZ   platformrg   r$   default_keys)r&   current_platformra   r   r   r   test_default_keys  s    zIdleConfTest.test_default_keysc             C   s   t d | j}tj}||ddg  || dg ||dddg ||ddddg ||ddd	ddg t d t d d S )
Nzn
            [ZzDummy]
            enable = True
            [DISABLE]
            enable = False
            T)Z
shell_onlyZzDummy)editor_onlyF)active_onlyZDISABLE)r   r   )userextnr#   r$   r   ZGetExtensionsrO   )r&   r(   ZiGEr   r   r   test_get_extensions  s    
z IdleConfTest.test_get_extensionsc             C   s0   |   }| ||dddddddg d S )Nr!   r   ZAutoCompleteZCodeContextZFormatParagraphZ
ParenMatchr   )ri   r+   ZRemoveKeyBindNamesr   )r&   ra   r   r   r   test_remove_key_bind_names  s    z'IdleConfTest.test_remove_key_bind_namesc             C   s>   t d | j}|tdd |tdd  t d d S )Nz=
            [ZzDummy]
            enable = True
            zz-inr   zz-out)r   r#   r$   r   ZGetExtnNameForEventrO   )r&   r(   r   r   r   test_get_extn_name_for_event  s    z)IdleConfTest.test_get_extn_name_for_eventc             C   s0   t d | tdddgi t d d S )Nz=
            [ZzDummy]
            enable = True
            r   z<<z-in>>z!<Control-Shift-KeyRelease-Insert>)r   r#   r$   r   ZGetExtensionKeysrO   )r&   r   r   r   test_get_extension_keys  s
    z$IdleConfTest.test_get_extension_keysc             C   sN   t d | j}tj}||di  dgdgd}||d| t d d S )Nz=
            [ZzDummy]
            enable = True
            r   z!<Control-Shift-KeyRelease-Insert>z!<Control-Shift-KeyRelease-Delete>)z<<z-in>>z	<<z-out>>r   )r   r#   r$   r   ZGetExtensionBindingsrO   )r&   r(   ZiGEBZexpectr   r   r   test_get_extension_bindings  s    
z(IdleConfTest.test_get_extension_bindingsc             C   s   |   }| j}||ddddg ||ddddg ||ddd	d
g ||dddg ||dddg ||ddg  ||ddg  d S )NzIDLE Modern Unixz<<copy>>z<Control-Shift-Key-C>z<Control-Key-Insert>zIDLE Classic Unixz<Alt-Key-w>z<Meta-Key-w>zIDLE Classic Windowsz<Control-Key-c>z<Control-Key-C>zIDLE Classic Macz<Command-Key-c>zIDLE Classic OSXz
NOT EXISTS)ri   r$   ZGetKeyBinding)r&   ra   r(   r   r   r   test_get_keybinding  s    


z IdleConfTest.test_get_keybindingc             C   s8   t j}|  }dt _| | ||  |t _d S )Nz
some-linux)rZ   r   ri   r$   ZGetCurrentKeySet	GetKeySetr   )r&   r   ra   r   r   r   test_get_current_keyset  s
    	z$IdleConfTest.test_get_current_keysetc             C   sj   |   }|jd d |jd d |jd ddd |jd ddd | |dd	 d
 d S )Nr   r   ZFoobar_cfgBindingsZenableTrueZnewfooz<Key-F3>zIDLE Modern Unixz
<<newfoo>>r   )ri   rh   r?   setr$   r   )r&   ra   r   r   r   test_get_keyset  s    zIdleConfTest.test_get_keysetc             C   sL   |   }| |d | |d | |d | |d d S )NcopyZcutzdel-word-rightz
not-exists)ri   r@   ZIsCoreBindingrB   )r&   ra   r   r   r   test_is_core_binding  s
    z!IdleConfTest.test_is_core_bindingc          	   C   s  |   }| |dg  | |dg  | tj | |dg  W d Q R X | | |d|d  |jd 	ddd |jd 	ddd	 |jd 	dd
d |jd 	ddd | |ddddg | | |d|d  d S )Nr!   r   r   r   r   4zPython;https://python.org3zPython:https://python.org2z/Pillow;https://pillow.readthedocs.io/en/latest/1z/IDLE;C:/Programs/Python36/Lib/idlelib/help.html)IDLEz*C:/Programs/Python36/Lib/idlelib/help.htmlr   )ZPillowz(https://pillow.readthedocs.io/en/latest/r   )Pythonzhttps://python.orgr   )
ri   r$   ZGetExtraHelpSourceListro   r   r   r+   ZGetAllExtraHelpSourcesListr   rA   )r&   ra   r   r   r   test_extra_help_source_list  s&    z(IdleConfTest.test_extra_help_source_listc             C   s   ddl m} ddlm} ddlm} |  }|d | }|  ||dd|d}| 	|
|d	d
|d |d dkr|dn|d |d f |  ~d S )Nr   )requires)Tk)FontZguiZTkFixedFontT)rG   rN   rootr   r   Zfamilysizer   Zweight)test.supportr   Ztkinterr   Ztkinter.fontr   ri   ZwithdrawZactualr$   ZGetFontZdestroy)r&   r   r   r   ra   r   rd   r   r   r   test_get_font*  s    (zIdleConfTest.test_get_fontc             C   s   |   }| j}|| d dg || d ddg || d dg ||dd d	d
g ||dd dg ||dd ddg ||dd ddg d S )Nz<<center-insert>>z<Control-l>z<<copy>>z<Control-c>z<Control-C>z<<history-next>>z<Alt-n>zIDLE Classic Windowsz<Control-Key-l>z<Control-Key-L>zIDLE Classic OSXz<Command-Key-c>zIDLE Classic Unixz<Alt-Key-n>z<Meta-Key-n>zIDLE Modern Unix)ri   r$   ZGetCoreKeys)r&   ra   r(   r   r   r   test_get_core_keys=  s    

zIdleConfTest.test_get_core_keysN)F)'r4   r5   r6   r7   classmethodre   rf   rg   ri   unittestZskipIfrZ   r   
startswithrr   rs   ry   rz   r~   r   rC   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rQ      s<   


	rQ   c               @   sR   e Zd ZdZejZdZe Zdd Z	dd Z
dd Zd	d
 Zdd Zdd ZdS )CurrentColorKeysTesta   Test colorkeys function with user config [Theme] and [Keys] patterns.

        colorkeys = config.IdleConf.current_colors_and_keys
        Test all patterns written by IDLE and some errors
        Item 'default' should really be 'builtin' (versus 'custom).
    zIDLE Classicc             C   s~   |  | d| j td |  | d| j dtd d< |  | dd dtd d< |  | d| j td d S )Nr   z<
            [Theme]
            default = True
            zIDLE NewrG   znon-existent)r$   	colorkeysdefault_themeusermainr#   rO   )r&   r   r   r   test_old_builtin_themeX  s    z+CurrentColorKeysTest.test_old_builtin_themec             C   sh   t d | | dd dt d d< | | dd dt d d< | | d| j t d d S )NzZ
            [Theme]
            default = True
            name2 = IDLE Dark
            r   z	IDLE DarkzIDLE NewrG   znon-existentname2)r   r#   r$   r   r   rO   )r&   r   r   r   test_new_builtin_themej  s    z+CurrentColorKeysTest.test_new_builtin_themec             C   sp   t d | | d| j td | | dd dt d d< | | dd t d td d S )Nz\
            [Theme]
            default = False
            name = Custom Dark
            r   z[Custom Dark]
a=bzCustom Darkznon-existentr   )r   r#   r$   r   r   userhighrO   )r&   r   r   r   test_user_override_themez  s    

z-CurrentColorKeysTest.test_user_override_themec             C   s^   |  | d| j td |  | dd dtd d< |  | d| j td d S )Nr   z`
            [Keys]
            default = True
            name = IDLE Classic Unix
            zIDLE Classic Unixznon-existentrG   )r$   r   r   r   r#   rO   )r&   r   r   r   test_old_builtin_keys  s    z*CurrentColorKeysTest.test_old_builtin_keysc             C   sh   t d | | dd dt d d< | | dd dt d d< | | d| j t d d S )Nz`
            [Keys]
            default = True
            name2 = IDLE Modern Unix
            r   zIDLE Modern UnixzIDLE Classic UnixrG   znon-existentr   )r   r#   r$   r   r   rO   )r&   r   r   r   test_new_builtin_keys  s    z*CurrentColorKeysTest.test_new_builtin_keysc             C   sp   t d | | d| j td | | dd dt d d< | | dd t d td d S )Nz[
            [Keys]
            default = False
            name = Custom Keys
            r   z[Custom Keys]
a=bzCustom Keysznon-existentr   )r   r#   r$   r   r   userkeysrO   )r&   r   r   r   test_user_override_keys  s    

z,CurrentColorKeysTest.test_user_override_keysN)r4   r5   r6   r7   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   M  s   r   c               @   s   e Zd Zi i i i dZdd Zdddiiddd	iid
ddiii dZdd Zdd Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd ZdS ) ChangesTest)r   r	   r
   r   c             C   s:   | j }|dddd |dddd |d	d
dd |S )Nr   Msecmitemmvalr	   Hsechitemhvalr
   Kseckitemkval)changes
add_option)r&   r   r   r   r   load  s
    zChangesTest.loadr   r   r   r   r   r   r   r   r   c             C   s   t  | _d S )N)r   ZConfigChangesr   )r&   r   r   r   setUp  s    zChangesTest.setUpc             C   s   |  | j| j d S )N)r$   r   empty)r&   r   r   r   	test_init  s    zChangesTest.test_initc             C   s8   |   }| || j |dddd | || j d S )Nr   r   r   r   )r   r$   loadedr   )r&   r   r   r   r   test_add_option  s    zChangesTest.test_add_optionc             C   s   | j j}| |dddd | |dddd | td d d | |dddd | td d d | |dddd | tdd td d S )Nr   r   Zwhat0z
use-spacesr   )r   save_optionr@   rB   r$   r   
has_optionrO   )r&   r   r   r   r   test_save_option  s    zChangesTest.test_save_optionc             C   s   |   }| |  | td d d | td d d | td d d	 |d
ddd | |  t	d t	d t	d d S )Nr   r   r   r   r   r   r   r   r   r   )
r   r@   save_allr$   r   r   r   r   rB   rO   )r&   r   r   r   r   test_save_added  s    

zChangesTest.test_save_addedc             C   sV   | j }|dddd |dddd |  | tdd | tdd d S )Nr   r   r   ZidledocZELDIZcodeldi)r   r   r   r   rB   r   r   r@   )r&   r   r   r   r   test_save_help  s    zChangesTest.test_save_helpc             C   s   | j }|dddd d S )Nr   r   z
use-spacesr   )r   r   )r&   r   r   r   r   test_save_default  s    zChangesTest.test_save_defaultc          
   C   s   |   }|dd | || j x\dD ]T\}}t| |dd ||| | t || |  t| |  W d Q R X q(W d S )Nr   Zfake))r   r   )r
   r   rG   value)r   Zdelete_sectionr$   r   r   rA   ro   KeyError)r&   r   ZcfgtypeZsectionr   r   r   test_delete_section   s    zChangesTest.test_delete_sectionc             C   s"   |   }|  | || j d S )N)r   clearr$   r   )r&   r   r   r   r   
test_clear  s    zChangesTest.test_clearN)r4   r5   r6   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r     s   


	r   c               @   s   e Zd Zdd ZdS )WarningTestc          	   C   s   | j }t t_t }tdd W d Q R X |tjdh || d t }tdd W d Q R X || d t }tdd W d Q R X |tjddh || d	 d S )
Nwarningkey)r   r   zwarning
r   warn2yek)r   r   zwarn2
)r$   r   r   Z_warnedr   r^   getvalue)r&   ZEqualstderrr   r   r   	test_warn  s    zWarningTest.test_warnN)r4   r5   r6   r   r   r   r   r   r     s   r   rS      )	verbosity)!r7   r   r   rZ   rL   rK   r   r   r   r   r   Zidlelib.idle_test.mock_idler   r   r   r   r   r9   r   r   r   r   r   r   ZTestCaser   r8   rQ   r   r   r   r4   r   r   r   r   r   <module>   s:   ;S   oV
