Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/idlelib/idle_test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/idlelib/idle_test/__pycache__/test_config.cpython-312.opt-2.pyc

�

&Μg[}���	ddlmZddlZddlZddlZddlmZmZddlZddlm	Z	ddlZddl
mZejZejZiZej d�xZed<ej d�xZed<ej d�xZed	<ej d�xZed
<d�Zd�ZGd
�dej.�ZGd�dej.�ZGd�dej.�ZGd�dej.�ZGd�dej.�ZGd�dej.�Zedk(rej>d��yy)�)�configN)�captured_stderr�findfile)�mock)�Func��main�	highlight�keys�
extensionsc�8�tt_dt_y)NT)�testcfg�idleConf�userCfg�idlelib�testing���:/usr/local/lib/python3.12/idlelib/idle_test/test_config.py�setUpModulers���H���G�Orc�8�tt_dt_y)NF)�usercfgrrrrrrr�tearDownModuler!s���H���G�Orc�*�eZdZ	dZd�Zd�Zd�Zd�Zy)�IdleConfParserTestz�
        [one]
        one = false
        two = true
        three = 10

        [two]
        one = a string
        two = true
        three = false
    c���tjd�}|j|j�|j}|j	|jddd��d�|j	|jddd��d�||jddd	��d
�||jdd�d�|j	|jddd��d�|j	|jddd��d�||jdd�d�||jdd�d
�|j
|jdd��||jddd��d�y)Nr�one�bool��typeF�twoT�three�int�
za string�true�false�not�exist�DEFAULT��default)r�IdleConfParser�read_string�assertEqual�assertIs�Get�assertIsNone)�self�parser�eqs   r�test_getzIdleConfParserTest.test_get5s3���&�&�r�*�����4�;�;�'�
�
�
��	
�
�
�f�j�j���F�j�;�U�C��
�
�f�j�j���F�j�;�T�B�
�6�:�:�e�W�5�:�1�2�6�
�6�:�:�e�U�#�Z�0��
�
�f�j�j���F�j�;�T�B��
�
�f�j�j���f�j�=�u�E�	�6�:�:�e�U�#�V�,�
�6�:�:�e�W�%�w�/�	
���&�*�*�U�G�4�5�
�6�:�:�e�W�i�:�8�)�Drc��tjd�}|j|j�|j}|j	|d�gd��|j	|d�gd��|j|d�g�y)Nrr)rr!r"r!z	not exist)rr,r-�
GetOptionList�assertCountEqualr.)r2r3�get_lists   r�test_get_option_listz'IdleConfParserTest.test_get_option_listJsn���&�&�r�*�����4�;�;�'��'�'�����h�u�o�/F�G����h�u�o�/F�G�����+�.��3rc��tjd�}|j�|j|j	�g�y)Nr)rr,�Loadr.�sections�r2r3s  r�test_load_nothingz$IdleConfParserTest.test_load_nothingRs2���&�&�r�*�����
�������*�B�/rc���tdd��}tj|�}|j�|j	|jdd�d�|j	|j
d�dg�y)N�cfgparser.1�
configdata��subdir�Foo Bar�foo�newbar)rrr,r<r.r0r7)r2�config_pathr3s   r�test_load_filez!IdleConfParserTest.test_load_fileWs_���}�\�B���&�&�{�3�����
�������I�u�5�x�@�����-�-�i�8�5�'�BrN)�__name__�
__module__�__qualname__rr5r:r?rIrrrrr&s"��(�
�F�E�*4�0�
Crrc�:�eZdZ	d	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)
�IdleUserConfParserTestc�,�tj|�S�N)r�IdleUserConfParser)r2�paths  r�
new_parserz!IdleUserConfParserTest.new_parserds���(�(��.�.rc�"�|j�}|jd�|j|jddd��|j	|jddd��|j|jddd��|j|j
dd�d�|j|jddd��|j|j�ddg�|j|j
dd�d�y)N�Foo�barr%r&�Bar)	rS�add_section�
assertTrue�	SetOption�assertFalser.r0r8r=r>s  r�test_set_optionz&IdleUserConfParserTest.test_set_optiongs������"�����5�!�����(�(���v�>�?�����)�)�%���?�@�����(�(���w�?�@�������E�5�1�7�;�	
����(�(���v�>�?����f�o�o�/�%���@�������E�5�1�6�:rc�2�|j�}|jd�|jddd�|j|j	dd��|j|j	dd��|j|j	dd��y)NrUrVr%�Not�Exist)rS�
AddSectionrZrY�RemoveOptionr[r>s  r�test_remove_optionz)IdleUserConfParserTest.test_remove_optionws}�����"�����%� ������v�.�����+�+�E�5�9�:�����,�,�U�E�:�;�����,�,�U�G�<�=rc��|j�}|j|j�g�|jd�|jd�|jd�|j	|j�ddg�y)NrUrW)rSr.r=r`r8r>s  r�test_add_sectionz'IdleUserConfParserTest.test_add_section�sl�����"��������*�B�/�	���%� ����%� ����%� ����f�o�o�/�%���@rc�4�|j�}|jd�|jd�|jddd�|j|j	�gd��|j�|j
|j	�dg�y)NrUrW�Idle�name�val)rWrUrf)rSr`rZr8r=�RemoveEmptySectionsr.r>s  r�test_remove_empty_sectionsz1IdleUserConfParserTest.test_remove_empty_sections�sy�����"�����%� ����%� �������/����f�o�o�/�1G�H��"�"�$�������*�V�H�5rc��|j�}|jd�|jd�|j|j��|j	|j�g�|j
ddd�|jd�|j|j��|j|j�dg�y)NrUrWrVr&)	rSr`rY�IsEmptyr.r=rZr[r8r>s  r�
test_is_emptyz$IdleUserConfParserTest.test_is_empty�s������"�����%� ����%� �������(�)�������*�B�/������w�/����%� �������)�*����f�o�o�/�%��9rc�v�tj�5}tjj	|d�}|j|�}|j
d�|jddd�|jtjj|��|j�|jtjj|��|jd�|j�|jtjj|��ddd�y#1swYyxYw)Nztest.cfgrUrVr%)
�tempfile�TemporaryDirectory�osrR�joinrSr`rZr[�exists�SaverY�remove_section)r2�tdirrRr3s    r�	test_savez IdleUserConfParserTest.test_save�s���
�
(�
(�
*�d��7�7�<�<��j�1�D��_�_�T�*�F����e�$����U�E�6�2�
���R�W�W�^�^�D�1�2��K�K�M��O�O�B�G�G�N�N�4�0�1�
�!�!�%�(��K�K�M����R�W�W�^�^�D�1�2�+�
*�
*�s�DD/�/D8N)r)
rJrKrLrSr\rbrdrjrmrwrrrrNrNas)��,�/�;� >�	A�6�:�3rrNc��eZdZ	ed��Zed��Zd"d�Zd�Zeje
jjd�d�d��Z
eje
jjd�d�d	��Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d �Z%y!)#�IdleConfTestc�*�i|_tjd��}tdk7r$tj
j
t�}n0tj
jtj
d�}|jD]V}tj
j|d|z�}t|�5}|j�|j|<ddd��Xtj|_t!�t_y#1swY��xYw)NT��_utest�__main__rz../config-%s.def)�
config_stringr�IdleConfrJrqrR�dirname�__file__�abspath�sys�config_typesrr�open�read�_warn�	orig_warnr)�cls�conf�idle_dir�ctyperH�fs      r�
setUpClasszIdleConfTest.setUpClass�s���������d�+���z�!��w�w���x�0�H��w�w���s�x�x��{�3�H��&�&�E��'�'�,�,�x�1C�e�1K�L�K��k�"�a�+,�6�6�8��!�!�%�(�#�"�'�
����
��v���	#�"�s�8D	�	D	c�.�|jt_yrP)r�rr�)r�s r�
tearDownClasszIdleConfTest.tearDownClass�s
���}�}��rc�.�tj|��S)Nr{)rr)r2r|s  r�
new_configzIdleConfTest.new_config�s�����f�-�-rc��	tjd��}|jD]�}tjd�|j|<|j|j|j|�tjd�|j|<|j|j|j|���|S)NTr{r)	rrr�r,�
defaultCfgr-r~rQr)r2r�r�s   r�mock_configzIdleConfTest.mock_config�s���	����d�+���&�&�E�%+�%:�%:�2�%>�D�O�O�E�"��O�O�E�"�.�.�t�/A�/A�%�/H�I�"(�";�";�B�"?�D�L�L����L�L���+�+�D�,>�,>�u�,E�F�	'��r�winzthis is test for unix systemc�~�|jd��}tjdd��5tjdd��5|j|j	�d�ddd�ddd�tjdd��5tjd	d
��5tjd�5|j|j	�d�ddd�ddd�ddd�tjd
d��5|jt�5|jt�5|j	�ddd�ddd�ddd�y#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY�WxYw#1swY�[xYw#1swYyxYw)NTr{�os.path.expanduser�	/home/foo��return_value�os.path.existsz/home/foo/.idlerc�~�	os.getcwdz/home/foo/cpython�os.mkdirz/home/foo/cpython/.idlerc�os.path.join�/path/not/exists�r�r�patchr.�
GetUserCfgDir�assertRaises�
SystemExit�FileNotFoundError�r2r�s  r�test_get_user_cfg_dir_unixz'IdleConfTest.test_get_user_cfg_dir_unix�sN�����d��+���Z�Z�,�;�
G����,�4�@�� � ��!3�!3�!5�7J�K�A�H�
�Z�Z�,�3�
?����K�6I�J��Z�Z�
�+��$�$�T�%7�%7�%9�%@�B�,�K�@��Z�Z��5G�
H��"�"�:�.��&�&�'8�9��&�&�(�:�/�I�
H�A�@��H�
G��,�+��K�J��@�
?��:�9��/�.��I�
H���E*�!E�#E*�
F�"F�8!E7�F�!F�F3�F'�4F�F'�
F3�E'	�#E*�*E4�7F�<F�F	�F�F�F$� F'�'F0	�,F3�3F<zthis is test for Windows systemc�~�|jd��}tjdd��5tjdd��5|j|j	�d�ddd�ddd�tjdd��5tjd	d
��5tjd�5|j|j	�d�ddd�ddd�ddd�tjd
d��5|jt�5|jt�5|j	�ddd�ddd�ddd�y#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY�WxYw#1swY�[xYw#1swYyxYw)NTr{r�zC:\foor�r�zC:\foo\.idlercr�r�zC:\foo\cpythonr�zC:\foo\cpython\.idlercr�r�r�r�s  r�test_get_user_cfg_dir_windowsz*IdleConfTest.test_get_user_cfg_dir_windows�sN�����d��+���Z�Z�,�9�
E����,�4�@�� � ��!3�!3�!5�7I�J�A�F�
�Z�Z�,�3�
?����K�6H�I��Z�Z�
�+��$�$�T�%7�%7�%9�%@�B�,�J�@��Z�Z��5G�
H��"�"�:�.��&�&�'8�9��&�&�(�:�/�I�
H�A�@��F�
E��,�+��J�I��@�
?��:�9��/�.��I�
H�r�c
�D�|jd��}d}tjjddi�5tjd|��5|j	�ddd�ddd�|j|j|j�|j|j|j�|jj�D]"}|j|tj��$|jj�D]"}|j|tj��$|jj�D]C\}}|j|j t"j$j'|d|�d	����E|jj�D]Q\}}|j|j t"j$j'|j(xsd
d|�d����Sy#1swY���xYw#1swY���xYw)NTr{r�rJ�__foo__zos.path.dirnamer�zconfig-z.def�#z.cfg)r�rr��dict�CreateConfigHandlersr8r�r�r�values�assertIsInstancerr,rQ�itemsr.�filerqrRrr�userdir)r2r�r��default_parser�user_parser�cfg_typer3s       r�test_create_config_handlersz(IdleConfTest.test_create_config_handlerss������d��+����
�Z�Z�_�_�j�)�4�
5����-�H�E��)�)�+�F�6�
	
���d�o�o�t�/@�/@�A����d�l�l�D�,=�,=�>�#�o�o�4�4�6�N��!�!�.�&�2G�2G�H�7��<�<�.�.�0�K��!�!�+�v�/H�/H�I�1�!%��� 5� 5� 7��H�f����V�[�[��W�W�\�\�(�g�h�Z�t�4L�M�
O�!8�!%��� 2� 2� 4��H�f����V�[�[��W�W�\�\�$�,�,�*=�#���
�RV�?W�X�
Z�!5�#F�E��6�
5�s#�H�H�H�H	�
H�Hc�2�|jd��}tdd��}tj|�|jd<tj
|�|jd<|j�|j}||jdjdd�d�||jdjd�dg�||jdjdd�d�||jdjd�dg�y)	NTr{rArBrCrFrErG)r�rrr,r�rQr�LoadCfgFilesr.r0r7)r2r�rHr4s    r�test_load_cfg_filesz IdleConfTest.test_load_cfg_files&s������d��+���}�\�B��!'�!6�!6�{�!C������$�7�7��D����U��	
����
�
�
��	�4�?�?�5�!�%�%�i��7��B�
�4�?�?�5�!�/�/�	�:�U�G�D�	�4�<�<���"�"�9�e�4�h�?�
�4�<�<���,�,�Y�7�%��Arc��|j�}tjd�5}|j�|j	|j
t
|j��ddd�y#1swYyxYw)Nz&idlelib.config.IdleUserConfParser.Save)r�rr��SaveUserCfgFilesr.�
call_count�lenr)r2r��ms   r�test_save_user_cfg_filesz%IdleConfTest.test_save_user_cfg_files;sU�����!��
�Z�Z�@�
A�Q��!�!�#����Q�\�\�3�t�|�|�+<�=�B�
A�
A�s�AA/�/A8c	���|j�}|j}||jddd�d�||jdddd��d�tjd�5}||jddd	d��d�||jddd
�d�||jddd
d��d�||j
d
�ddd�y#1swYyxYw)Nr	�EditorWindow�width�80r#r�P�idlelib.config._warn�font�	NotExists�NEr*�)r�r.�	GetOptionrr�r�)r2r�r4r�s    r�test_get_optionzIdleConfTest.test_get_optionBs������!��
�
�
��
�4�>�>�&�.�'�:�D�A�
�4�>�>�&�.�'��>�F��K�
�Z�Z�.�
/�5��t�~�~�f�n�f�5�~�I�4�P��t�~�~�f�n�k�B�D�I��t�~�~�f�n�k�4�~�P�RV�W��u����#�	0�
/�
/�s
�(A&C�C c��|j�}|jdddd�|j|jddd�d�y)Nr	rUrVrG)r�rZr.r�r�s  rr\zIdleConfTest.test_set_optionNs?�����!�����v�u�e�X�6���������u�=�x�Hrc���|j�}|j|jdd�gd��|j|jdd�gd��|jtj
�5|jdd�ddd�|jtj�5|jdd�ddd�y#1swY�DxYw#1swYyxYw)Nr+r	)�Generalr��PyShell�Indent�Theme�Keys�History�	HelpFiles�user�foobar�	notexists)r�r8�GetSectionListr�r�InvalidConfigSet�InvalidConfigTyper�s  r�test_get_section_listz"IdleConfTest.test_get_section_listTs������!��������	�6�2�
-�	.�	
��������/�
-�	.�
�
�
�v�6�6�
7�����&�1�8�
�
�
�v�7�7�
8����	�;�7�9�
8�8�
7��
8�
8�s�8C�2C�C�C#c��|j�}|j}||jdd�ddd��||jdd�ddd��|jdd	d
d�|jdd	dd
�t	j
d�5||jd	d�dd
d��ddd�y#1swYyxYw)N�IDLE Classic�normalz#000000z#ffffff)�
foreground�
background�cursor�blackr
�Foobarznormal-foregroundz#747474znormal-backgroundz#171717r�)r�r.�GetHighlightrZrr��r2r�r4s   r�test_get_highlightzIdleConfTest.test_get_highlightes������!��
�
�
��
�4���^�X�6�y�GP�9R�	S�	�4���^�X�6�w�GP�9R�	S�	
���{�H�.A�9�M����{�H�.A�9�M�
�Z�Z�.�
/��t� � ��8�4�Y�EN�7P�
Q�0�
/�
/�s�B8�8Cc��|j�}|j|jdd�|jdd��|jtj
�5|jdd�ddd�y#1swYyxYw)Nr+r�r��bad)r�r.�GetThemeDictr�r�InvalidThemer�s  r�test_get_theme_dictz IdleConfTest.test_get_theme_dictwsr�����!��	
������i��8����f�n�5�	7��
�
�v�2�2�
3����e�^�4�4�
3�
3�s�"A>�>Bc���|j�}|j|j�|jd��|j|j	�|jd��y)Nr�r�)r�r.�CurrentTheme�current_colors_and_keys�CurrentKeysr�s  r�test_get_current_theme_and_keysz,IdleConfTest.test_get_current_theme_and_keys�sX�����!������*�*�,�d�.J�.J�7�.S�T�����)�)�+�T�-I�-I�&�-Q�Rrc�f�|j�}|j|jd�d�y)Nr�r�)r�r.r�r�s  r�test_current_colors_and_keysz)IdleConfTest.test_current_colors_and_keys�s+�����!������5�5�g�>��Orc�`�tj}|jd��}dt_|j|j	�d�dt_|j|j	�d�dt_|j|j	�d�|t_y)	NTr{�win32�IDLE Classic Windows�darwin�IDLE Classic OSX�
some-linux�IDLE Modern Unix)r��platformr�r.�default_keys�r2�current_platformr�s   r�test_default_keyszIdleConfTest.test_default_keys�s����<�<�����d��+���������*�*�,�.D�E��������*�*�,�.@�A�#�������*�*�,�.@�A�(��rc�d�tjd�|j}tj}||d��g�||�dg�||d��dg�||d��ddg�||dd�	�ddg�tjd�tjd�y)
Nzn
            [ZzDummy]
            enable = True
            [DISABLE]
            enable = False
            T)�
