Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/nose/plugins/debug.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�9�c@s<dZddlZddlmZdefd��YZdS(s�
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``.
i�N(tPlugintPdbcBsMeZdZeZeZdZd�Zd�Zd�Z	d�Z
d�ZRS(s�
    Provides --pdb and --pdb-failures options that cause the test runner to
    drop into pdb if it encounters an error or failure, respectively.
    ic
Csf|jdddddd|jdt�dd	�|jd
ddddd|jdt�dd
�dS(s&Register commandline options.
        s--pdbtactiont
store_truetdesttdebugErrorstdefaulttNOSE_PDBthelpsDrop into debugger on errorss--pdb-failurest
debugFailurestNOSE_PDB_FAILURESsDrop into debugger on failuresN(t
add_optiontgettFalse(tselftparsertenv((s6/sys/lib/python2.7/site-packages/nose/plugins/debug.pytoptionsscCs:||_|jp|j|_|j|_|j|_dS(s<Configure which kinds of exceptions trigger plugin.
        N(tconfRR	tenabledtenabled_for_errorstenabled_for_failures(RRR((s6/sys/lib/python2.7/site-packages/nose/plugins/debug.pyt	configure s	cCs|js
dS|j|�dS(s1Enter pdb if configured to debug errors.
        N(Rtdebug(Rttestterr((s6/sys/lib/python2.7/site-packages/nose/plugins/debug.pytaddError(s	cCs|js
dS|j|�dS(s3Enter pdb if configured to debug failures.
        N(RR(RRR((s6/sys/lib/python2.7/site-packages/nose/plugins/debug.pyt
addFailure/s	cCsRddl}|\}}}|j}|j|_ztj|�Wd||_XdS(Ni�(tsyststdoutt
__stdout__tpdbtpost_mortem(RRRtectevttbR((s6/sys/lib/python2.7/site-packages/nose/plugins/debug.pyR6s	(t__name__t
__module__t__doc__R
RRtscoreRRRRR(((s6/sys/lib/python2.7/site-packages/nose/plugins/debug.pyR
s	
			(R&Rtnose.plugins.baseRR(((s6/sys/lib/python2.7/site-packages/nose/plugins/debug.pyt<module>s

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].