403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.144
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:/Python312/Lib/idlelib/idle_test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/idlelib/idle_test/__pycache__/test_debugger.cpython-312.opt-1.pyc
�

���gf'����dZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZddl
Z
dd	l
mZdd
lmZmZ	ed�ZGd�d
�ZGd�de
j(�ZGd�de
j(�ZGd�de
j(�ZGd�de
j(�ZGd�de
j(e�ZGd�de
j(�Zedk(re
j8d��yy)zeTest debugger, coverage 66%

Try to make tests pass with draft bdbx, which may replace bdb in 3.13+.
�)�debugger)�
namedtuple)�dedent)�Tk)�requires)�ExtraAssertionsN)�mock)�Mock�patchz9
    i = 1
    i += 2
    if i == 3:
       print(i)
    c��eZdZdZd�Zy)�	MockFramezMinimal mock frame.c� �||_||_y�N)�f_code�f_lineno)�self�code�linenos   �4C:\Python312\\Lib\idlelib\idle_test\test_debugger.py�__init__zMockFrame.__init__s�������
�N)�__name__�
__module__�__qualname__�__doc__r�rrr
r
s
���rr
c�.�eZdZed��Zd�Zd�Zd�Zy)�IdbTestc��t�|_tj|j�|_ttdd��}t|d�}d|_t|d�}||_||_	d|_
y)Nzidlelib/file.py�exec��mode��zfile.py:2: <module>())r
�guir�Idb�idb�compile�	TEST_CODEr
�f_back�frame�msg)�cls�code_obj�frame1�frame2s    r�
setUpClasszIdbTest.setUpClass$sd���&����,�,�s�w�w�'����9�&7�f�E���8�Q�'����
��8�Q�'����
���	�)��rc�d�|j|jj|j�yr)�assertIsr'r%�rs r�	test_initzIdbTest.test_init2s���
�
�d�h�h�l�l�D�H�H�-rc���t�|j_|jj	|j
�|jjj
|j|j
�yr)r
r%�interactionr'�	user_liner+�assert_called_once_withr,r4s r�test_user_linezIdbTest.test_user_line6sH��#�v����������4�:�:�&������4�4�T�X�X�t�z�z�Jrc�,�tt�t�df}t�|j_|j
j
|j|�|jjj|j|j|�yr)
�type�
ValueErrorr
r%r7r'�user_exceptionr+r9r,)r�exc_infos  r�test_user_exceptionzIdbTest.test_user_exception<sb����$�j�l�D�9��#�v�����������
�
�H�5������4�4����$�*�*�h�	0rN)rrr�classmethodr1r5r:r@rrrrr"s$���*��*�.�K�0rrc��eZdZd�Zy)�FunctionTestc�h�ttdd��}t|d�}||_|j	tj|��|jtj|�d�ttdd��}t|d�}d|_|jtj|��|jtj|�d�||_|jtj|��||_|j	tj|��y)	Nzrpc.pyr r!r$zrpc.py:2: <module>()zidlelib/debugger.pyr#zdebugger.py:1: <module>())
r(r)r
r*�
assertTruer�_in_rpc_code�assertEqual�_frame2message�assertFalse)r�rpc_obj�	rpc_framer.�
code_frames     r�test_functionszFunctionTest.test_functionsHs����)�H�6�:���g�q�)�	�$�	������-�-�i�8�9�����0�0��;�/�	1��9�&;�&�I���x��+�
� �
������.�.�z�:�;�����0�0��<�4�	6�'�
������.�.�z�:�;�%�
������-�-�j�9�:rN)rrrrMrrrrCrCEs��;rrCc�V�eZdZdZed��Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zy)
�DebuggerTestz0Tests for Debugger that do not need a real root.c�t�t�|_t�|j_t�|_t	j
tjd�5t
j|j|j�|_ddd�t�|j_y#1swY�#xYw)N�make_gui)r
�pyshell�rootr'r�objectr�Debugger�r-s rr1zDebuggerTest.setUpClass`sn���f����6������&���
�\�\�(�+�+�Z�
8�#�,�,�S�[�[�#�'�'�B�C�L�9� �F�����9�
8�s�0B.�.B7c��|jj�|jjj	�yr)r�contr'�set_continue�assert_called_oncer4s r�	test_contzDebuggerTest.test_contis(���
�
���������0�0�2rc��|jj�|jjj	�yr)r�stepr'�set_steprZr4s r�	test_stepzDebuggerTest.test_stepm�(���
�
���������,�,�.rc��|jj�|jjj	�yr)r�quitr'�set_quitrZr4s r�	test_quitzDebuggerTest.test_quitqr`rc���tj|jd�5}|jj�|jj
j
|�ddd�y#1swYyxYw�Nr+)rrTr�nextr'�set_nextr9�rr+s  r�	test_nextzDebuggerTest.test_nextusJ��
�\�\�$�-�-��
1�U��M�M��� ��H�H���5�5�e�<�2�
1�
1���AA*�*A3c���tj|jd�5}|jj�|jj
j
|�ddd�y#1swYyxYwrf)rrTr�retr'�
set_returnr9ris  r�test_retzDebuggerTest.test_retzsJ��
�\�\�$�-�-��
1�U��M�M�����H�H���7�7��>�2�
1�
1�rkc��|jjdd�|jjj	dd�y)N�test.py�)r�clear_breakpointr'�clear_breakr9r4s r�test_clear_breakpointz"DebuggerTest.test_clear_breakpoints0���
�
�&�&�y�!�4������4�4�Y��Brc��|jjd�|jjj	d�y)Nrq)r�clear_file_breaksr'�clear_all_file_breaksr9r4s r�test_clear_file_breaksz#DebuggerTest.test_clear_file_breaks�s,���
�
�'�'�	�2����&�&�>�>�y�Irc����tdd��G�fd�dt�}t�|j_|dddg�|dgd��f|jj_|jjd	d
�|jjjd	d
�|jj�|jjjtjd	d
�tjdd�tjdd�tjdd�tjdd�tjdd
�g�y)N�FileIO�filenamec���eZdZ�fd�Zy)�>DebuggerTest.test_set_load_breakpoints.<locals>.MockEditWindowc�.���|�|_||_yr)�io�breakpoints)r�fnr�r{s   �rrzGDebuggerTest.test_set_load_breakpoints.<locals>.MockEditWindow.__init__�s��� ��*���#.�� rN)rrrr)r{s�r�MockEditWindowr~�s���
/rr�ztest1.pyrrztest2.py)�
�,�-ztest0.pyr#r�r�r�)rrTr
rR�flist�inversedictr�set_breakpointr'�	set_breakr9�load_breakpoints�assert_has_callsr	�call)rr�r{s  @r�test_set_load_breakpointsz&DebuggerTest.test_set_load_breakpoints�s����H�j�1��	/�V�	/�
"�V������:��1�v�.��:�|�4�*
������&�	
�
�
�$�$�Z��3������2�2�:�q�A��
�
�&�&�(������+�+�
�Y�Y�z�1�
%�
�Y�Y�z�1�
%�
�Y�Y�z�1�
%�
�Y�Y�z�2�
&�
�Y�Y�z�2�
&�
�Y�Y�z�2�
&�
(�	)rc�j�ttdd�}t|d�}||j_t�|j_tdd��5|jj�ddd�|jjjjdd�y#1swY�:xYw)Nztest_sync.pyr r#zidlelib.debugger.os.path.existsT��return_value)r(r)r
rr+r
r�r�sync_source_line�gotofileliner9)r�	test_code�
test_frames   r�test_sync_source_linez"DebuggerTest.test_sync_source_line�s����I�~�v�>�	��y�!�,�
�(��
�
��"�f��
�
��
�4�4�
H��M�M�*�*�,�I��
�
���(�(�@�@��QR�S�I�
H�s�B)�)B2N)rrrrrAr1r[r_rdrjroruryr�r�rrrrOrO]sG��6��#��#�3�/�/�=�
?�
C�J�)�2	TrrOc�N�eZdZdZed��Zed��Zd�Zd�Zd�Z	d�Z
d�Zy	)
�DebuggerGuiTestzbTests for debugger.Debugger that need tk root.

    close needs debugger.top set in make_gui.
    c��td�t�x|_}|j�t	�|_||j