shell_only�ZzDummy)�editor_onlyF)�active_only�DISABLE)rr)�userextnr-r.r�
GetExtensionsru)r2r4�iGEs   r�test_get_extensionsz IdleConfTest.test_get_extensions�s�������	��
�
���$�$��
�3�$���$�
�3�5�9�+��
�3�4� �9�+�.�
�3�5�!�I�y�#9�:�
�3�5�d�3�i��5K�L����	�*����	�*rc��|j�}|j|j|jdd��gd��y)Nr+r)�AutoComplete�CodeContext�FormatParagraph�
ParenMatchr)r�r8�RemoveKeyBindNamesr�r�s  r�test_remove_key_bind_namesz'IdleConfTest.test_remove_key_bind_names�s=�����!������#�#�D�$7�$7�	�<�$P�Q�W�	Yrc���tjd�|j}|tj	d�d�|tj	d�d�tjd�y)N�=
            [ZzDummy]
            enable = True
            zz-inrzz-out)r	r-r.r�GetExtnNameForEventru)r2r4s  r�test_get_extn_name_for_eventz)IdleConfTest.test_get_extn_name_for_event�sZ������	��
�
��
�8�'�'��/��;�
�8�'�'��0�$�7����	�*rc��tjd�|jtj	d�ddgi�tjd�y)Nrr�<<z-in>>�!<Control-Shift-KeyRelease-Insert>)r	r-r.r�GetExtensionKeysru�r2s r�test_get_extension_keysz$IdleConfTest.test_get_extension_keys�sM������	�	
����2�2�9�=��<�=�>�	@����	�*rc���tjd�|j}tj}||d�i�dgdgd�}||d�|�tjd�y)Nrr�rz!<Control-Shift-KeyRelease-Delete>)rz	<<z-out>>r)r	r-r.r�GetExtensionBindingsru)r2r4�iGEB�expects    r�test_get_extension_bindingsz(IdleConfTest.test_get_extension_bindings�sl������	��
�
���,�,��
�4���b�!�B�C� C�D�F��
�4�	�?�F�#����	�*rc��|j�}|j}||jdd�ddg�||jdd�ddg�||jdd�d	d
g�||jdd�dg�||jd
d�dg�||jdd�g�||jdd�g�y)Nr��<<copy>>z<Control-Shift-Key-C>z<Control-Key-Insert>�IDLE Classic Unixz<Alt-Key-w>z<Meta-Key-w>r�z<Control-Key-c>z<Control-Key-C>zIDLE Classic Mac�<Command-Key-c>r�z
NOT EXISTS)r�r.�
GetKeyBindingr�s   r�test_get_keybindingz IdleConfTest.test_get_keybinding�s������!��
�
�
��
�4���0�*�=�
$�&<�=�	?�
�4���1�:�>�
�N�+�	-�
�4���4�j�A�
� 1�2�	4�
�4���0�*�=�@Q�?R�S�
�4���0�*�=�@Q�?R�S�	�4���l�J�7��<�
�4���0�,�?��Drc���tj}|j�}dt_|j|j	�|j|j
���|t_y)Nr�)r�r�r�r.�GetCurrentKeySet�	GetKeySetr�rs   r�test_get_current_keysetz$IdleConfTest.test_get_current_keyset�sW���<�<�����!��$�������.�.�0�$�.�.��AQ�AQ�AS�2T�U�(��rc�d�|j�}|jdjd�|jdjd�|jdjddd�|jdjddd�|j	|jd�d	d
�y)Nrr��Foobar_cfgBindings�enable�True�newfooz<Key-F3>r�z
<<newfoo>>r)r�r�rX�setr.r+r�s  r�test_get_keysetzIdleConfTest.test_get_keyset�s������!��	
����%�1�1�(�;�����%�1�1�2F�G�����%�)�)�(�H�f�E�����%�)�)�*>��*�U�������(:�;�L�I�2�Nrc�$�|j�}|j|jd��|j|jd��|j|jd��|j|jd��y)N�copy�cutzdel-word-rightz
not-exists)r�rY�
IsCoreBindingr[r�s  r�test_is_core_bindingz!IdleConfTest.test_is_core_bindingso�����!������*�*�6�2�3�����*�*�5�1�2�����*�*�+;�<�=�����+�+�L�9�:rc��|j�}|j|jd�g�|j|jd�g�|jtj
�5|j|jd�g�ddd�|j
|j�|jd�|jd�z�|jdjddd�|jdjddd	�|jdjdd
d�|jdjddd
�|j|jd�gd��|j
|j�|jd�|jd�z�y#1swY��0xYw)Nr+r�r�r	r��4zPython;https://python.org�3zPython: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=)�Pillowz(https://pillow.readthedocs.io/en/latest/r<)�Pythonzhttps://python.orgr:)
r�r.�GetExtraHelpSourceListr�rr�r8�GetAllExtraHelpSourcesListrrZr�s  r�test_extra_help_source_listz(IdleConfTest.test_extra_help_source_lists������!��	
����4�4�Y�?��D�����4�4�V�<�b�A�
�
�
�v�6�6�
7����T�8�8��?��D�8�����+�+�-��'�'�	�2�T�5P�5P�QW�5X�X�	Z�
	
���V��&�&�{�C�9T�U����V��&�&�{�C�9T�U����V��&�&�{�C�9j�k����V��&�&�{�C�9j�k�����4�4�V�<�A�	B�	
����+�+�-��'�'�	�2�T�5P�5P�QW�5X�X�	Z�8�
7�s�2"G�Gc�N�ddlm}ddlm}ddlm}|j
�}|d�|�}|j�|j|dd|���}|j|j|d	d
�|d|ddkrd
n|d|df�|j�~y)Nr)�requires)�Tk)�Font�gui�TkFixedFontT)rgrs�rootr	r��family�sizer$�weight)�test.supportrE�tkinterrF�tkinter.fontrGr��withdraw�actualr.�GetFont�destroy)r2rErFrGr�rJr�s       r�
test_get_fontzIdleConfTest.test_get_font*s���)��%����!������t���
�
���K�K��-��4�H�I������L�L��v�~�6�
�x�[��&�	�Q��"�A�f�I�q��{�K�	M�
	
����rc���|j�}|j}||j�ddg�||j�dddg�||j�ddg�||jd�dd	d
g�||jd�ddg�||jd
�dddg�||jd�dddg�y)Nz<<center-insert>>z<Control-l>r$z<Control-c>z<Control-C>z<<history-next>>z<Alt-n>r�z<Control-Key-l>z<Control-Key-L>r�r&r%z<Alt-Key-n>z<Meta-Key-n>r�)r�r.�GetCoreKeysr�s   r�test_get_core_keyszIdleConfTest.test_get_core_keys=s������!��
�
�
��
�4����1�2�]�O�D�
�4����j�)�M�=�+I�J�
�4����0�1�I�;�?�
�4���2�3�4G�H��0�1�	3�
�4���.�/�
�;�>O�=P�Q�
�4���/�0�1C�D��>�*�	,�
�4���.�/�0B�C�
�N�+�	-rN)F)&rJrKrL�classmethodr�r�r�r��unittest�skipIfr�r��
startswithr�r�r�r�r�r�r\r�r�r�r�r�rrrrrr"r(r,r3r8rCrUrXrrrryry�s������� �%��%�.���X�_�_�S�\�\�,�,�U�3�5S�T�)�U�)�,�X�_�_����0�0��7�7�9Z�[�)�\�)�,Z�6B�*>�
$�I�8�"Q�$
5�S�P�
(� +�$Y�+�+�+�E�"(�"O�;�Z�6�&
-rryc�n�eZdZ	ejZdZej�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
y)	�CurrentColorKeysTestr�c���|j|jd�|j�tj	d�|j|jd�|j�dtdd<|j|jd�d�dtdd<|j|jd�|j�tjd�y)Nr�z<
            [Theme]
            default = True
            �IDLE Newrg�non-existent)r.�	colorkeys�
