• File: debug.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib/python3.7/site-packages/nose/plugins/__pycache__/debug.cpython-37.pyc
  • Date Modified: 07/07/2021 11:30 PM
  • File size: 2.25 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

~RS@s,dZddlZddlmZGdddeZdS)z
This plugin provides ``--pdb`` and ``--pdb-failures`` options. The ``--pdb``
option will drop the test runner into pdb when it encounters an error. To
drop into pdb on failure, use ``--pdb-failures``.
N)Pluginc@sDeZdZdZdZdZdZddZddZdd	Z	d
dZ
dd
ZdS)Pdbz
    Provides --pdb and --pdb-failures options that cause the test runner to
    drop into pdb if it encounters an error or failure, respectively.
    FcCsX|jddd|dddd|jddd	|d
ddd|jddd
|dddddS)z&Register commandline options.
        z--pdb
store_true	debugBothZNOSE_PDBFz(Drop into debugger on failures or errors)actiondestdefaulthelpz--pdb-failures
debugFailuresZNOSE_PDB_FAILURESzDrop into debugger on failuresz--pdb-errorsdebugErrorsZNOSE_PDB_ERRORSzDrop into debugger on errorsN)Z
add_optionget)selfparserenvrC/opt/alt/python37/lib/python3.7/site-packages/nose/plugins/debug.pyoptionss


zPdb.optionscCs4||_|jp|j|_|jp|j|_|jp,|j|_dS)z<Configure which kinds of exceptions trigger plugin.
        N)confrrenabled_for_errorsrenabled_for_failuresZenabled)rrrrrr	configure%sz
Pdb.configurecCs|js
dS||dS)z1Enter pdb if configured to debug errors.
        N)rdebug)rtesterrrrraddError-szPdb.addErrorcCs|js
dS||dS)z3Enter pdb if configured to debug failures.
        N)rr)rrrrrr
addFailure4szPdb.addFailurecCs<ddl}|\}}}|j}|j|_zt|Wd||_XdS)Nr)sysstdout
__stdout__pdbZpost_mortem)rrrZecZevtbrrrrr;s
z	Pdb.debugN)__name__
__module____qualname____doc__rrZscorerrrrrrrrrr
sr)r%r Znose.plugins.baserrrrrr<module>s