_t	�|_y�Nr%)rrrS�withdrawr
rRr')r-rSs  rr1zDebuggerGuiTest.setUpClass�s>������$����4��
�
���f���������&��rc�<�|jj�|`yr�rS�destroyrVs r�
tearDownClasszDebuggerGuiTest.tearDownClass�����������Hrc��tj|j|j�|_|j|j_yr)rrUrRr'rSr4s r�setUpzDebuggerGuiTest.setUp�s.�� �)�)�$�,�,����A��
�!�Y�Y��
�
�rc���|jjdd�|jjjdd�|j	|jj
d�y)Nr#�twor)r�runr'r9rG�interactingr4s r�test_run_debuggerz!DebuggerGuiTest.test_run_debugger�sH���
�
���!�U�#������,�,�Q��6�������2�2�A�6rc��|jj�|jjj	�yr)r�closerR�close_debuggerrZr4s r�
test_closezDebuggerGuiTest.test_close�s(���
�
�������#�#�6�6�8rc��|jj�|j|jjj|j�yr)r�
show_stackrG�stackviewerr%r4s r�test_show_stackzDebuggerGuiTest.test_show_stack�s6���
�
� � �"�������2�2�6�6��
�
�Frc��tdd�}||j_d|j_gdf|jj
_|jj�|j|jjj|j�|jj
j|d�y)Nr)r
rr+r�r'�	get_stackr�r�rGr%r9)rr�s  r�test_show_stack_with_framez*DebuggerGuiTest.test_show_stack_with_frame�s����t�T�*�
�(��
�
��%)��
�
�!�+-�q�'������'��
�
� � �"�	
������2�2�6�6��
�
�F������2�2�:�t�DrN)rrrrrAr1r�r�r�r�r�r�rrrr�r��sJ���
��������'�7�
9�
G�Err�c�D�eZdZed��Zed��Zd�Zd�Zd�Zd�Z	y)�StackViewerTestc�l�td�t�|_|jj�yr��rrrSr�rVs rr1zStackViewerTest.setUpClass��"������4��������rc�<�|jj�|`yrr�rVs rr�zStackViewerTest.tearDownClass�r�rc�0�ttdd�|_t|jd�dft|jd�dfg|_tj|jdd�|_|jj|j�y)N�test_stackviewer.pyr r#r$)
r(r)rr
�stackr�StackViewerrS�sv�
load_stackr4s rr�zStackViewerTest.setUp�st���I�'<�f�E��	�
�t�y�y�!�
$�a�(�
�t�y�y�!�
$�a�(�
��
�
�&�&�t�y�y�$��=��������4�:�:�&rc�v�d}d}|j}tj|||�}|j|d�y)Nr�)rSrr��
assertHasAttr)rr%r��
master_windowr�s     rr5zStackViewerTest.test_init�s9�������	�	�
�
�
!�
!�-���
<�����2�w�'rc��|j|jj|j�|jd|jj	d�v�|j|jj	d�d�y)Nz?.<module>(), line 1:rr#z?.<module>(), line 2: )rGr�r�rE�getr4s r�test_load_stackzStackViewerTest.test_load_stacks[��	
���������
�
�3����/�4�7�7�;�;�q�>�A�B���������Q��)A�Brc�0�t�|j_tdd��5}|jj	d�|jd�|jjjjd�ddd�y#1swYyxYw)Nzidlelib.debugger.os.path.isfileTr�r#r�)r
r�r�r�show_sourcer9�open)r�isfiles  r�test_show_sourcez StackViewerTest.test_show_source
si�������
�
�4�4�
H�F��G�G����"��*�*�+@�A��G�G�M�M���6�6�7L�M�I�
H�
H�s�AB�BN)
rrrrAr1r�r�r5r�r�rrrr�r��s>������
����'�(�C�Nrr�c�2�eZdZed��Zed��Zd�Zy)�
NameSpaceTestc�l�td�t�|_|jj�yr�r�rVs rr1zNameSpaceTest.setUpClassr�rc�<�|jj�|`yrr�rVs rr�zNameSpaceTest.tearDownClass r�rc�D�tj|jd�y)N�Test)r�NamespaceViewerrSr4s rr5zNameSpaceTest.test_init%s��� � ����F�3rN)rrrrAr1r�r5rrrr�r�s-������
����4rr��__main__r$)�	verbosity)r�idlelibr�collectionsr�textwrapr�tkinterr�test.supportr�test.support.testcaser�unittestr	�
unittest.mockr
rr)r
�TestCaserrCrOr�r�r�r�mainrrr�<module>r�s����
�"���!�1���%�/���
	�	��� 0�h��� 0�F;�8�$�$�;�0LT�8�$�$�LT�^8E�h�'�'�8E�v.N�h�'�'��.N�b4�H�%�%�4�"�z���H�M�M�A��r

Youez - 2016 - github.com/yon3zu
LinuXploit