default_theme�usermainr-rurs r�test_old_builtin_themez+CurrentColorKeysTest.test_old_builtin_themeXs����������0�$�2D�2D�E�����	�
	
�������0�$�2D�2D�E�$.����&�!��������0�*�=�$2����&�!��������0�$�2D�2D�E�����(rc�b�tjd�|j|jd�d�dtdd<|j|jd�d�dtdd<|j|jd�|j�tjd�y)NzZ
            [Theme]
            default = True
            name2 = IDLE Dark
            r�z	IDLE Darkr`rgra�name2)rdr-r.rbrcrurs r�test_new_builtin_themez+CurrentColorKeysTest.test_new_builtin_themejs�������	�
	
�������0�+�>�$.����&�!��������0�+�>�%3����'�"��������0�$�2D�2D�E�����(rc��tjd�|j|jd�|j�t
jd�|j|jd�d�dtdd<|j|jd�d�tj
d�t
j
d�y)Nz\
            [Theme]
            default = False
            name = Custom Dark
            r�z[Custom Dark]
a=bzCustom Darkrarg)rdr-r.rbrc�userhighrurs r�test_user_override_themez-CurrentColorKeysTest.test_user_override_themezs�������	�
	
�������0�$�2D�2D�E����1�2��������0�-�@�%3����'�"��������0�-�@�����(����
�.rc�^�|j|jd�|j�tj	d�|j|jd�d�dtdd<|j|jd�|j�tjd�y)Nr�z`
            [Keys]
            default = True
            name = IDLE Classic Unix
            r%rarg)r.rbr�rdr-rurs r�test_old_builtin_keysz*CurrentColorKeysTest.test_old_builtin_keys�s����������/��1B�1B�C�����	�
	
