Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/test/test_tkinter/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/test/test_tkinter/__pycache__/test_widgets.cpython-312.opt-2.pyc

�

)Μgp����ddlZddlZddlmZddlZddlmZddlmZmZm	Z	m
Z
mZddlm
Z
mZmZmZmZed�dZdZd	�ZGd
�dee�Ze
e�Gd�d
eej,��Ze
e�Gd�deej,��Ze
e�Gd�deej,��ZGd�dee�Ze
e�Gd�deej,��Ze
e�Gd�deej,��Ze
e�Gd�deej,��Ze
e�Gd�deej,��Ze
e�Gd�deej,��ZGd�deej,�Z e
ee�Gd �d!eej,��Z!e
e�Gd"�d#e!ej,��Z"e
e�Gd$�d%eej,��Z#e
ee�Gd&�d'eej,��Z$e
ee�Gd(�d)eej,��Z%e
ee�Gd*�d+eej,��Z&e
ee�Gd,�d-eej,��Z'e
e�Gd.�d/eej,��Z(e
e�Gd0�d1eej,��Z)e
ee�Gd2�d3eej,��Z*Gd4�d5eej,�Z+ee$ee!eeee%ee)e*e e(ee&e'e"e#ee+fZ,e-d6k(rej\�yy)7�N)�TclError)�requires)�requires_tk�
tk_version�get_tk_patchlevel�	widget_eq�AbstractDefaultRootTest)�add_standard_options�AbstractWidgetTest�StandardOptionsTests�IntegerSizeTests�PixelSizeTests�guiz.(bad|expected) screen distance (but got )?"{}"z4(bad|expected) screen distance (or "" but got )?"{}"c�*�tt|��S�N)�float�round)�xs �;/usr/local/lib/python3.12/test/test_tkinter/test_widgets.py�float_roundrs����q��?��c�(�eZdZdZd�Zd�Zd�Zd�Zy)�AbstractToplevelTestFc�
�|j�}|j|d|jjj	��|j|ddd��|jd��}|j|dd�y)N�class�Fooz2can't modify -class option after widget is created��errmsg)�class_)�create�assertEqual�	__class__�__name__�title�checkInvalidParam��self�widget�widget2s   r�test_configure_classz)AbstractToplevelTest.test_configure_classs{��������������)�)�2�2�8�8�:�	<����v�w��K�	�	M��+�+�U�+�+�������)�5�1rc���|j�}|j|dd�|j|ddd��|jd��}|j|dd�y)N�colormap��newz5can't modify -colormap option after widget is createdr)r,�r r!r%r&s   r�test_configure_colormapz,AbstractToplevelTest.test_configure_colormap$sd�����������
�+�R�0����v�z�5�N�	�	P��+�+�u�+�-�������,�e�4rc��|j�}|j|d|jrdnd�|j|ddd��|jd��}|j|d|jrd�yd	�y)
N�	containerr�0�z6can't modify -container option after widget is createdrT�r2�1)r r!�wantobjectsr%r&s   r�test_configure_containerz-AbstractToplevelTest.test_configure_container,s{������������,�4�3C�3C�a��M����v�{�A�O�	�	Q��+�+��+�-�������-�D�4D�4D�q�N�#�Nrc���|j�}|j|dd�|j|ddd��|jd��}|j|dd�y)N�visualr-�defaultz3can't modify -visual option after widget is createdr)r:r/r&s   r�test_configure_visualz*AbstractToplevelTest.test_configure_visual4sd������������)�2�.����v�x��L�	�	N��+�+�Y�+�/�������*�I�6rN)r#�
__module__�__qualname__�_conv_pad_pixelsr*r0r8r<�rrrrs����2�5�O�7rrc�(�eZdZdZd�Zd�Zd�Zd�Zy)�ToplevelTest)�
background�backgroundimage�borderwidthrr,r2�cursor�height�highlightbackground�highlightcolor�highlightthickness�menu�padx�pady�relief�screen�	takefocus�tile�user:�widthc�B�tj|jfi|��Sr)�tkinter�Toplevel�root�r'�kwargss  rr zToplevelTest.createGs������	�	�4�V�4�4rc��|j�}tj|j�}|j	|d|t
��|j	|dd�y)NrK��eqr-)r rU�MenurW�
checkParamr�r'r(rKs   r�test_configure_menuz ToplevelTest.test_configure_menuJsC��������|�|�D�I�I�&����������;�������+rc�n�|j�}|jdk7r|jd�|j|dd�	tj
d}|j|dd��|j|�	�}|j|d|�y#t$r|jd�Y�YwxYw)
N�x11zNot using Tk for X11rOr-�DISPLAYzNo $DISPLAY set.z3can't modify -screen option after widget is createdr)rO)r �_windowingsystem�skipTestr!�os�environ�KeyErrorr%)r'r(�displayr)s    r�test_configure_screenz"ToplevelTest.test_configure_screenPs���������"�"�e�+��M�M�0�1������)�2�.�	.��j�j��+�G�	
���v�x��L�	�	N��+�+�W�+�-�������*�G�4���	.��M�M�,�-�	.�s�B�B4�3B4c�@�|j�}|j|dd�|jd��}t|j��}|j	|��5|j|��}|j|d|�ddd�y#1swYyxYw)NrRr-Tr5)�wid)rR)r r!�hex�winfo_id�subTest)r'r(�parentrlr)s     r�test_configure_usezToplevelTest.test_configure_use^s���������������+����t��,���&�/�/�#�$��
�\�\�c�\�
"��k�k�c�k�*�G����W�U�^�S�1�#�
"�
"�s�#(B�BN)r#r=r>�OPTIONSr r`rjrqr@rrrBrB=s���G�5�,�5�2rrBc��eZdZdZd�Zy)�	FrameTest)rCrDrErr,r2rFrGrHrIrJrLrMrNrPrQr:rSc�B�tj|jfi|��Sr)rU�FramerWrXs  rr zFrameTest.createq����}�}�T�Y�Y�1�&�1�1rN�r#r=r>rrr r@rrrtrths���G�2rrtc�"�eZdZdZd�Zd�Zd�Zy)�LabelFrameTest)rCrErr,r2rF�font�
foregroundrGrHrIrJ�labelanchor�labelwidgetrLrMrNrP�textr:rSc�B�tj|jfi|��Sr)rU�
LabelFramerWrXs  rr zLabelFrameTest.create�����!�!�$�)�)�6�v�6�6rc��|j�}|j|ddddddddd	d
ddd
�|j|dd�y)Nr}�e�en�es�n�ne�nw�s�se�sw�w�wn�ws�center)r �checkEnumParamr%�r'r(s  r�test_configure_labelanchorz)LabelFrameTest.test_configure_labelanchor�sM����������F�M���t�S�$����t�S�$��	>�	
���v�}�h�?rc��|j�}tj|jdd��}|j	|d|d��|j�y)N�Mupp�foo)r�namer~z.foo��expected)r rU�LabelrWr^�destroy)r'r(�labels   r�test_configure_labelwidgetz)LabelFrameTest.test_configure_labelwidget�s@��������
�
�d�i�i�f�5�A������
�u�v��F�
�
�
�rN)r#r=r>rrr r�r�r@rrrzrzus���G�7�@�rrzc�.�eZdZdZedk\Zedk\Zedk\Zy)�AbstractLabelTestF���N)r#r=r>�_conv_pixelsr�_clip_highlightthickness�	_clip_pad�_clip_borderwidthr@rrr�r��s'���L�)�V�3���f�$�I�"�f�,�rr�c��eZdZdZd�Zy)�	LabelTest)�activebackground�activeforeground�anchorrC�bitmaprE�compoundrF�disabledforegroundr{r|rGrHrIrJ�image�justifyrLrMrN�staterPr�textvariable�	underlinerS�
wraplengthc�B�tj|jfi|��Sr)rUr�rWrXs  rr zLabelTest.create�rwrNrxr@rrr�r��s���G�2rr�c��eZdZdZd�Zd�Zy)�
ButtonTest) r�r�r�rCr�rE�commandr�rFr;r�r{r|rGrHrIrJr�r��
overreliefrLrMrN�repeatdelay�repeatintervalr�rPrr�r�rSr�c�B�tj|jfi|��Sr)rU�ButtonrWrXs  rr zButtonTest.create�����~�~�d�i�i�2�6�2�2rc�N�|j�}|j|dddd�y)Nr;�active�disabled�normal�r r�r�s  r�test_configure_defaultz!ButtonTest.test_configure_default�s#����������F�I�x��X�NrN)r#r=r>rrr r�r@rrr�r��s��	,�G�3�Orr�c�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)�CheckbuttonTest)&r�r�r�rCr�rEr�r�rFr�r{r|rGrHrIrJr��indicatoronr��	offrelief�offvalue�onvaluer�rLrMrN�selectcolor�selectimager�rPrr��
tristateimage�
tristatevaluer��variablerSr�c�B�tj|jfi|��Sr)rU�CheckbuttonrWrXs  rr zCheckbuttonTest.create�����"�"�4�9�9�7��7�7rc�P�|j�}|j|ddddd�y)Nr�r4�ffffff@r-�
any string�r �checkParamsr�s  r�test_configure_offvaluez'CheckbuttonTest.test_configure_offvalue�s%������������Q��R��Frc�P�|j�}|j|ddddd�y)Nr�r4r�r-r�r�r�s  r�test_configure_onvaluez&CheckbuttonTest.test_configure_onvalue�s%������������A�s�B��Erc��g}g}td�D]�}tj|j�}|j	�|j|�dD]:}tj||��}|j	�|j|��<��|D�cgc]}t|d���}}|jtt|��d|�ycc}w)N��AB)rr��)�rangerUrvrW�pack�appendr��strr!�len�set)r'�frames�buttons�i�f�j�b�	variabless        r�test_unique_variablesz%CheckbuttonTest.test_unique_variables�s��������q��A��
�
�d�i�i�(�A�
�F�F�H��M�M�!�����'�'���2���������q�!��	�29�9��A�S��:��'��	�9�����S��^�,�a��;��:s�Cc���tj|j�}tj|j�}tj|dd��}tj|dd��}tj|jd��}|j�|j
|j�d�|j�|j
|j�d�y)N�test�Test1)r�r�Test2�r�r4r)	rUrvrWr��IntVar�selectr!�get�deselect)r'�f1�f2�b1�b2�vs      r�test_same_namezCheckbuttonTest.test_same_name�s���
�]�]�4�9�9�
%��
�]�]�4�9�9�
%��
�
 �
 ��&�w�
?��
�
 �
 ��&�w�
?���N�N�4�9�9�6�2��
�	�	���������!�$�
���
��������!�$rN)	r#r=r>rrr r�r�r�r�r@rrr�r��s$���G�8�G�F�<�
%rr�c��eZdZdZd�Zd�Zy)�RadiobuttonTest)%r�r�r�rCr�rEr�r�rFr�r{r|rGrHrIrJr�r�r�r�r�rLrMrNr�r�r�rPrr�r�r�r��valuer�rSr�c�B�tj|jfi|��Sr)rU�RadiobuttonrWrXs  rr zRadiobuttonTest.creater�rc�P�|j�}|j|ddddd�y)Nr�r4r�r-r�r�r�s  r�test_configure_valuez$RadiobuttonTest.test_configure_values%������������!�S�"�l�CrN)r#r=r>rrr rr@rrr�r��s���G�8�Drr�c�D�eZdZdZeZdZdZdZd�Z	d�Z
d�Zd�Zd�Z
d	�Zy
)�MenubuttonTest)r�r�r�rCr�rEr�rF�	directionr�r{r|rGrHrIrJr�r�r�rKrLrMrNr�rPrr�r�rSr�TFc�B�tj|jfi|��Sr)rU�
MenubuttonrWrXs  rr zMenubuttonTest.creater�rc	�R�|j�}|j|dddddd�y)Nr�above�below�flush�left�rightr�r�s  r�test_configure_directionz'MenubuttonTest.test_configure_direction s*����������F�K���'�6�7�	<rc�Z�|j�}|j|ddddt��y)NrG�d���r��conv�r �checkIntegerParamr�r�s  r�test_configure_heightz$MenubuttonTest.test_configure_height%s(����������v�x��d�A�C��Hrc�:�|j�}tj|jd��}|j	|d|t
��d}|j
tj�5}d|d<ddd�|�%|jtj�|�|j
tj�5}|jddi�ddd�|�&|jtj�|�yy#1swY��xYw#1swY�>xYw)N�image1)�masterr�r�rzimage "spam" doesn't exist�spam)r rU�
PhotoImagerWr^r��assertRaisesrr!�	exception�	configure)r'r(r�r�cms     r�test_configure_imagez#MenubuttonTest.test_configure_image)s���������"�"�$�)�)�(�C��������S��9�.��
�
�
�w�/�/�
0�B�$�F�7�O�1������S����.��7�
�
�
�w�/�/�
0�B����g�v�.�/�1������S����.��7��
1�
0��1�
0�s�,D�D�D�Dc��|j�}tj|d��}|j|d|t��|j�y)NrKr�r[)r rUr]r^rr�r_s   rr`z"MenubuttonTest.test_configure_menu7s:��������|�|�F��0����������;����rc�Z�|j�}|j|ddddt��y)NrS��n���rrrr�s  r�test_configure_widthz#MenubuttonTest.test_configure_width=s(����������v�w��T�1�3��GrN)r#r=r>rrrr�r�r�r�r rrr r`r%r@rrrrsA��
�G��L�#���I���7�<�
I�8��Hrrc��eZdZdd�Zd�Zy)�OptionMenuTestc�L�tj|jd|g|��i|��Sr)rU�
OptionMenurW)r'r;�valuesrYs    rr zOptionMenuTest.createDs%���!�!�$�)�)�T�7�N�V�N�v�N�Nrc��|jtd�5tj|jddd��ddd�y#1swYyxYw)Nz^unknown option -image$r�r-)r�)�assertRaisesRegexrrUr)rW�r's r�test_bad_kwargzOptionMenuTest.test_bad_kwargGs8��
�
#�
#�H�.H�
I����t�y�y�$��2�>�J�
I�
I�s�$A�A
N)r�)�ar��c)r#r=r>r r.r@rrr'r'Bs
��O�?rr'c�R�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zy
)�	EntryTest)!rCrErF�disabledbackgroundr��exportselectionr{r|rHrIrJ�insertbackground�insertborderwidth�
insertofftime�insertontime�insertwidth�invalidcommandr��placeholder�placeholderforeground�readonlybackgroundrN�selectbackground�selectborderwidth�selectforeground�showr�rPr��validate�validatecommandrS�xscrollcommandc�B�tj|jfi|��Sr)rU�EntryrWrXs  rr zEntryTest.create\rwrc�H�|j�}|j|d�y)Nr3�r �checkColorParamr�s  r�!test_configure_disabledbackgroundz+EntryTest.test_configure_disabledbackground_�����������V�%9�:rc
��|jd��}|j|ddddddd	�|j|dd
d��y)
Nr)r9r6r��������?�������@�����10p�<�2r��r �checkPixelsParamr^r�s  r� test_configure_insertborderwidthz*EntryTest.test_configure_insertborderwidthcsI�������-�����f�&9���c�1�b�%�	9�	
���� 3�R�&��Irc���|j�}|j|dddd�|j|ddd��|j|ddd��|j|dd	d
��y)Nr9rM�������@rQg�������?r�r�rPg�������?r4rTr�s  r�test_configure_insertwidthz$EntryTest.test_configure_insertwidthjs_����������f�m�S�#�u�E�����
�s�Q��?�����
�r�A��>�����
�s�Q��?rc�l�|j�}|j|d�|j|d�y)Nr:�invcmd�r �checkCommandParamr�s  r�test_configure_invalidcommandz'EntryTest.test_configure_invalidcommandqs.����������v�'7�8����v�x�0rc�H�|j�}|j|d�y)Nr=rHr�s  r�!test_configure_readonlybackgroundz+EntryTest.test_configure_readonlybackgroundvrKrc��|j�}|j|dd�|j|dd�|j|dd�y)NrA�*r-� �r r^r�s  r�test_configure_showzEntryTest.test_configure_showzs=�������������,�������+�������,rc�N�|j�}|j|dddd�y)Nr�r�r��readonlyr�r�s  r�test_configure_statezEntryTest.test_configure_state�s&����������F�G�&��*�	>rc
�T�|j�}|j|ddddddd�y)NrB�all�key�focus�focusin�focusout�noner�r�s  r�test_configure_validatez!EntryTest.test_configure_validate�s-����������F�J��u�g�y�*�f�	Frc�l�|j�}|j|d�|j|d�y)NrC�vcmdr\r�s  r�test_configure_validatecommandz(EntryTest.test_configure_validatecommand�s.����������v�'8�9����v�v�.rc�<�|j�}|jdd�|j|j��|j	dd�|j|j
�d�|j|j��|jd�|jd�|j|j
�d�|j	dd�|j|j
�d	�|j�|j|j��|j	dd�|jd�|j|j
�d
�|jd�|j|j
�d�|jd�|j|j
�d
�|jd�|j|j
�d�|jd�y�Nr�12345�endr4r��2�r��4�1234�234��2345�r �insert�assertFalse�selection_present�selection_ranger!�
selection_get�
assertTrue�selection_from�selection_to�selection_clear�selection_adjustr�s  r�test_selection_methodsz EntryTest.test_selection_methods�s���������
�
�a��!�����1�1�3�4����q�%�(�����-�-�/��9�����0�0�2�3����a� ����A������-�-�/��5����q�!�$�����-�-�/��5���� �����1�1�3�4����q�%�(�����"�����-�-�/��8�����"�����-�-�/��7�����"�����-�-�/��8�����"�����-�-�/��9�����"rN)r#r=r>rrr rJrVrYr^r`rerhrprsr�r@rrr2r2LsC���G�2�;�J�@�1�
;�-�>�
F�
/�
#rr2c�h�eZdZdZd�ZdZd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zy)�SpinboxTest).r�rCrE�buttonbackground�buttoncursor�buttondownrelief�buttonupreliefr�rFr3r�r4r{r|�format�fromrHrIrJ�	incrementr5r6r7r8r9r:r�r;r<rNr=r�r�r>r?r@r�rPr��torBrCr*rS�wraprDc�B�tj|jfi|��Sr)rU�SpinboxrWrXs  rr zSpinboxTest.create�������t�y�y�3�F�3�3rNc�H�|j�}|j|d�y)Nr�rHr�s  r�test_configure_buttonbackgroundz+SpinboxTest.test_configure_buttonbackground�s����������V�%7�8rc�H�|j�}|j|d�y)Nr��r �checkCursorParamr�s  r�test_configure_buttoncursorz'SpinboxTest.test_configure_buttoncursor������������f�n�5rc�H�|j�}|j|d�y)Nr��r �checkReliefParamr�s  r�test_configure_buttondownreliefz+SpinboxTest.test_configure_buttondownrelief�s����������f�&8�9rc�H�|j�}|j|d�y)Nr�r�r�s  r�test_configure_buttonupreliefz)SpinboxTest.test_configure_buttonuprelief�s����������f�&6�7rc���|j�}|j|dd�|j|dd�|j|dd�|j|dd�|j|dd�|j|dd�|j|dd�|j|dd	�|j|dd
�|j|dd�|j|dd�|j|dd
�y)Nr�z%2fz%2.2fz%.2fz%2.fz%2e-1fz2.2z%2.-2fz%-2.02fz% 2.02fz	% -2.200fz%09.200fz%d�r r^r%r�s  r�test_configure_formatz!SpinboxTest.test_configure_format�s�������������%�0������'�2������&�1������&�1����v�x��:����v�x��7����v�x��:������)�4������)�4������+�6������*�5����v�x��6rc���|j�}|j|dd�|j|dddd�tdk\r|j|ddd	�
�y|j	|ddd��y)
Nr�gY@r�����ffffff$@�ffffff'@r���rr��*-to value must be greater than -from valuer�r r^�checkFloatParamrr%r�s  r�test_configure_fromzSpinboxTest.test_configure_from�sp������������e�,����V�V�S�$��=����� � ����s� �C��"�"��F�C�G�
#�
Irc	�R�|j�}|j|dddddd�y)Nr����r4r�g������)@r�r r�r�s  r�test_configure_incrementz$SpinboxTest.test_configure_increment�s'����������V�[�"�a��t�Q�Grc���|j�}|j|dd�|j|dddd�tdk\r|j|ddd	�
�y|j	|ddd��y)
Nr�gY�r�r�r�r�r�i8���rr�r�rr�r�s  r�test_configure_tozSpinboxTest.test_configure_to�sp�������������/����V�T�3��d�;����� � ���t�d� �C��"�"��D�$�G�
#�
Irc���|j�}|j|dd�|j|dd�|j|ddd��|j|ddd��|j|dd�y)Nr*r-zmon tue wed thur)�mon�tue�wed�thurr�)�*g��Q�	@r-r�z42 3.14 {} {any string})r r!r^r�s  r�test_configure_valuesz!SpinboxTest.test_configure_values�sy������������)�2�.������*<�=������*G�!3�	�	5������*F�!:�	�	<������"�-rc�H�|j�}|j|d�y)Nr��r �checkBooleanParamr�s  r�test_configure_wrapzSpinboxTest.test_configure_wrap�����������v�v�.rc��|j�}|j|jd��|jtj
|jd�|jtj
|jd�|jt|j�|jt|jdd�y)Nr�noindexr4)r �assertIsBoundingBox�bboxrrUr�	TypeErrorr�s  r�	test_bboxzSpinboxTest.test_bbox	s��������� � ����Q��0����'�*�*�F�K�K��C����'�*�*�F�K�K��>����)�V�[�[�1����)�V�[�[�!�Q�7rc��|j�}|jdd�|j|j��|j	dd�|j|j
�d�|j|j��|jd�|jd�|j|j
�d�|j	dd�|j|j
�d	�|j�|j|j��|j	dd�|jd�|j|j
�d
�|jd�|j|j
�d�|jd�|j|j
�d
�|jd�|j|j
�d�yrurr�s  rr�z"SpinboxTest.test_selection_methodss���������
�
�a��!�����1�1�3�4����q�%�(�����-�-�/��9�����0�0�2�3����a� ����A������-�-�/��5����q�!�$�����-�-�/��5���� �����1�1�3�4����q�%�(�����"�����-�-�/��8�����"�����-�-�/��7�����"�����-�-�/��8�����"�����-�-�/��9rc�(�|j�}|j|j�d�|jd�|j|j�d�|jd�|j|j�d�y)Nro�buttonup�
buttondown)r r!�selection_elementr�s  r�test_selection_elementz"SpinboxTest.test_selection_element)st�����������1�1�3�V�<�� � ��,�����1�1�3�Z�@�� � ��.�����1�1�3�\�Br)r#r=r>rrr rer�r�r�r�r�r�r�r�r�r�r�r�r�r@rrr�r��s[���G�"4���9�6�:�8�
7�	I�H�	I�	.�/�8�:�0Crr�c��eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
ed	d
�d��Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�TextTest))�autoseparatorsrC�blockcursorrErF�endliner4r{r|rGrHrIrJ�inactiveselectbackgroundr5r6r7r8�insertunfocussedr9�maxundorLrMrNr>r?r@�setgrid�spacing1�spacing2�spacing3�	startliner��tabs�tabstylerP�undorSr�rD�yscrollcommandc�B�tj|jfi|��Sr)rU�TextrWrXs  rr zTextTest.createB����|�|�D�I�I�0��0�0rc�H�|j�}|j|d�y)Nr�r�r�s  r�test_configure_autoseparatorsz&TextTest.test_configure_autoseparatorsE�����������v�'7�8rc�H�|j�}|j|d�y)Nr�r�r�s  r�test_configure_blockcursorz#TextTest.test_configure_blockcursorI�����������v�}�5rc�~�|j�}djd�td�D��}|jd|�|j	|ddd��|j	|dd	d��|j|dd
d��|j	|dd
�|j	|dd�|j|ddd��y)N�
c3� K�|]}d���y�w�zLine %dNr@��.0r�s  r�	<genexpr>z2TextTest.test_configure_endline.<locals>.<genexpr>O�����7�J�q��J���rrwr�r�r-r�r�r�expected integer but got "spam"rrSr���
�1-startline must be less than or equal to -endline�r �joinr�r�r^r%�r'r(rs   r�test_configure_endlinezTextTest.test_configure_endlineMs���������y�y�7�E�#�J�7�7���
�
�e�T�"�����	�3���<�����	�3���<����v�y�&�8�	�	:�����	�2�.������R�0����v�y�"�J�	�	Lrc��|j�}|j|ddddd�|j|ddd��|j|dd	d��y)
NrGr������LY@�fffff�Y@�3crr4r�rrTr�s  rrzTextTest.test_configure_heightZsM����������f�h��U�E�4�H������$���;������!�a��8rc�N�|j�}|j|dddd�y)Nr�rr}r��r rr�s  r�test_configure_maxundozTextTest.test_configure_maxundo`s#����������v�y�!�Q��;rc�H�|j�}|j|d�y)Nr�rHr�s  r�'test_configure_inactiveselectbackgroundz0TextTest.test_configure_inactiveselectbackgroundds����������V�%?�@rr�rOc�N�|j�}|j|dddd�y)Nr��hollowro�solidr�r�s  r�test_configure_insertunfocussedz(TextTest.test_configure_insertunfocussedhs'����������F�$6�$�f�g�	7rc	�T�|j�}|j|dddddd��y)Nr?rMrNrPrQFr�r rUr�s  r� test_configure_selectborderwidthz)TextTest.test_configure_selectborderwidthns0����������f�&9�!�3��E��	�	?rc�z�|j�}|j|ddddd�|j|ddd��y)	Nr���ffffff5@皙����6@�0.5c���rr�rTr�s  r�test_configure_spacing1z TextTest.test_configure_spacing1ss9����������f�j�"�d�D�&�I�����
�B���;rc�z�|j�}|j|ddddd�|j|ddd��y)	Nr�r}皙����@�ffffff@z0.1cr�rr�rTr�s  r�test_configure_spacing2z TextTest.test_configure_spacing2xs9����������f�j�!�S�#�v�F�����
�B���;rc�z�|j�}|j|ddddd�|j|ddd��y)	Nr�rr
rrr�rr�rTr�s  r�test_configure_spacing3z TextTest.test_configure_spacing3}s9����������f�j�"�d�D�&�I�����
�C�!��<rc�~�|j�}djd�td�D��}|jd|�|j	|ddd��|j	|dd	d��|j|dd
d��|j	|dd
�|j	|dd�|j|ddd��y)Nr�c3� K�|]}d���y�wr�r@r�s  rr�z4TextTest.test_configure_startline.<locals>.<genexpr>�r�r�rrwr�r�r-r�r�rr�rr�r�rS�Fr�r�r�s   r�test_configure_startlinez!TextTest.test_configure_startline�s���������y�y�7�E�#�J�7�7���
�
�e�T�"������S�2��>������S�2��>����v�{�F�8�	�	:������R�0�����	�2�.����v�{�B�J�	�	Lrc�L�|j�}|j|ddd�y�Nr�r�r�r�r�s  rrhzTextTest.test_configure_state��!����������F�G�Z��Brc�"�|j�}|j|dd�|j|ddt|j�dk\rdnd��|j|ddd��|j	|dd	t
j
d	��
�y)Nr�)r�g33333�4@�1i�2iz10.2 20.7 1i 2i�r�rO�)z10.2z20.7r r!r�z2c left 4c 6c center)�2cr�4c�6cr�rr)r r^rrWr%�EXPECTED_SCREEN_DISTANCE_ERRMSGr�r�s  r�test_configure_tabszTextTest.test_configure_tabs�s�������������(@�A������(9�$5�d�i�i�$@�J�$N�":�&B�	�	D�	
�����(>�!E�	�	G����v�v�v�6�=�=�f�E�	�	Grc�L�|j�}|j|ddd�y)Nr��tabular�
wordprocessorr�r�s  r�test_configure_tabstylez TextTest.test_configure_tabstyle�s!����������F�J�	�?�Krc�H�|j�}|j|d�y)Nr�r�r�s  r�test_configure_undozTextTest.test_configure_undo�r�rc��|j�}|j|dd�|j|ddd��|j|ddd��y)NrSr#r$r4r�r)r rr^r�s  rr%zTextTest.test_configure_width�sG����������v�w��4���������:�������Q��7rc�N�|j�}|j|dddd�y)Nr��charro�wordr�r�s  rr�zTextTest.test_configure_wrap�s#����������F�F�F�F�F�Crc���|j�}|j|jd��|j|jd��|j	t
j|jd�|j	t
j|jd�|j	t|j�|j	t|jdd�y)Nz1.1rwr�)r r�r��assertIsNonerrUrr�r�s  rr�zTextTest.test_bbox�s��������� � ����U�!3�4����&�+�+�e�,�-����'�*�*�F�K�K��C����'�*�*�F�K�K��>����)�V�[�[�1����)�V�[�[�%��?rN)r#r=r>rrr r�r�r�rrrrrr
rrrrrhr(r,r.r%r�r�r@rrr�r�2s����G�1�9�6�L�9�<�A���A��7��7�
?�
<�
<�
=�
L�C�
G�L�/�8�D�@rr�c��eZdZdZeZdZd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zedd�d��Zy)�
CanvasTest)rCrE�closeenough�confinerFrGrHrIrJr5r6r7r8r9�offsetrN�scrollregionr>r?r@r�rPrD�xscrollincrementr��yscrollincrementrSTc�B�tj|jfi|��Sr)rU�CanvasrWrXs  rr zCanvasTest.create�r�rc	�\�|j�}|j|dddddt��y)Nr7��333333@rX���r)r r�rr�s  r�test_configure_closeenoughz%CanvasTest.test_configure_closeenough�s/����������V�]�B��S�"�"'�	�	)rc�H�|j�}|j|d�y)Nr8r�r�s  r�test_configure_confinez!CanvasTest.test_configure_confine������������v�y�1rc
��|j�}|j|dd�|j|dddddddd	d
d�|j|dd�|j|dd
�|j	|dd�y)Nr9z0,0r�r�r�r�r�r�r�r�r�z10,20z#5,6r)r r!r�r^r%r�s  r�test_configure_offsetz CanvasTest.test_configure_offset�sz������������)�5�1�������T�3��c�4��d�H�	F������'�2������&�1����v�x��8rc�6�|j�}|j|dd�|j|ddd��|j|dd�|j|ddd��|j|dd	�|j|dd
�|j|dd�y)Nr:z0 0 200 150)rrr��r�r-rzbad scrollRegion "spam"r)rrr�r)rrr�)rrr�rJrr�r�s  r�test_configure_scrollregionz&CanvasTest.test_configure_scrollregion�s�������������
�>������0@�!.�	�	0�������3����v�~�v�&?�	�	A����v�~�7J�K����v�~�{�C����v�~�7J�Krc�P�|j�}|j|dddd��y)Nr�r�r�z0bad state value "{}": must be normal or disabledrr�r�s  rrhzCanvasTest.test_configure_state�s,����������F�G�Z��I�	�	Krc
�T�|j�}|j|ddddddd�y)Nr;�(rg������D@g������E@i���z0.5ir	r�s  r�test_configure_xscrollincrementz*CanvasTest.test_configure_xscrollincrement��-����������f�&8� �!�T�4��f�	>rc
�T�|j�}|j|ddddddd�y)Nr<r�r�ffffff&@g333333+@r�z0.1ir	r�s  r�test_configure_yscrollincrementz*CanvasTest.test_configure_yscrollincrement�rPrc��dD]-}||��}|j|j|d�|��/|jt|d��y)N)�bevel�miterr)�	joinstylerWr�r!�itemcgetrr)r'r0�factoryrWr�s     r�_test_option_joinstylez!CanvasTest._test_option_joinstyle�sH��2�I��)�,�A����Q�Z�Z��;�7��C�3�	
���(�G�v��>rc�4�dD]-}||��}|j|j|d�d��/dD]-}||��}|j|j|d�d��/|dd�	�}|j|j|d�d�|j|j|d
�d�|dd�	�}|j|j|d�d�|j|j|d
�d�|jt|d
��y)N)r4Tr6�true�yes�on)�smoothr`r])rFr3�false�no�offr3T�)r`�
splinestepre�30�rawrrX)r'r0rZr`r�s     r�_test_option_smoothzCanvasTest._test_option_smooths���7�F��v�&�A����Q�Z�Z��8�4�f�=�8�:�F��v�&�A����Q�Z�Z��8�4�c�:�:�
�4�B�/��������A�x�0�&�9�������A�|�4�d�;��5�R�0��������A�x�0�%�8�������A�|�4�d�;����(�G�F��;rc
��|j�}|jdddd�}|j|j|�gd��|j|j	|�d�|jgd��}|j|j|�gd��|j|j	|�d	�|jd
d�}|j|j|�gd��|j|j	|�d
�|jddg�}|j|j|�gd��|j|j	|�d�|jt|jddd�|jt|jgd��|jt|jdddddd�|jt|jgd��|jt|jdd�|jt|jddg�|jt|j�|jt|jg�y)NrrdrRr�)�4@�$@�N@�>@)��	�=�)�rqrp�)�5@�&@��N@�?@)rr��>� ��ry�rx�)�6@�(@�O@�@@)rrrs�?�!��r��r��
)�7@�*@��O@��@@)r{r}�@�"�rrdrRrNrS�rrdrNrSrRr�)r �create_rectangler!�coordsr�rr�
IndexError)r'r0�i1�i2�i3�i4s      r�test_create_rectanglez CanvasTest.test_create_rectangles����K�K�M��
�
�
��B��B�
/��������"��'?�@���������_�5�
�
�
� 0�
1��������"��'?�@���������%5�6�
�
�
��(�
3��������"��'?�@���������%5�6�
�
�
��8� 4�
5��������"��'?�@���������%5�6����(�A�$6�$6��B��C����(�A�$6�$6��E����(�A�$6�$6��B��B��B�O����(�A�$6�$6�8P�Q����(�A�$6�$6��B�?����(�A�$6�$6��R��A����*�a�&8�&8�9����*�a�&8�&8�"�=rc	�r��|j���jdddddd�}|j�j|�gd��|j�j	|�d�|j�j|d	�d
�|j�j|d�d�|j�j|d
�d�|j�j|d�d�|j�j|d�d�|j�j|d�d��jgd��}|j�j|�gd��|j�j	|�d��jddd�}|j�j|�gd��|j�j	|�d��jgd��}|j�j|�gd��|j�j	|�d�|j
t�jddd�|j
t�jgd ��|j
t�jdd�|j
t�jddg�|j
t�j�|j
t�jg�d!D]:}�jdddd|�"�}|j�j|d	�|��<�jddddd#gd$��%�}|j�j|d�d&�|j
t�jddddd'�"�d(D]:}�jdddd|�)�}|j�j|d
�|��<|j
t�jddddd'�)�|j��fd*��|j��fd+��y),NrrdrNrSrRr��rjrm�D@�I@rlrk��r�rx�4�arrowro�
arrowshapez8 10 3�capstyle�buttrWrr`r3re�12�rrrq�)�3rprs�rtrwg�D@g�I@rvru�rnror��5rz�r�r�r|�r~r�gE@gJ@r�r�rr�r��6�r�)�+r�r��r�r�g�E@g�J@r�r��rrrs�A�7r�)ro�first�last�both)r�r�)r�r�r})r�r�z10 15 5r)r��
projectingr)r�c�(���jdi|��S�Nr���create_line�rYr0s �r�<lambda>z-CanvasTest.test_create_line.<locals>.<lambda>Ys�������!P��!Prc�(���jdi|��S)N)rrdrRr�r�r�s �rr�z-CanvasTest.test_create_line.<locals>.<lambda>[s�������!H��!Hr)r r�r!r�r�rYrrr�r[rh)	r'r�r�r�r�r�r�r�r0s	        @r�test_create_linezCanvasTest.test_create_line-sg����K�K�M��
�]�]�2�r�2�r�2�r�
2��������"��'K�L���������_�5�������B��0�&�9�������B��5�x�@�������B�
�3�V�<�������B��4�g�>�������B��1�3�7�������B��5�t�<�
�]�]�3�
4��������"��'K�L���������_�5�
�]�]�8�X�x�
8��������"��'K�L���������%5�6�
�]�]�9�
:��������"��'K�L���������%5�6����(�A�M�M�2�r�2�>����(�A�M�M�<�@����(�A�M�M�2�r�:����(�A�M�M�B��8�<����*�a�m�m�4����*�a�m�m�R�8�4�E��
�
�b�"�b�"�E�
�:�A����Q�Z�Z��7�3�U�;�5�
�M�M�"�b�"�b��K�M�P��������A�|�4�i�@����(�A�M�M�2�r�2�r���P�5�H��
�
�b�"�b�"�x�
�@�A����Q�Z�Z��:�6��A�6�	
���(�A�M�M�2�r�2�r�F��S��#�#�A�P�	R�� � ��H�	Jrc	�4��|j��tdk\}�jddddddd�	�}|j�j	|�gd
��|j�j|�d�|j�j
|d�d
�|j�j
|d�d�|j�j
|d�d��jgd�d�	�}|j�j	|�gd��|j�j|�d��jdddd�	�}|j�j	|�gd��|j�j|�d��jgd�d�	�}|j�j	|�gd��|j�j|�d�|jt�jddd�|jt�jgd��|jt�j�|jt�jg�|j��fd��|j��fd��y) Nr�rrdrNrSrRr��red)�outliner�r�rWrr`r3rer�r�r�r�rzr�r|r�r�r�r�r�r�c�(���jdi|��Sr���create_polygonr�s �rr�z0CanvasTest.test_create_polygon.<locals>.<lambda>{����!1��!1�!1�!S�F�!Src�(���jdi|��Sr�r�r�s �rr�z0CanvasTest.test_create_polygon.<locals>.<lambda>}r�r)r rr�r!r�r�rYrrr�r[rh)r'�tk87r�r�r�r�r0s      @r�test_create_polygonzCanvasTest.test_create_polygon]s����K�K�M���V�#���
�
�b�"�b�"�b�"�e�
�
D��������"��'K�L���������_�5�������B��4�g�>�������B��1�3�7�������B��5�t�<�
�
�
�6��
�
F��������"��'K�L���������_�5�
�
�
�h��(�E�
�
J��������"��'K�L���������%5�6�
�
�
�<�e�
�
L��������"��'K�L���������%5�6����(�A�$4�$4�b�"�b�A����(�A�$4�$4�l�C����*�a�&6�&6�7����*�a�&6�&6��;��#�#�A�S�	U�� � ��S�	Urc	��|j�}|jddddddd��}|j|j|�gd	��|j|jd�gd	��|j|j	|�d
�|j|ddddd
d�|j|j|�gd��|j|j	|�d�|j|gd��|j|j|�gd��|j|ddd�|j|j|�gd��|j|gd��|j|j|�gd��|j|dddd�|j|j|�gd��|j|j	|�d�|jt|j|ddd�|jt|j|gd��|jt|j|dd�|jt|j|ddg�|j|dddd�|j|�}|j|t�|jt|�d�|j|d d�td�D]}|j||t��y)!NrrdrNrSrRr�r��tagsr�r�r�P�Z)r�rlg�Q@gT@g�V@r�)�0�&�\�Rr�r�rzr�r|r�r�r�)rjrmrlrk)r�r�rxryr��20�30c�60irQr�r)r r�r!r�r�rr�assertIsInstance�listr�r�r)r'r0r�r�s    r�test_coordszCanvasTest.test_coordssb���K�K�M��
�M�M�"�b�"�b�"�b�s�M�;��������!��&J�K�������#��(L�M���������O�4�	����B��B��B��+�������!��&J�K���������$4�5�	����,�-�������!��&J�K�	����H�h��1�������!��&J�K�	����2�3�������!��&J�K�	����B��B��#�������!��&>�?���������O�4����(�A�H�H�a��R��<����(�A�H�H�a��>����(�A�H�H�a��R�8����(�A�H�H�a�"�b��:�	����D�%���.����!������f�d�+�����V��a�(�������B�'��q��A��!�!�&��)�U�3�rr�rOc�D�|j�}|jddddd��}|jddddd��}|j|�\}}}}|j|�\}}}}|jddd	�|j|�\}	}
}}|j|�\}}}}|j	|	d�|j	|
d	�|j	||z
||	z
�|j	||z
||
z
�|j||�|jdd�
�|j|�\}
}}}|j|�\}}}}|j	|d�|j	||�|j	||	z
||
z
�|j	||
z
||z
�y)Nr4r�groupr�rdrSrr�r)�y)r r�r��movetor!�	tag_lower)r'r(r�r��x1�y1�_�x2�y2�x1_2�y1_2�x2_2�y2_2�x1_3�y1_3�x2_3�y2_3s                 r�test_movetozCanvasTest.test_moveto�s��������
�
$�
$�Q��2�r��
$�
@��
�
$�
$�R��R��'�
$�
B���{�{�2����B��1��{�{�2����B��1��
�
�g�s�C�(�!�;�;�r�?���d�A�q�!�;�;�r�?���d�A�q�����s�#�����s�#�����b��$��+�.�����b��$��+�.�����R� ��
�
�g��
�$�!�;�;�r�?���d�A�q�!�;�;�r�?���d�A�q�����r�"�����t�$�������d�T�k�2�������d�T�k�2rN)r#r=r>rrrr��
_stringifyr rCrErHrKrhrOrSr[rhr�r�r�r�rr�r@rrr6r6�s}���G��L��J�3�)�
2�9�
L�K�
>�
>�
?�
<�>�6.J�` U�D#4�J��A��3��3rr6c��eZdZdZd�Zd�Zeddd�ej�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�ListboxTest)�activestylerCrErFr�r4r{r|rGrHrIrJr��listvariablerNr>r?r@�
selectmoder�r�rPrSrDr�c�B�tj|jfi|��Sr)rU�ListboxrWrXs  rr zListboxTest.create�r�rc�N�|j�}|j|dddd�y)Nr��dotboxror�r�r�s  r�test_configure_activestylez&ListboxTest.test_configure_activestyle�s&����������F�M�$�f�k�	;rr�rOr}c��|j�}tj|j�}|j	|d|�y)Nr�)r rU�	DoubleVarrW�checkVariableParam)r'r(�vars   r�test_configure_listvariablez'ListboxTest.test_configure_listvariable�s3�����������	�	�*��������<rc��|j�}|j|dd�|j|dd�|j|dd�|j|dd�y)Nr��single�browse�multiple�extendedrdr�s  r�test_configure_selectmodez%ListboxTest.test_configure_selectmode�sM������������h�7������h�7������j�9������j�9rc�L�|j�}|j|ddd�yrr�r�s  rrhz ListboxTest.test_configure_state�rrc��|j�}|jtd�5|jd�ddd�dj	�}|j
dg|���t
|�D]\}}|j||���|jt�5|j�ddd�|jtd�5|jd�ddd�t|j�dk\rd	}nd
}|j|jdd�g|�d���|j|jdd�g|�d���|j|jd
d�g|�d���|jd�}|j|t�|j�D]v\}}|jt!|�d�t!|�dk(s�0|j||jd|��|j|d|j#d|���xy#1swY���xYw#1swY���xYw#1swY��gxYw)Nzitem number "0" out of rangerz)red orange yellow green blue white violetrw)rCzbad listbox index "red"r�r")rCr-r-r-)rCrC�
Backgroundr-rC�violetz@0,0)r�r}r}r�)r r,r�
itemconfigure�splitr��	enumeraterr�rrWr!r��dict�items�assertInr�rY)	r'r(�colorsr��color�prefix�d�kr�s	         r�test_itemconfigurezListboxTest.test_itemconfigure�s��������
�
#�
#�H�.L�
M�� � ��#�N�<�B�B�D����
�
�e�%�f�%�!�&�)�H�A�u�� � ��u� �5�*�
�
�
�y�
)�� � �"�*�
�
#�
#�H�.G�
H�� � ��'�I��T�Y�Y�'�:�5�/�F�C�F�����-�-�a��>�)�6�)�5�)�	+�����-�-�e�\�B�,�6�,�8�,�	.�����-�-�f�l�C�)�6�)�5�)�	+�
� � ��#�����a��&��G�G�I�D�A�q��M�M�#�a�&�&�)��1�v��{�� � ��F�$8�$8��A�$>�?�� � ��1��v���q�!�'<�=�	�/N�
M��*�
)��
H�
H�s#�H+�H8�I�+H5�8I�Ic��|j�}|jddddd�|jd
i||i��|j|jd|�d|�|j|j	d|�|�|jtd�5|jd
i|d	i��ddd�y#1swYyxYw)Nrwr/r�r0rrr�zunknown color name "spam"r)r)r r�rr!rYr,r)r'r�r�r(s    r�check_itemconfigurezListboxTest.check_itemconfigures���������
�
�e�S�#�s�C�0�����0�4��-�0�����-�-�a��6�q�9�5�A��������D�1�5�9�
�
#�
#�H�.I�
J� �F� � �5�t�V�n�5�K�
J�
J�s�B5�5B>c�(�|jdd�y)NrC�#ff0000�rr-s r�test_itemconfigure_backgroundz)ListboxTest.test_itemconfigure_background���� � ��y�9rc�(�|jdd�y)N�bgrrr-s r�test_itemconfigure_bgz!ListboxTest.test_itemconfigure_bg���� � ��y�1rc�(�|jdd�y)N�fg�#110022rr-s r�test_itemconfigure_fgz!ListboxTest.test_itemconfigure_fgrrc�(�|jdd�y)Nr|rrr-s r�test_itemconfigure_foregroundz)ListboxTest.test_itemconfigure_foregroundrrc�(�|jdd�y)Nr>rrr-s r�#test_itemconfigure_selectbackgroundz/ListboxTest.test_itemconfigure_selectbackground���� � �!3�Y�?rc�(�|jdd�y)Nr@z#654321rr-s r�#test_itemconfigure_selectforegroundz/ListboxTest.test_itemconfigure_selectforegroundr%rc�R�|j�}|jdgd�td�D����|j�|j	|jd��|j
|jd��|j
|jd��|jt|j
d�|jt|j
d�|jt|j
�|jt|j
dd�y)Nrc3�&K�|]	}d|z���y�w�zel%dNr@r�s  rr�z'ListboxTest.test_box.<locals>.<genexpr>�����4�8�a�v��z�8���r�r�r�r�r4)
r r�r�r�r�r�r4rrr��r'�lbs  r�test_boxzListboxTest.test_boxs���
�[�[�]����	�	�!�5�4�5��8�4�5�
���	�� � ������,����"�'�'�"�+�&����"�'�'�"�+�&����(�B�G�G�Y�7����(�B�G�G�T�2����)�R�W�W�-����)�R�W�W�a��3rc�r�|j�}|jdgd�td�D����|jdtj
�|j
dd�|j
d�|j|j�d�|jt|jd�y)Nrc3�&K�|]	}d|z���y�wr*r@r�s  rr�z0ListboxTest.test_curselection.<locals>.<genexpr>+r+r,r�r�r�rO)r�ryr�rO)r r�r�r�rU�END�
selection_setr!�curselectionrr�r-s  r�test_curselectionzListboxTest.test_curselection)s���
�[�[�]����	�	�!�5�4�5��8�4�5�
���1�g�k�k�*�
����A��
�����������*�L�9����)�R�_�_�a�8rc�T�|j�}|jdgd�td�D����|j|j	d�d�|j|j	d�d�|j|j	d�d�|j|j	d�d	�|j|j	d
�d	�|j|j	dd�d�|j|j	dd�d
�|j|j	dd�d�|j|j	dd�d�|jt|jd�|jt|jd�|jt|j�|jt|jdd�|jt|jddd�|jt|jd�y)Nrc3�&K�|]	}d|z���y�wr*r@r�s  rr�z'ListboxTest.test_get.<locals>.<genexpr>4r+r,r��el0ry�el3rw�el7r-r�r})r9�el4�el5)r<�el6r:r@)r8r�r4r�rA)r r�r�r!r�rrr�r-s  r�test_getzListboxTest.test_get2s���
�[�[�]����	�	�!�5�4�5��8�4�5���������E�*���������E�*����������.���������B�'���������R�(��������1��'<�=��������5�)�+@�A��������1��r�*��������1��x�0����(�B�F�F�I�6����(�B�F�F�D�1����)�R�V�V�,����(�B�F�F�E�9�=����)�R�V�V�Q��1�5����(�B�F�F�C�0rN)r#r=r>rrr r�rr�test_configure_justifyr�rrhrrrrr r"r$r'r/r5r>r@rrr�r��s{��	�G�4�;�
2�[��A�q�1�2F�2]�2]�^��=�
:�C�>�>6�:�2�2�:�@�@�
4�9�1rr�c�\�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zy)�	ScaleTest)r�rC�bigincrementrEr�rF�digitsr{r|r�rHrIrJr��length�orientrNr�r��
resolution�	showvalue�sliderlength�sliderreliefr�rP�tickintervalr��troughcolorr�rS�verticalc�B�tj|jfi|��Sr)rU�ScalerWrXs  rr zScaleTest.createSrwrc�N�|j�}|j|dddd�y)NrBg������(@g������7@rr�r�s  r�test_configure_bigincrementz%ScaleTest.test_configure_bigincrementVs#����������V�^�T�4��Drc�L�|j�}|j|ddd�y)NrCr}rrr�s  r�test_configure_digitszScaleTest.test_configure_digitsZs!����������v�x��A�6rc��|j�}t|j�dk\rtnt}|j|dddd|��y)N)r�rOr�r�r�������-@�333333.@r)r rrWrrr�)r'r(rs   rr�zScaleTest.test_configure_from^s?�������)�$�)�)�4�
�B�u������V�V�S�$��4��Hrc�p�|j�}|j|dd�|j|dd�y)Nr�r�r-rdr�s  r�test_configure_labelzScaleTest.test_configure_labelcs-�������������6�������,rc�P�|j�}|j|ddddd�y)NrD�gffffff`@g33333�`@�5ir	r�s  r�test_configure_lengthzScaleTest.test_configure_lengthhs%����������f�h��U�E�4�Hrc�P�|j�}|j|ddddd�y)NrFg������@rg������@rPr�r�s  r�test_configure_resolutionz#ScaleTest.test_configure_resolutionls%����������V�\�3��3��Crc�H�|j�}|j|d�y)NrGr�r�s  r�test_configure_showvaluez"ScaleTest.test_configure_showvalueps����������v�{�3rc	�R�|j�}|j|dddddd�y)NrHr�rR�333333/@rB�3mr	r�s  r�test_configure_sliderlengthz%ScaleTest.test_configure_sliderlengthts*����������f�n� �$��b�$�	8rc�H�|j�}|j|d�y)NrIr�r�s  r�test_configure_sliderreliefz%ScaleTest.test_configure_sliderreliefyr�rc	��|j�}|j|dddddt��|j|dddt�	�y)
NrJr4�333333@rrrrPr�)r�r)r r�rr^r�s  r�test_configure_tickintervalz%ScaleTest.test_configure_tickinterval}sK����������V�^�Q��S�!�"-�	�	/�������Q�(�	�	*rc	�\�|j�}|j|dddddt��y)Nr�i,rTrUr�r)r r�rr�s  rr�zScaleTest.test_configure_to�s/����������V�T�3��d�C�"-�	�	/rN)r#r=r>rr�default_orientr rPrRr�rWr[r]r_rcrerhr�r@rrrArAFsP���G� �N�2�E�7�I�
-�
I�D�4�8�
6�*�/rrAc�:�eZdZdZeZdZdZd�Zd�Z	d�Z
d�Zd�Zy	)
�
ScrollbarTest)r��activereliefrCrEr�rF�elementborderwidthrHrIrJ�jumprErNr�r�rPrKrSTrLc�B�tj|jfi|��Sr)rU�	ScrollbarrWrXs  rr zScrollbarTest.create�s��� � ����5�f�5�5rc��|j�}|j|dddd�tdk\r|jnd}|j	|dd|��y)Nrnrg�ffffff@�1mr�rPr�)r rUr�_default_pixelsr^�r'r(r�s   r�!test_configure_elementborderwidthz/ScrollbarTest.test_configure_elementborderwidth�sM����������f�&:�C��d�K�+5��+?�4�'�'�R������ 4�b�8��Lrc�R�|j�}|j|ddddd��y)NrErL�
horizontal�orientationT)�fullname�allow_emptyr�r�s  r�test_configure_orientz#ScrollbarTest.test_configure_orient�s.����������F�H�j�,�%2��	�	Frc�8�|j�}dD]3}|j|�|j|j�|��5|jd�|j|j��|j	t
|jdd�y)N)�arrow1�slider�arrow2r-rr�)r �activater!r4rr�)r'�sbr�s   r�
test_activatezScrollbarTest.test_activate�sq��
�[�[�]��/�A��K�K��N����R�[�[�]�A�.�0�	���B�����"�+�+�-�(����)�R�[�[�(�H�Erc���|j�}|jdd�|j|j�d�|j	t
|jdd�|j	t
|jdd�|j	t
|jdd�|j	t|jd�|j	t|jddd�y)	N皙�����?皙�����?)r�r��abc�defg333333�?gffffff�?g�������?)r r�r!r�rrr�)r'r�s  r�test_setzScrollbarTest.test_set�s���
�[�[�]��
���s�C���������:�.����(�B�F�F�E�5�9����(�B�F�F�C��7����(�B�F�F�C��6����)�R�V�V�S�1����)�R�V�V�S�#�s�;rN)
r#r=r>rrrr�r�rjr rwr}r�r�r@rrrlrl�s6���G��L��J��N�6�M�F�
F�<rrlc�
�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	e
dd	d
�d��Ze
dd	d
�d��Ze
dd	d
�d
��Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Z d!�Z!y")#�PanedWindowTest)rCrErF�	handlepad�
handlesizerG�opaqueresizerE�proxybackground�proxyborderwidth�proxyreliefrN�
sashcursor�sashpad�
sashrelief�	sashwidth�
showhandlerSryc�B�tj|jfi|��Sr)rU�PanedWindowrWrXs  rr zPanedWindowTest.create�r�rc	�R�|j�}|j|dddddd�y)Nr�r}rrrBrtr	r�s  r�test_configure_handlepadz(PanedWindowTest.test_configure_handlepad�s'����������f�k�1�c�3��D�Irc
�V�|j�}|j|ddddddd��y)	Nr�r�g������"@g333333%@rB�2mFrr	r�s  r�test_configure_handlesizez)PanedWindowTest.test_configure_handlesize�s1����������f�l�A�s�D�"�d�#(�	�	*rc�X�|j�}|j|dddddddd�	�	y)
NrGrr�r�rrr Frr	r�s  rrz%PanedWindowTest.test_configure_height�s3����������f�h��U�E�4��D�#(�	�	*rc�H�|j�}|j|d�y)Nr�r�r�s  r�test_configure_opaqueresizez+PanedWindowTest.test_configure_opaqueresize�s����������v�~�6rr�rOr}c�H�|j�}|j|d�y)Nr�rHr�s  r�test_configure_proxybackgroundz.PanedWindowTest.test_configure_proxybackground�s����������V�%6�7rc�X�|j�}|j|dddddddd�	�	y)
Nr�rrMg333333@rOrPrQFrr	r�s  r�test_configure_proxyborderwidthz/PanedWindowTest.test_configure_proxyborderwidth�s5����������f�&8���c�1�b�%�#(�	�	*rc�Z�|j�}|j|dtdk\��y)Nr�r�)r|)r r�rr�s  r�test_configure_proxyreliefz*PanedWindowTest.test_configure_proxyrelief�s-����������f�m�+5��+?�	�	Brc�H�|j�}|j|d�y)Nr�r�r�s  r�test_configure_sashcursorz)PanedWindowTest.test_configure_sashcursor������������f�l�3rc	�R�|j�}|j|dddddd�y)Nr�r�rMrNrPr�r	r�s  r�test_configure_sashpadz&PanedWindowTest.test_configure_sashpad�s'����������f�i��C��b�$�Grc�H�|j�}|j|d�y)Nr�r�r�s  r�test_configure_sashreliefz)PanedWindowTest.test_configure_sashrelief�r�rc
�V�|j�}|j|ddddddd��y)	Nr�r�g333333&@rarBrtFrr	r�s  r�test_configure_sashwidthz(PanedWindowTest.test_configure_sashwidth�s1����������f�k�2�t�T�2�t�#(�	�	*rc�H�|j�}|j|d�y)Nr�r�r�s  r�test_configure_showhandlez)PanedWindowTest.test_configure_showhandles����������v�|�4rc�X�|j�}|j|dddddddd�	�	y)
NrSr#�fffff6y@皙���Iy@r$rrZFrr	r�s  rr%z$PanedWindowTest.test_configure_widths3����������f�g�s�E�5�$��4�#(�	�	*rc���|j�}tj|�}tj|�}|j|�|j|�|||fSr)r rUr��add�r'�pr�r0s    r�create2zPanedWindowTest.create2	sJ���K�K�M���N�N�1����N�N�1���	���a��	���a���!�Q�w�rc��|j�\}}}|jt|j�|j|�}|j	|t
�|j
�D]g\}}|jt|�d�|j||j||��|j|d|j||���iy)Nr}r�)
r�rr��
paneconfigurer�r	r
r!r��panecget)r'r�r�r0rrr�s       r�test_paneconfigurez"PanedWindowTest.test_paneconfigures����,�,�.���1�a����)�Q�_�_�5�
�O�O�A������a��&��G�G�I�D�A�q����S��V�Q�'����Q�����1� 5�6����Q�q�T�1�:�:�a��#3�4�rc���|jst|�}|j|fi||i��|j|j||�d|�|j|j	||�|�y)Nr�)r7r�r�r!r�)r'r�r�r�r�r�s      r�check_paneconfigurez#PanedWindowTest.check_paneconfiguresf������8�}�H������+�d�E�]�+��������D�1�!�4�h�?�������A�t�,�h�7rc��|jt|�5|j|fi|di��ddd�y#1swYyxYw)N�badValue)r,rr�)r'r�r�r��msgs     r�check_paneconfigure_badz'PanedWindowTest.check_paneconfigure_bad"s6��
�
#�
#�H�c�
2��A�O�O�A�4�$�
�!3�4�3�
2�
2�s�6�?c	��|j�\}}}|j||d|t|��|j||dd�y)N�after�bad window path name "badValue"�r�r�r�r�r�s    r�test_paneconfigure_afterz(PanedWindowTest.test_paneconfigure_after&sE���,�,�.���1�a�� � ��A�w��3�q�6�:��$�$�Q��7�%F�	Hrc	��|j�\}}}|j||d|t|��|j||dd�y)N�beforer�r�r�s    r�test_paneconfigure_beforez)PanedWindowTest.test_paneconfigure_before,sE���,�,�.���1�a�� � ��A�x��C��F�;��$�$�Q��8�%F�	Hrc��|j�\}}}|j||ddd�|j||dtj	d��y)NrGr�r��r�r�r��(EXPECTED_SCREEN_DISTANCE_OR_EMPTY_ERRMSGr�r�s    r�test_paneconfigure_heightz)PanedWindowTest.test_paneconfigure_height2sL���,�,�.���1�a�� � ��A�x��R�8��$�$�Q��8�8�?�?�
�K�	Mrc�~�|j�\}}}|j||ddd�|j||dd�y)N�hideFrz)expected boolean value but got "badValue"�r�r�r�r�s    r�test_paneconfigure_hidez'PanedWindowTest.test_paneconfigure_hide8sA���,�,�.���1�a�� � ��A�v�u�a�8��$�$�Q��6�%P�	Rrc��|j�\}}}|j||ddd�|j||dtj	d��y)N�minsizer�r��r�r�r�r'r�r�s    r�test_paneconfigure_minsizez*PanedWindowTest.test_paneconfigure_minsize>sL���,�,�.���1�a�� � ��A�y�"�b�9��$�$�Q��9�/�6�6�z�B�	Drc��|j�\}}}|j||ddd�|j||dtj	d��y)NrLrMr4r�r�r�s    r�test_paneconfigure_padxz'PanedWindowTest.test_paneconfigure_padxD�L���,�,�.���1�a�� � ��A�v�s�A�6��$�$�Q��6�/�6�6�z�B�	Drc��|j�\}}}|j||ddd�|j||dtj	d��y)NrMrMr4r�r�r�s    r�test_paneconfigure_padyz'PanedWindowTest.test_paneconfigure_padyJr�rc�~�|j�\}}}|j||ddd�|j||dd�y)N�sticky�nsew�neswz[bad stickyness value "badValue": must be a string containing zero or more of n, e, s, and wr�r�s    r�test_paneconfigure_stickyz)PanedWindowTest.test_paneconfigure_stickyPsB���,�,�.���1�a�� � ��A�x���@��$�$�Q��8�&6�	7rc�~�|j�\}}}|j||ddd�|j||dd�y)N�stretch�alw�alwayszEbad stretch "badValue": must be always, first, last, middle, or neverr�r�s    r�test_paneconfigure_stretchz*PanedWindowTest.test_paneconfigure_stretchXsD���,�,�.���1�a�� � ��A�y�%��B��$�$�Q��9�&M�	Nrc��|j�\}}}|j||ddd�|j||dtj	d��y)NrSr�r�r�r�s    r�test_paneconfigure_widthz(PanedWindowTest.test_paneconfigure_width_sL���,�,�.���1�a�� � ��A�w��B�7��$�$�Q��7�8�?�?�
�K�	MrN)"r#r=r>rrrjr r�r�rr�rr�r�r�r�r�r�r�r�r%r�r�r�r�r�r�r�r�r�r�r�r�r�r�r@rrr�r��s����G�"�N�8�J�*�
*�
7���A�q��8��8���A�q��*��*���A�q��B��B�
4�H�4�*�
5�*�
�5�8�5�H�H�M�R�D�D�D�7�N�Mrr�c��eZdZdZdZd�Zd�Zedd�ej�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zy)�MenuTest)r��activeborderwidthr�rmrCrErFr�r{r|�postcommandrNr�rP�tearoff�tearoffcommandr$�typeFc�B�tj|jfi|��Sr)rUr]rWrXs  rr zMenuTest.createrr�rc�h�|j�}|jd�}|j|�y)Nro)r �indexr4)r'r(r�s   r�test_indexcommand_nonezMenuTest.test_indexcommand_noneus)��������L�L�� �����!�rr�r�c�H�|j�}|j|d�y)Nr�r\r�s  r�test_configure_postcommandz#MenuTest.test_configure_postcommand|r�rc�H�|j�}|j|d�y)Nr�r�r�s  r�test_configure_tearoffzMenuTest.test_configure_tearoff�rFrc�H�|j�}|j|d�y)Nr�r\r�s  r�test_configure_tearoffcommandz&MenuTest.test_configure_tearoffcommand�r�rc�J�|j�}|j|dd�y)Nr$r�rdr�s  r�test_configure_titlezMenuTest.test_configure_title�s�������������6rc�t�|j�}d}|j|dg|��tdktdk\d��y)N)r�r��menubarr�r�)r|�sort)r r�r)r'r(r*s   r�test_configure_typezMenuTest.test_configure_type�sB�������1������F�F�	7�V�	7�(2�V�(;�!+�v�!5�	7rc��|j�}|jd��|jt|j�|jtd�5|j	d�ddd�|j	d�}|j|t�|j�D]�\}}|j|t�|j|t�|jt|�d�|j|d|�|j|jd|�|d���|j�y#1swY��xYw)	Nr��r�zbad menu entry index "foo"r�r4r}rr�)r �add_commandrr��entryconfigurer,rr�r	r
r��tupler!r��	entrycgetr�)r'�m1rrr�s     r�test_entryconfigurezMenuTest.test_entryconfigure�s��
�[�[�]��
���V��$����)�R�%6�%6�7�
�
#�
#�H�.J�
K����e�$�L����a� �����a��&��G�G�I�D�A�q��!�!�!�S�)��!�!�!�U�+����S��V�Q�'����Q�q�T�1�%����R�\�\�!�Q�/��1��6��	�
�
��L�
K�s�E�E
c��|j�}|jd��|j|jdd�d�|j	dd��|j|jdd�d�y)Nr�rr4r��changed)r rr!rr)r'rs  r�test_entryconfigure_labelz"MenuTest.test_entryconfigure_label�sd��
�[�[�]��
���V��$�������a��1�6�:�
���!�9��-�������a��1�9�=rc��|j�}tj|j�}tj|j�}|j	|ddd��|jt
|jdd��t
|��|jd|��|jt
|jdd��t
|��y)NTF�Nonsense)r�r�r�r�r4r�)r�)	r rU�
BooleanVarrW�add_checkbuttonr!r�rr)r'r�v1�v2s    r�test_entryconfigure_variablez%MenuTest.test_entryconfigure_variable�s���
�[�[�]��
�
�
��	�	�
*��
�
�
��	�	�
*��
���B��u�!+�	�	-�����R�\�\�!�Z�8�9�3�r�7�C�
���!�b��)�����R�\�\�!�Z�8�9�3�r�7�CrN)r#r=r>rrr�r r�rr�test_configure_activereliefr�r�r�r�rrrrr@rrr�r�fs`���G��L�1��
#4�+�a��"3�4H�4d�4d�"e��6�2�9�7�7�� >�Drr�c�T�eZdZdZdZedk\rdZedk\Zedk\Zd�Z	d�Z
d�Zd�Zd�Z
y	)
�MessageTest)r��aspectrCrErFr{r|rHrIrJr�rLrMrNrPrr�rSFr�c�B�tj|jfi|��Sr)rU�MessagerWrXs  rr zMessageTest.create�r�rc�N�|j�}|j|dddd�y)Nr�ri���rr�s  r�test_configure_aspectz!MessageTest.test_configure_aspect�s#����������v�x��a��>rc	���|j�}|j|ddddd|j��|jr|jnd}|j|dd|��y)	NrLry皙����@rs�12mrrPr��r rUr?r�rur^rvs   r�test_configure_padxzMessageTest.test_configure_padx��\����������f�f�a��c�5�#'�#8�#8�	�	:�+/�>�>�4�'�'�r��������X��>rc	���|j�}|j|ddddd|j��|jr|jnd}|j|dd|��y)	NrMryrrsrrrPr�rrvs   r�test_configure_padyzMessageTest.test_configure_pady�r!rc	��|j�}|j|dddddd�tdk\rdnd}|j|dd|�	�y)
NrSr#r�r�rrZr�r$r�)r rUrr^rvs   rr%z MessageTest.test_configure_width�sI����������f�g�s�E�5�!�T�J�"�f�,�1�$����������ArN)r#r=r>rrr?rr�r�r�r rr r#r%r@rrrr�sM���G����V�����f�$�I�"�f�,��4�?�?�?�Brrc��eZdZd�Zd�Zy)�DefaultRootTestc�B�|jtj�yr)�_test_widgetrUrvr-s r�
test_framezDefaultRootTest.test_frame�������'�-�-�(rc�B�|jtj�yr)r(rUr�r-s r�
test_labelzDefaultRootTest.test_label�r*rN)r#r=r>r)r,r@rrr&r&�s��)�)rr&�__main__)/�unittestrUrrf�test.supportr�test.test_tkinter.supportrrrrr	�test.test_tkinter.widget_testsr
rrr
rr'r�rr�TestCaserBrtrzr�r�r�r�r�rr'r2r�r�r6r�rArlr�r�rr&�	tests_guir#�mainr@rr�<module>r5s�����	�!�;�;�P�P�	���#S��+a�(��"7�-�~�"7�J�*�+�'2�'��):�):�'2�,�'2�T�*�+�	2�$�h�&7�&7�	2�,�	2��*�+��)�8�+<�+<��,��6-�*�,<�-��*�+�2�!�8�#4�#4�2�,�2��*�+�O�"�H�$5�$5�O�,�O�(�*�+�3%�'��):�):�3%�,�3%�l�*�+�D�'��):�):�D�,�D�,�*�+�3H�&��(9�(9�3H�,�3H�l?�^�X�%6�%6�?��&�(<�=�Y#�"�H�$5�$5�Y#�>�Y#�x�*�+�EC�)�X�.�.�EC�,�EC�P�*�+�E@�!�8�#4�#4�E@�,�E@�P�n�&:�;�}3�#�X�%6�%6�}3�<�}3�@�&�(<�=�F1�$�h�&7�&7�F1�>�F1�R�n�&:�;�@/�"�H�$5�$5�@/�<�@/�F�n�&:�;�-<�&��(9�(9�-<�<�-<�`�*�+�gM�(�(�*;�*;�gM�,�gM�T�*�+�KD�!�8�#4�#4�KD�,�KD�\�n�&:�;�'B�$�h�&7�&7�'B�<�'B�T)�-�x�/@�/@�)�	�J����>�)�[���+�~���)�]��X�|�_�
�	��z���H�M�M�O�r

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