Your IP : 216.73.216.213
B
C$�X
� @ s� d Z ddlmZ ddlZddlZddlZdd� Zdd� Zdd � ZG d
d� d�Z G dd
� d
�Z
dd� Zdd� Zdd� Z
dd� ZdS )z6 interactive debugging with PDB, the Python Debugger. � )�absolute_importNc C s2 | � d�}|jddddd� |jddd d
d� d S )NZgeneralz--pdb�usepdb�
store_truez0start the interactive Python debugger on errors.)�dest�action�helpz--pdbcls�
usepdb_clszmodulename:classnamezqstart a custom interactive Python debugger on errors. For example: --pdbcls=IPython.terminal.debugger:TerminalPdb)r �metavarr )ZgetgroupZ
_addoption)�parser�group� r �B/opt/alt/python37/lib/python3.7/site-packages/_pytest/debugging.py�pytest_addoption s
r c C s dt � jiS )N� set_trace)� pytestPDBr r r r r
�pytest_namespace s r c s� | � d�s| � d�rh| j�t� d� | � d�r\| � d��d�\}}t|� ttj| |�}nt j
}|t_t j
tjf� � fdd�}tj
t _
| jt_| t_| j�|� d S )Nr r Z pdbinvoke�:c s � \t _t_d t_t jt_d S )N)�pdbr r �_pluginmanager�_config�Pdb�_pdb_clsr )�oldr r
�fin# s zpytest_configure.<locals>.fin)�getvalue�
pluginmanager�register� PdbInvoke�split�
__import__�getattr�sys�modulesr r r r r r �pytestr �_cleanup�append)�config�modname� classnameZpdb_clsr r )r r
�pytest_configure s
r) c @ s&