403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Python312/Lib/site-packages/_pytest/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Python312/Lib/site-packages/_pytest/__pycache__/debugging.cpython-312.pyc
�

��Hg�3��|�dZddlmZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ddlZddlm
Z
ddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlm Z d!d�Z!d"d�Z"d#d�Z#Gd�d�Z$Gd�d�Z%Gd�d�Z&d$d�Z'd$d�Z(								d%d�Z)d&d�Z*d'd �Z+y)(z4Interactive debugging with PDB, the Python Debugger.�)�annotationsN)�Any)�Callable)�	Generator)�outcomes)�
ExceptionInfo)�CaptureManager)�Config)�ConftestImportFailure)�hookimpl)�PytestPluginManager)�Parser)�
UsageError)�Node)�
BaseReport)�CallInfoc��	|jd�\}}||fS#t$r}tj|�d��|�d}~wwxYw)z#Validate syntax of --pdbcls option.�:z) is not in the format 'modname:classname'N)�split�
ValueError�argparse�ArgumentTypeError)�value�modname�	classname�es    �3C:\Python312\Lib\site-packages\_pytest/debugging.py�_validate_usepdb_clsrsZ���"�[�[��-����

�Y����	���(�(��i�@�A�
��	���s��	A�<�Ac��|jd�}|jdddd��|jddd	td
��|jdd
dd��y)N�generalz--pdb�usepdb�
store_truezDStart the interactive Python debugger on errors or KeyboardInterrupt)�dest�action�helpz--pdbcls�
usepdb_clszmodulename:classnamez{Specify a custom interactive Python debugger for use with --pdb.For example: --pdbcls=IPython.terminal.debugger:TerminalPdb)r#�metavar�typer%z--trace�tracez(Immediately break when running each test)�getgroup�
_addoptionr)�parser�groups  r�pytest_addoptionr.)sw���O�O�I�&�E�	����
��
S�	��
����
�&�
!�F���
����
��
7�	��c�
��ddl�|jd�r$|jjt	�d�|jd�r$|jjt�d�tjj�jtjtjf�tj�_	|jt_
|t_d�fd�}|j|�y)Nrr)�pdbtracer!�	pdbinvokec�x��tjj�\�_t_t_y�N)�	pytestPDB�_saved�pop�	set_trace�_pluginmanager�_config)�pdbs�r�finzpytest_configure.<locals>.finRs-���

��� � �"�		
��M��$��r/��return�None)
r;�getvalue�
pluginmanager�register�PdbTrace�	PdbInvoker5r6�appendr8r9r:�add_cleanup)�configr<r;s  @r�pytest_configurerHAs�����
���w�����%�%�h�j�*�=�
���x� ����%�%�i�k�;�?�
�����	���	�0�0�)�2C�2C�D���'�'�C�M�%�3�3�I���I��#����s�r/c��eZdZUdZdZded<dZded<gZded<d	ZdZ	d
ed<e
dd��Ze
dd
��Ze
dd��Z
e
d��Ze
dd��Zy)r5z'Pseudo PDB that defers to the real pdb.NzPytestPluginManager | Noner9z
Config | Noner:zKlist[tuple[Callable[..., None], PytestPluginManager | None, Config | None]]r6rz"tuple[type[Any], type[Any]] | None�_wrapped_pdb_clsc�(�|r|j�Sy)NF)�is_capturing)�cls�capmans  r�
_is_capturingzpytestPDB._is_capturinggs����&�&�(�(�r/c�J�|jsddl}|jS|jjd�}|jr!|jd|k(r|jdS|r[|\}}	t|�tj|}|jd�}t||d�}|ddD]}	t||	�}�nddl}|j}|j||�}||f|_|S#t$r*}
dj||f�}td|�d|
���|
�d}
~
wwxYw)Nrr&��.rz--pdbcls: could not import z: )r:r;�Pdbr@rJ�
__import__�sys�modulesr�getattr�	Exception�joinr�_get_pdb_wrapper_class)
rMrNr;r&rr�mod�parts�pdb_cls�part�excr�wrapped_clss
             r�_import_pdb_clszpytestPDB._import_pdb_clsms8���{�{���7�7�N��[�[�)�)�,�7�
����C�$8�$8��$;�z�$I��'�'��*�*��!+��G�Y�

��7�#��k�k�'�*��"����,��!�#�u�Q�x�0��!�!�"�I�5�D�%�g�t�4�G�5�
��g�g�G��0�0��&�A�� *�K�8�������
����'�9�!5�6�� �1�%��"�S�E�B�����
�s�-AC/�/	D"�8%D�D"c�2����ddl�G���fd�d|�}|S)Nrc�j���eZdZW�ZdZ��fd�Z���fd�ZexZZ��fd�Z	e	Z
e	Z�fd�Z�fd�Z
�xZS)�:pytestPDB._get_pdb_wrapper_class.<locals>.PytestPdbWrapperFc�z���xjdz
c_t�|�	|�}�xjdzc_|S)NrQ)�_recursive_debug�super�do_debug��self�arg�ret�	__class__rMs   ��rrhzCpytestPDB._get_pdb_wrapper_class.<locals>.PytestPdbWrapper.do_debug�s9����$�$��)�$��g�&�s�+���$�$��)�$��
r/c�F��t�|�|�}�jdk(r��j�J��jj�j�}|j
�|j}tj|�}|rC|dk(r|jdd�n|jdd|�d��|�J�|j�n|jdd��j�J��jjj�j|��d	|_|S)
Nr�global�>z#PDB continue (IO-capturing resumed)z'PDB continue (IO-capturing resumed for �)zPDB continue�rGr;T)rg�do_continuerfr:rG�create_terminal_writer�line�_pytest_capmanr5rO�sep�resumer9�hook�pytest_leave_pdb�
_continued)	rjrkrl�twrN�	capturingrm�_pytestrMs	      ���rrszFpytestPDB._get_pdb_wrapper_class.<locals>.PytestPdbWrapper.do_continue�s	����g�)�#�.���'�'�1�,��;�;�2�2�2� ���>�>�s�{�{�K�B��G�G�I�!�0�0�F� )� 7� 7�� ?�I� �$��0��F�F�3�(M�N��F�F� #�"I�)��TU� V�� &�1�1�1��
�
�����s�N�3��)�)�5�5�5��"�"�'�'�8�8����QU�8�V�"&����
r/c�n��t�|�|�}�jdk(rtjd�|S)aRaise Exit outcome when quit command is used in pdb.

                This is a bit of a hack - it would be better if BdbQuit
                could be handled, but this would require to wrap the
                whole pytest run, and adjust the report etc.
                r�Quitting debugger)rg�do_quitrfr�exitris   ��rr�zBpytestPDB._get_pdb_wrapper_class.<locals>.PytestPdbWrapper.do_quit�s3����g�o�c�*���'�'�1�,��M�M�"5�6��
r/c���t�|�||�}|s4|jr(|jr|jj	d��|S)z�Suspend on setup().

                Needed after do_continue resumed, and entering another
                breakpoint again.
                T��in_)rg�setupr{rv�suspend_global_capture)rj�f�tbrlrms    �rr�z@pytestPDB._get_pdb_wrapper_class.<locals>.PytestPdbWrapper.setup�sE����g�m�A�r�*���t����*�*��+�+�B�B�t�B�L��
r/c���t�|�||�\}}|�ftdt|�dz
�}|rL||djjdd�r*|dz}|r#||djjdd�r�*||fS)NrrQ�__tracebackhide__F)rg�	get_stack�max�len�f_locals�get)rjr��t�stack�irms     �rr�zDpytestPDB._get_pdb_wrapper_class.<locals>.PytestPdbWrapper.get_stack�s���� �7�,�Q��2���q��9��A�s�5�z�A�~�.�A���a���� 4� 4� 8� 8�9L�e� T��Q�����a���� 4� 4� 8� 8�9L�e� T��a�x�r/)�__name__�
__module__�__qualname__rvr{rhrs�do_c�do_contr��do_q�do_exitr�r��
__classcell__)rmr~rNrMs@���r�PytestPdbWrapperrd�sC���#�N��J�
�
�4)�(�D�7�
��D��G�
�
 �
 r/r�)�_pytest.config)rMr]rNr�r~s` ` @rrZz pytestPDB._get_pdb_wrapper_class�s#����L	 �L	 �w�L	 �\ �r/c���ddl}|j�d}n|jjd�}|r|jd��|jr�|j
j
|j�}|j�|jdk(r�|jdd�}|�|jd|�n^|j|�}|dk(r|jdd	|�d
��n1|r|jdd	|�d|�d��n|jdd	|���|j|�di|��}	|jr1|jjj|j|	�
�|	S)z4Initialize PDB debugging, dropping any IO capturing.rN�capturemanagerTr��headerrprozPDB z (IO-capturing turned off)z (IO-capturing turned off for rqrr�)r�r9�	getplugin�suspendr:rGrtrurfr7rwrOrary�pytest_enter_pdb)
rM�method�args�kwargsr~rNr|r�r}�_pdbs
          r�	_init_pdbzpytestPDB._init_pdb�sQ��	����%�,0�F��'�'�1�1�2B�C�F���N�N�t�N�$��;�;����6�6�s�{�{�C�B��G�G�I��#�#�q�(����H�d�3���%��F�F�3��'� #� 1� 1�&� 9�I� �H�,����s�d�6�(�2L�$M�N�"�����"�6�(�*H���ST�U��
���s�d�6�(�O�4�*�s�"�"�6�*�4�V�4��������#�#�4�4�C�K�K�T�4�R��r/c��tj�j}|jdg|��i|��}|j	|�y)zBInvoke debugging via ``Pdb.set_trace``, dropping any IO capturing.r8N)rU�	_getframe�f_backr�r8)rMr�r��framer�s     rr8zpytestPDB.set_traces;���
�
��&�&���s�}�}�[�:�4�:�6�:�����u�r/)rN�CaptureManager | Noner>z
str | bool)rNr�r=)r�r�r��__doc__r9�__annotations__r:r6rfrJ�classmethodrOrarZr�r8r�r/rr5r5\s���1�15�N�.�5�!�G�]�!�	��
����;?��8�?�����
�$��$�L�Q ��Q �f�$��$�L���r/r5c�,�eZdZ								dd�Zdd�Zy)rDc��|jjjd�}|rc|jd��|j	�\}}t
jj|�t
jj|�|j�J�t|jjtj�st||j|�yy)Nr�Tr�)rGrAr�r��read_global_capturerU�stdout�write�excinfo�
isinstancer�unittest�SkipTest�
_enter_pdb)rj�node�call�reportrN�out�errs       r�pytest_exception_interactz#PdbInvoke.pytest_exception_interacts������*�*�4�4�5E�F����)�)�d�)�3��1�1�3�H�C���J�J���S�!��J�J���S�!��|�|�'�'�'��$�,�,�,�,�h�.?�.?�@��t�T�\�\�6�2�Ar/c�0�t|�}t|�yr4)�_postmortem_traceback�post_mortem)rjr�r�s   r�pytest_internalerrorzPdbInvoke.pytest_internalerror&s��
"�7�
+���B�r/N)r�rr�z
CallInfo[Any]r�rr>r?)r��ExceptionInfo[BaseException]r>r?)r�r�r�r�r�r�r/rrDrDs,��3��3� -�3�7A�3�	
�3�r/rDc�,�eZdZed��dd��Zy)rCT)�wrapperc#�(K�t|�d��S�wr4)� wrap_pytest_function_for_tracing)rj�
pyfuncitems  r�pytest_pyfunc_callzPdbTrace.pytest_pyfunc_call,s����(��4���s�N)r>zGenerator[None, object, object])r�r�r�rr�r�r/rrCrC+s��
�d����r/rCc����tjd��|j�tj��d��fd��}||_y)z�Change the Python function object of the given Function item by a
    wrapper which actually enters pdb before calling the python function
    itself, effectively leaving the user in the pdb prompt in the first
    statement of the function.�runcallc�Z��tj�g|��i|��}�j|�yr4)�	functools�partialr�)r�r��funcr��testfunctions   ��rr�z1wrap_pytest_function_for_tracing.<locals>.wrapper=s)���� � ��?��?��?�����T�r/Nr=)r5r��objr��wraps)r�r�r�r�s  @@rr�r�2sD���
���y�)�D��>�>�L�
�_�_�\�"��#���J�Nr/c�R�|jjd�rt|�yy)zaWrap the given pytestfunct item for tracing support if --trace was given in
    the command line.r)N)rGr@r�)r�s r�&maybe_wrap_pytest_function_for_tracingr�Es%�����!�!�'�*�(��4�+r/c�D�|jjjd�j}|j	�|jj
j}d|jfd|jfd|jffD]B\}}||dfvs�
|s�|jdd|z�|ddd	k(r|dd}|j	|��D|jdd
�|j|�|jdd�t|�}d|_
t|�|S)
N�terminalreporterr��stderr�log�allrpz	captured ����
�	tracebackzentering PDBT)rGrAr��_twru�option�showcapture�	capstdout�	capstderr�caplogrw�
toterminalr��	_pdbshownr�)r�r��repr|r��sectionname�contentr�s        rr�r�Ls��
���	"�	"�	,�	,�-?�	@�	D�	D�B��G�G�I��+�+�$�$�0�0�K�
�3�=�=�!�	�3�=�=�!�	��
�
��!�	���W�
�;��.�.�7��F�F�3��k�1�2��r�s�|�t�#�!�#�2�,���G�G�G��	��F�F�3����N�N�2���F�F�3���	�w�	'�B��C�M���O��Jr/c�^�ddlm}t|j|�r|jjdSt|jt
�rB|jjj�J�|jjjS|j�J�|jdS)Nr)�UnexpectedException�)	�doctestr�r�r�exc_infor�cause�
__traceback__�_excinfo)r�r�s  rr�r�ks���+��'�-�-�!4�5��}�}�%�%�a�(�(�	�G�M�M�#8�	9��}�}�"�"�0�0�<�<�<��}�}�"�"�0�0�0����+�+�+�����"�"r/c��tjd�}|j�|jd|�|jrtjd�yy)Nr�r�)r5r��reset�interaction�quittingrr�)r��ps  rr�r�|sB�����M�*�A��G�G�I��M�M�$����z�z��
�
�)�*�r/)r�strr>ztuple[str, str])r,rr>r?)rGr
r>r?r=)r�rr�r�r�rr>r)r�r�r>�types.TracebackType)r�r�r>r?),r��
__future__rrr�rU�types�typingrrrr�r~r�
_pytest._coder�_pytest.capturer	r�r
rrr
�_pytest.config.argparsingr�_pytest.config.exceptionsr�
_pytest.nodesr�_pytest.reportsr�_pytest.runnerrrr.rHr5rDrCr�r�r�r�r�r�r/r�<module>rs���;�"���
�������'�*�!�0�#�.�,�0��&�#� ��0�6x�x�v��(���&5��
��5��<F����>#�"+r/

Youez - 2016 - github.com/yon3zu
LinuXploit