관리-도구
편집 파일: debugging.cpython-311.pyc
� �܋f�4 � �0 � d Z ddlZddlZddlZddlZddlZddlmZ ddlmZ ddlm Z ddlm Z ddlmZ ddlmZ dd lm Z dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z erddl!m"Z" ddl#m$Z$ de%dee%e%f fd�Z&deddfd�Z'deddfd�Z( G d� d � � Z) G d!� d"� � Z* G d#� d$� � Z+d%� Z,d&� Z-d'ed(ee. d)e de fd*�Z/d(ee. dej0 fd+�Z1d,ej0 ddfd-�Z2dS ).z4Interactive debugging with PDB, the Python Debugger.� N)�Any)�Callable)� Generator)�List)�Optional)�Tuple)�Type)� TYPE_CHECKING)�Union)�outcomes)� ExceptionInfo)�Config)�ConftestImportFailure)�hookimpl)�PytestPluginManager)�Parser)� UsageError)�Node)� BaseReport)�CaptureManager)�CallInfo�value�returnc � � | � d� � \ }}n*# t $ r}t j | �d�� � |�d}~ww xY w||fS )z#Validate syntax of --pdbcls option.�:z) is not in the format 'modname:classname'N)�split� ValueError�argparse�ArgumentTypeError)r �modname� classname�es �b/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/_pytest/debugging.py�_validate_usepdb_clsr$ ! so � ��"�[�[��-�-������� � � ��(��A�A�A� � �� ��������� �Y��s � � A�=�A�parserc �� � | � d� � }|� dddd�� � |� ddd t d �� � |� dd dd�� � d S )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$ )r% �groups r# �pytest_addoptionr4 , s� � ��O�O�I�&�&�E� ���� �� S� � � � � ���� �&� !�F� � � � � ���� �� 7� � � � � � � �configc � �� dd l �| � d� � r'| j � t � � d� � | � d� � r'| j � t � � d� � t j � �j t j t j f� � t j �_ | j t _ | t _ d�fd�}| � |� � d S ) Nr r0 �pdbtracer( � pdbinvoker c �~ �� t j � � � \ � _ t _ t _ d S �N)� pytestPDB�_saved�pop� set_trace�_pluginmanager�_config)�pdbs �r# �finzpytest_configure.<locals>.finU s3 �� � �� � �"�"� ��M��$����r5 �r N) rB �getvalue� pluginmanager�register�PdbTrace� PdbInvoker<