�������/�1D�E�#1����� ��������/��1B�1B�C�����'rc�b�tjd�|j|jd�d�dtdd<|j|jd�d�dtdd<|j|jd�|j�tjd�y)Nz`
            [Keys]
            default = True
            name2 = IDLE Modern Unix
            r�r�r%rgrarg)rdr-r.rbr�rurs r�test_new_builtin_keysz*CurrentColorKeysTest.test_new_builtin_keys�s�������	�
	
�������/�1C�D�#6����� ��������/�1C�D�$2�����!��������/��1B�1B�C�����'rc��tjd�|j|jd�|j�t
jd�|j|jd�d�dtdd<|j|jd�d�tj
d�t
j
d�y)Nz[
            [Keys]
            default = False
            name = Custom Keys
            r�z[Custom Keys]
a=bzCustom Keysrarg)rdr-r.rbr��userkeysrurs r�test_user_override_keysz,CurrentColorKeysTest.test_user_override_keys�s�������	�
	
�������/��1B�1B�C����1�2��������/��?�$2�����!��������/��?�����'����
�.rN)rJrKrLrr�rbrcr�rerhrkrmrorrrrrr^r^MsE����0�0�I�"�M��(�(�*�L�)�$)� /�"
(�(� /rr^c�|�eZdZiiiid�Zd�Zdddiidddiid	d
diiid�Zd�Zd
�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zy)�ChangesTest)r	r
rrc��|j}|jdddd�|jdddd�|jd	d
dd�|S)
Nr	�Msec�mitem�mvalr
�Hsec�hitem�hvalr�Ksec�kitem�kval��changes�
add_option�r2r�s  r�loadzChangesTest.load�sL���,�,�����6�6�7�F�;����;����@����6�6�7�F�;��rrvrwrxryrzr{r|r}r~c�6�tj�|_yrP)r�
ConfigChangesr�rs r�setUpzChangesTest.setUp�s���+�+�-��rc�P�|j|j|j�yrP)r.r��emptyrs r�	test_initzChangesTest.test_init�s��������t�z�z�2rc��|j�}|j||j�|jdddd�|j||j�y)Nr	rvrwrx)r�r.�loadedr�r�s  r�test_add_optionzChangesTest.test_add_option�sI���)�)�+������$�+�+�.����6�6�7�F�;�����$�+�+�.rc���|jj}|j|dddd��|j|dddd��|j	t
ddd�|j|dddd��|j	t
ddd�|j|dddd��|jt
j
dd��t
jd�y)Nr	r��what�0�
use-spacesr=)r��save_optionrYr[r.rd�
has_optionru)r2r�s  r�test_save_optionzChangesTest.test_save_option�s����l�l�.�.������F�H�f�c�B�C�����V�X�v�s�C�D�����(�+�F�3�S�9�����F�H�l�C�H�I�����(�+�L�9�3�?�����F�H�l�C�H�I�����,�,�X�|�D�E�����)rc���|j�}|j|j��|jtddd�|jt
ddd�|jtddd	�|jd
ddd�|j|j��tjd�t
jd�tjd�y)Nrvrwrxryrzr{r|r}r~r	)
r�rY�save_allr.rdrjrqr�r[rur�s  r�test_save_addedzChangesTest.test_save_added�s����)�)�+������(�(�*�+�����&�)�'�2�F�;�����&�)�'�2�F�;�����&�)�'�2�F�;����6�6�7�F�;�����)�)�+�,�����'�����'�����'rc� �|j}|jdddd�|jdddd�|j�|j	t
j
dd��|jt
j
dd��y)Nr	r�r>�idledoc�ELDI�codeldi)r�r�r�r�r[rdr�rYr�s  r�test_save_helpzChangesTest.test_save_help�ss���,�,�����F�K���C����6�;��	�B���������,�,�[�&�A�B�����+�+�K��@�Arc�D�|j}|jdddd�y)Nr	r�r�r=rr�s  r�test_save_defaultzChangesTest.test_save_default�s���,�,�����6�8�\�3�?rc�h�|j�}|jdd�|j||j�dD]c\}}t|j|dd�|j||�|j
t�5|||t||ddd��ey#1swY�pxYw)Nr	�fake))r	rv)rr|rg�value)r��delete_sectionr.r�rrZr��KeyError)r2r��cfgtype�sections    r�test_delete_sectionzChangesTest.test_delete_sections����)�)�+�����v�v�.�����$�+�+�.� D��G�W��G��&�&�w���@��"�"�7�G�4��"�"�8�,��� ��)��� ��)�-�,�!E�-�,�s�B(�(B1	c�|�|j�}|j�|j||j�yrP)r��clearr.r�r�s  r�
test_clearzChangesTest.test_clears*���)�)�+���
�
������$�*�*�-rN)rJrKrLr�r�r�r�r�r�r�r�r�r�r�r�rrrrtrt�sw���B�r��C�E�����0�1�"�W�f�$5�6����/�0�� �F�
.�3�/�
*�
(�B�@�	*�.rrtc��eZdZd�Zy)�WarningTestc�l�|j}t�t_t	�5}tj
dd�ddd�|tjdh�|j
�d�t	�5}tj
dd�ddd�||j
�d�t	�5}tj
dd�ddd�|tjddh�||j
�d	�y#1swY��xYw#1swY��xYw#1swY�RxYw)
N�warning�key)r�r�zwarning
r�warn2�yek)r�r�zwarn2
)r.r2r�_warnedrr��getvalue)r2�Equal�stderrs   r�	test_warnzWarningTest.test_warns���� � ������
�
�&��L�L��E�*��
�f�n�n�0�1�2�
�f�o�o���0�
�
�&��L�L��E�*��
�f�o�o���$�
�
�&��L�L��%�(��
�f�n�n�0�/�B�C�
�f�o�o���.��
���
���
�s#�D�D�D*�D�D'�*D3N)rJrKrLr�rrrr�r�s��
/rr�r}�)�	verbosity) rrr�rqrorNrrrZr�idlelib.idle_test.mock_idlerrrrrrQrdrjrqr	rr�TestCaserrNryr^rtr�rJr	rrr�<module>r�sR���
�
�	��2����,��?�?��
�
�
��
��6�V�6�6�r�:�:��7�6�?�";�&�";�";�B�"?�?��7�;��6�V�6�6�r�:�:��7�6�?�#<�6�#<�#<�R�#@�@��7�<� ���
8C��*�*�8C�vP3�X�.�.�P3�fV-�8�$�$�V-�rl/�8�,�,�l/�^S.�(�#�#�S.�l/�(�#�#�/�$�z���H�M�M�A��r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists