403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/idlelib/idle_test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/idlelib/idle_test/__pycache__/test_codecontext.cpython-315.pyc
R
>lqj}@c
���Qs]QHGs]PHs]PHs]QHGs]QHGsG	s	G
s
GsGs]QHG
s
]PH8s]QHGs\O O"sQ\O&P2Q\O&P2Q\O&P2Q	\O&P2-sQ
sQQ2sQ
Q\O.2sQQ\O.2s\Q6Xc\O6]Q5P!P!)zTest codecontext, coverage 100%)�codecontext)�requires)�NSEW�Tk�Frame�Text�TclError)�mock)�config�main�	highlight�keys�
extensionsz�
class C1:
    # Class comment.
    def __init__(self, a, b):
        self.a = a
        self.b = b
    def compare(self):
        if a > b:
            return a
        elif a < b:
            return b
        else:
            return None
c�4`�\sQs]&snQsQsQsQsUsP!)�DummyEditwinc�F�VmVmV mV0mPUmP!)�)�root�top�
text_frame�text�label)�selfr�framers&&&&�7C:\Python315\\Lib\idlelib\idle_test\test_codecontext.py�__init__�DummyEditwin.__init__'s���	������	���
�c�^�[[UOOU222!�N)�int�floatr�index)rr!s&&r�	getlineno�DummyEditwin.getlineno.s���5�������/�0�1�1rc�$�UQ*UmP!�rr%)r�kwargss&,r�update_menu_label�DummyEditwin.update_menu_label1s
���G�_��
r)rrrrr)	�__name__�
__module__�__qualname__�__firstlineno__rr"r'�__static_attributes__�__classdictcell__��
__classdict__s@rrr&s�����2�%�%rrc��`�\sQs]5sn\Q2s\Q2sQsQsQs	Qs
QsQsQ	s
Q
sQsQs\O$O'\O*Q
2Q2sQsQsQsUsP!)�CodeContextTestc�z�[Q2[29pmUO2[	U29p m[
U29p0mUOQ[2UOQQ]Q5UO]][Q5[VU2Um[[ O"mP!)�gui�1.0�left�both)�side�fill�expand)�row�column�sticky)rrr�withdrawrrrr�insert�code_sample�pack�gridrr�editor�testcfgr�idleConf�userCfg)�clsrrrs&   r�
setUpClass�CodeContextTest.setUpClass7s�������$���x��
�
��!�$�K�'��	��u�+�%��x����E�;�'�
�
�
��V�A�
�6��	�	�a��$�	�/�!�$�t�4��
�'.����$rc��[[OmUOO
O
QQ2U;U;U;UOO2UOO2U;P!)r5�end)�usercfgrrErFrCr�deleterr�update_idletasks�destroy)rGs&r�
tearDownClass�CodeContextTest.tearDownClassEsZ��'.����$��
�
�����u�e�,��J��	�3�8����!�!�#��������Hrc�``�ROO]2QROQ$[ORO2RmQQQQ-Rm[OOnUU1Qko[OOO[OQU2oUO2ROUO2QRmU1Q	ko[OOO[OQ
U2oUO2ROUO2P!)��TkFixedFont�font�
backgroundz#abcdef�
foregroundz#123456c�<:�UQ6Xc
RO!RV2!��context)�
highlight_cfg)�theme�element�orig_idleConf_GetHighlightrs&&��r�mock_idleconf_GetHighlight�9CodeContextTest.setUp.<locals>.mock_idleconf_GetHighlightVs"����)�#��)�)�)�-�e�=�=r�GetHighlightc�:�RO!r)�
font_override)r�
configType�sectionrs&&&�r�mock_idleconf_GetFont�4CodeContextTest.setUp.<locals>.mock_idleconf_GetFont`s����%�%�%r�GetFont)r�yviewr�CodeContextrC�ccr[rEra�unittestr�patch�object�start�
addCleanup�stoprc)rr_�GetHighlight_patcherrf�GetFont_patcherr^sf    @r�setUp�CodeContextTest.setUpNs����	�	�����)��	�	�&���)�)�$�+�+�6���*�I�*�I�7���%0�%9�%9�%F�%F�"�	>� (�}�}�2�2�9�9�� � �.�2L� N���"�"�$����,�1�1�2�*���	&�"�-�-�-�-�4�4�� � �)�-B�D����������,�,�-rc���UOO%c%UOOO2UOO2UO;U;P!r)rkrZrO�__del__�rs&r�tearDown�CodeContextTest.tearDowngs>���7�7�?�?�?��G�G�O�O�#�#�%��������G�G�O�T�Wrc���UOoUOoUOoUUOU2UUOUO2UUOQ*UOQ*2UOUO2UUOQ,2UUO]2UOUOO2P!)rU�rS���rF)
�assertEqualrCrk�editwinr�assertIsNonerZ�info�
topvisible�t1)r�eq�edrks&   r�	test_init�CodeContextTest.test_initns���
�
�
��
�[�[��
�W�W��
�2�:�:�r��
�2�7�7�B�G�G��
�2�7�7�6�?�B�G�G�F�O�,����"�*�*�%�
�2�7�7�'�(�)�
�2�=�=�!�����$�'�'�*�*�%rc�<�UOO2P!r)rkrwrxs&r�test_del�CodeContextTest.test_del{s�������rc��UOOQQ29pOmUOO	2UO[29^tt^2oUOOU2PPP2UOQ[WO22P!)%fhK79h)i'c��P!r�r�rr�<lambda>�5CodeContextTest.test_del_with_timer.<locals>.<lambda>s��Drz
doesn't exist)r�afterrkr�rw�assertRaisesrr�
after_info�assertIn�str�	exception)r�timer�cms&  r�test_del_with_timer�#CodeContextTest.test_del_with_timer~sw��!�Y�Y�_�_�U�L�A�A����
�������
�
�
�x�
(�
(�B��I�I� � ��'�)��
�
�o�s�2�<�<�'8�9�)�
(�s�&B1�1C	�:C	c��[OO2UOUOO
]2P!)�)rrj�reloadr~rk�
context_depthrxs&r�test_reload�CodeContextTest.test_reload�s.�����&�&�(�������.�.��3rc���UOoUOoUOoUO%cU2U2UO	UO2UUOQ*UO
Q*2UUOQ*UOQ*2UUOQ*UOQ*2UUOOQQ2P2UUOOQ2UUOOUOO2]*Q2U2UOUO2UUOOQ	2UOUOO2Q
OQUO]2]*22oUO
O!]2U2UUOOQQ2U2U2U2UUOOQQ2U2P!)rU�fgrW�bgrVr5�end-1czHide Code Contextr�zShow Code Context�
c3�>�SF �Dp]*w�	J	P!3h)�r�)�.0�xs& r�	<genexpr>�ACodeContextTest.test_toggle_code_context_event.<locals>.<genexpr>�s��1F���1F�A�Q�4�4�1F�s�)r~rk�toggle_code_context_eventrZ�assertIsNotNonerr[�getrrrr�r�r��join�get_contextri)rr�rk�toggle�line11_contexts&    r�test_toggle_code_context_event�.CodeContextTest.test_toggle_code_context_event�s���
�
�
��
�W�W���-�-���:�:�:��H�	�����R�Z�Z�(�
�2�:�:�f��t�y�y��0�1�
�2�:�:�d��T�/�/��=�>�
�2�:�:�d��T�/�/��=�>�
�2�:�:�>�>�%��*�B�/�
�2�:�:���0�1�
�4�9�9������
�
�+�A�.��8�	�����"�*�*�%�
�2�:�:���0�1����$�'�'�*�*�%����"G�����1C�A�1F�"G�G��
���
�
�b����
�2�:�:�>�>�%��*�N�;�	����
�2�:�:�>�>�%��*�N�;rc�^�UOoUOOoUO[29^tt^2U]]Q5PPP2UU]2Q,]12UU]2Q,]12UU]2QQ,]12UU]
2,QN]12UU]2,QN]12UU]]Q5,QN]12UU]]Q5,Q	N]12UU]]Q5QQ,]12UU]]Q5,Q	N]12UU]]Q5QQ,]12P!)%fhK�9h)
�)�stopline)�
stopindent�r�rS�	class C1:�class��r��    def __init__(self, a, b):�def��r��        if a > b:�if)r���r�z    def compare(self):r�r���
r�z        elif a < b:�elif)r�r�r�r�)r�r�r�)r~rkr�r��AssertionError)rr��gcs&  r�test_get_context� CodeContextTest.test_get_context�s���
�
�
��
�W�W�
 �
 ���
�
�~�
.�
.��q�1��/�	�2�a�5�0�1�1�5�6�	�2�a�5�0�1�1�5�6�	�2�a�5�0�B�D�EF�H�	I�	�2�b�6�8�9:�<�	=�
	�2�b�6�=�?@�A�	B�	�2�b�1��!I�KL� M�	N�	�2�b�1��!I�JK� M�	N�	�2�b�1��!B�!G�!I�JK� M�	N�	�2�b�Q��#K�LM�"O�	P�	�2�b�Q��#D�#I�#K�LM�"O�	P�Q/�
.�s�D�D,	�%D,	c�R�UOoUOoUO%fUO2UO	UO22UUOQ,2UUO]2UOO]2UO2UUOQ,2UUO]2UUOOQQ2P2UOO]2UO2UUOQQ,2UUO]2UUOOQQ2Q2UOO]2UO2UUOQQ,2UUO]2UUOOQQ2Q2UOO]2UO2UUO,Q	N2UUO]2UUOOQQ2Q2UOO]2UO2UUO,Q
N2UUO]2UUOOQQ2Q2UO2]UmUUO,Q
N2UUO]2UUOOQQ2Q2UOO]2UO2UUO,Q	N2UUO]2UUOOQQ2Q2P!)rSr5r�r�r�z'class C1:
    def __init__(self, a, b):zFclass C1:
    def compare(self):
        if a > b:
        elif a < b:r|r�)r|r�r�)r|r�r�r�r�)r~rkrZr�r��update_code_contextr�r�rrir�r�)rr�rks&  r�test_update_code_context�(CodeContextTest.test_update_code_context�s���
�
�
��
�W�W���z�z�z��(�(�*�	
���"�0�0�2�3�
�2�7�7�'�(�)�
�2�=�=�!��	���
�
�a��
��� �
�2�7�7�'�(�)�
�2�=�=�!��
�2�:�:�>�>�%��*�B�/�	���
�
�a��
��� �
�2�7�7�'�)E�F�G�
�2�=�=�!��
�2�:�:�>�>�%��*�K�8�	���
�
�a��
��� �
�2�7�7�'�)E�F�G�
�2�=�=�!��
�2�:�:�>�>�%��*�K�8�	���
�
�a��
��� �
�2�7�7�E�	F�	�2�=�=�!��
�2�:�:�>�>�%��*�-L�	M�	���
�
�b��
��� �
�2�7�7�=�	>�
	�2�=�=�"��
�2�:�:�>�>�%��*�-B�	C�	��� ����
�2�7�7�=�	>�
	�2�=�=�"��
�2�:�:�>�>�%��*�-B�	C�	���
�
�a��
��� �
�2�7�7�E�	F�	�2�=�=�!��
�2�:�:�>�>�%��*�,K�Lrc�V�UOoUOoUOoUO%fUO	2UO
O
Q2UO2UUO]2UOOQQ2U2UUO]2UO
O
Q2UO2UUO]2UOOQQ2U2UUO]2]Um
UO
O
Q2UO2UUO]2UOOQQ2U2UUO]2UO
O
Q2UO2UOOQQQ2UOOQQ2U2UUO]2P!)z2.0r?z1.5z12.0z3.0r5z5.0�sel)r~rk�
jumptolinerZr�rrir�r��mark_setr��tag_add)rr�rk�jumps&   r�test_jumptoline�CodeContextTest.test_jumptoline.s���
�
�
��
�W�W���}�}���z�z�z��(�(�*�	���
�
�e��
��� �
�2�=�=�!��
�
�
���H�e�,���
�2�=�=�!��	���
�
�f��
��� �
�2�=�=�"��
�
�
���H�e�,���
�2�=�=�!�����
���
�
�f��
��� �
�2�=�=�"��
�
�
���H�e�,���
�2�=�=�!��	���
�
�e��
��� �
�
�
���5�%��/�
�
�
���H�e�,���
�2�=�=�!�rr�c�P�UOO%cUOO2UOO2UO	2UOO2UOO2UO2P!r)rkrZr��timer_event�assert_not_called�
assert_called)r�mock_updates&&r�test_timer_event� CodeContextTest.test_timer_eventWsk���7�7�?�?�?��G�G�-�-�/��������%�%�'�	
���)�)�+��������!�!�#rc��UOoUOoUOQ*oQoUOV42UOdUO2V@mUO2UO2UUOQ*U2V0mUO2UUOQ*U2P!)rU�
TkTextFont)r~rkr�assertNotEqualrZr�rc�update_font)rr�rk�	orig_font�	test_fonts&    rr��CodeContextTest.test_fontds���
�
�
��
�W�W���G�G�F�O�	� �	����I�1��:�:�!��(�(�*�&��
����	�$�$�&�
�2�:�:�f��y�)�'��
����
�2�:�:�f��y�)rc�``�UOnUOn[UO2oQQQQ-oUU1QkoRO%cRO2V mRO
2RO2UU2RO
2UU2VmRO
2UU2P!)rVz#222222rWz#ffff00c�:�RROQ*UQ*2RROQ*UQ*2P!)rVrWrY)�colorsrkr�s&��r�assert_colors_are_equal�FCodeContextTest.test_highlight_colors.<locals>.assert_colors_are_equal�s3����r�z�z�,�'���)=�>��r�z�z�,�'���)=�>r)r~rk�dictr[rZr��update_highlight_colors)r�orig_colors�test_colorsr�rkr�s&   @@r�test_highlight_colors�%CodeContextTest.test_highlight_colors}s����
�
�
��
�W�W���4�-�-�.��#�Y��i�H��	?�
�:�:�:��(�(�*�(��
�"�"�$�	�$�$�&���,�	�"�"�$���,�)��
�"�"�$���,r)rkrcr[)r)r*r+r,�classmethodrHrPrtryr�r�r�r�r�r�r�r�rrmrnrrjr�r�r�r-r.r/s@rr2r25s������/��/�����.�2%�&��:�4�"<�H.P�`OM�b'�R
�Z�Z���{�.�.�0E�F�
$�G�
$�*�2-�-rr2c�.`�\sQsQsnQsQsQsUsP!)�HelperFunctionText�c���[OoQoSFDvq4UOUU2U2J	UOUQ[OQ2Q5Q2P!)�    first word�    (continuation)z^(\s*)([^\s]*))�c))r�)�    �first)z	first word)�	r�)u
  ᧔᧒: )z  u᧔᧒)z	no spaces)r�no)r�rr)z# TEST COMMENTr�)r�)r�r)r�z(continuation))r�get_spaces_firstwordr~�re�compile)rr��
test_lines�line�expected_outputs&    r�test_get_spaces_firstword�,HelperFunctionText.test_get_spaces_firstword�sa���.�.���
�&0�!�D����S��Y��8�&0�	
����1�!�z�z�*;�<�>�3�	5rc��UOo[Oo[O	2oUUU]*2[O
PP
12UUU]*2Q2UUU]*2[O
QP
12UUU]*2Q2UUU]*2Q2UUQ2Q2P!)rSz    # Class comment.�	if a == b:)rSr�r�)r�r�r�)r�r�r�)r�rr�)r~r�
get_line_infor@�
splitlines�INFINITY)rr��gli�liness&   r�test_get_line_info�%HelperFunctionText.test_get_line_info�s���
�
�
���'�'���&�&�(��	�3�u�Q�x�=�;�/�/��U�;�<�
�3�u�Q�x�=�3�4�
�3�u�Q�x�=�;�/�/�1G��O�P�
�3�u�Q�x�=�E�F�
�3�u�Q�x�=�8�9�
�3�~�� 9�:rr�)r)r*r+r,rr
r-r.r/s@rr�r��s����5�&;�;rr��__main__)�	verbosity)�__doc__�idlelibrrl�
unittest.mock�test.supportr�tkinterrrrrrrr�r	rErFrL�IdleUserConfParserrDr@r�TestCaser2r�r)r
r�rr�<module>rs���!����!�3�3��	���
�
�
&�
&��
�F�%�%�b�)���*�*�2�.�
�F�%�%�b�)��&�+�+�B�/�	����"%�%�f-�h�'�'�f-�R%;��*�*�%;�P�z���M�M�A��r

Youez - 2016 - github.com/yon3zu
LinuXploit