Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.137.187.85
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_bdb.pyc
�
?��cc@@spdZddlmZddlmZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZmZddlZdefd��YZd	efd
��YZdefd��YZd
efd��YZdZejje�ddZd�Zd�Zdejefd��YZdefd��YZ dd,d��YZ!dd�Z#e
d��Z$ee%dd�Z&dZ'e'dZ(d�Z)d�Z*d�Z+d�Z,d ej-fd!��YZ.d"e.fd#��YZ/d$e.fd%��YZ0d&e.fd'��YZ1d(e.fd)��YZ2d*�Z3e4d+krle3�ndS(-s� Test the bdb module.

    A test defines a list of tuples that may be seen as paired tuples, each
    pair being defined by 'expect_tuple, set_tuple' as follows:

        ([event, [lineno[, co_name[, eargs]]]]), (set_type, [sargs])

    * 'expect_tuple' describes the expected current state of the Bdb instance.
      It may be the empty tuple and no check is done in that case.
    * 'set_tuple' defines the set_*() method to be invoked when the Bdb
      instance reaches this state.

    Example of an 'expect_tuple, set_tuple' pair:

        ('line', 2, 'tfunc_main'), ('step', )

    Definitions of the members of the 'expect_tuple':
        event:
            Name of the trace event. The set methods that do not give back
            control to the tracer [1] do not trigger a tracer event and in
            that case the next 'event' may be 'None' by convention, its value
            is not checked.
            [1] Methods that trigger a trace event are set_step(), set_next(),
            set_return(), set_until() and set_continue().
        lineno:
            Line number. Line numbers are relative to the start of the
            function when tracing a function in the test_bdb module (i.e. this
            module).
        co_name:
            Name of the function being currently traced.
        eargs:
            A tuple:
            * On an 'exception' event the tuple holds a class object, the
              current exception must be an instance of this class.
            * On a 'line' event, the tuple holds a dictionary and a list. The
              dictionary maps each breakpoint number that has been hit on this
              line to its hits count. The list holds the list of breakpoint
              number temporaries that are being deleted.

    Definitions of the members of the 'set_tuple':
        set_type:
            The type of the set method to be invoked. This may
            be the type of one of the Bdb set methods: 'step', 'next',
            'until', 'return', 'continue', 'break', 'quit', or the type of one
            of the set methods added by test_bdb.Bdb: 'ignore', 'enable',
            'disable', 'clear', 'up', 'down'.
        sargs:
            The arguments of the set method if any, packed in a tuple.
i(tabsolute_import(tprint_functionN(tcontextmanager(tislicetrepeattBdbExceptioncB@seZRS((t__name__t
__module__(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyRAstBdbErrorcB@seZdZRS(s!Error raised by the Bdb instance.(RRt__doc__(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyRBstBdbSyntaxErrorcB@seZdZRS(sSyntax error in the test case.(RRR	(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR
CstBdbNotExpectedErrorcB@seZdZRS(sUnexpected result.(RRR	(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyRDss.pycC@s+dtj_itj_dgtj_dS(Ni(t_bdbt
BreakpointtnexttbplisttNonet
bpbynumber(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytreset_BreakpointNsc
C@s�gtjjD]}|r
|^q
}|s/dSt}x�|D]�}|sWd}t}n|jrfdnd}|jr{dnd}|d|j|||j|j	t
jj|j
�|jf7}|jr�|d|jf7}n|d	7}q<W|S(
Nts!BpNum Temp Enb Hits Ignore Where
syes sno  tyessno s%-5d %s %s %-4d %-6d at %s:%ds
	stop only if %ss
(RR
RtFalsetTruet	temporarytenabledtnumberthitstignoretostpathtbasenametfiletlinetcond(tbptbp_listtheader_addedtinfotdisptenab((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytinfo_breakpointsSs"%
	 	tBdbcB@sqeZdZd�Zeddd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�ZRS(s$Extend Bdb to enhance test coverage.cC@s%d|_tt|�j|||�S(N(Rt	currentbptsuperR)ttrace_dispatch(tselftframeteventtarg((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR,ks	c	C@s�t|t�ry|tkr't�}ntj|d �}|j}t||�}|j}	|	j	}|	j
}|	j}ntt
|�j||d|d|d|�}
t|
t�r�t|
��n|
S(Ni����RR!tfuncname(t
isinstancetstrt__file__tglobalst	importlibt
import_modulet__dict__tevalt__code__tco_filenametco_firstlinenotco_nameR+R)t	set_breakR(R-tfilenametlinenoRR!R1tglobals_tmoduletfunctcodetres((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR>os				cC@s�|std��nyt|�}Wn!tk
rHtd|��nXytjj|}Wn!tk
r�td|��nX|dkr�td|��n|S(s�Return a breakpoint by its index in Breakpoint.bybpnumber.

        For invalid arg values or if the breakpoint doesn't exist,
        raise a ValueError.
        sBreakpoint number expecteds Non-numeric breakpoint number %ss!Breakpoint number %d out of rangesBreakpoint %d already deletedN(t
ValueErrortintRR
Rt
IndexErrorR(R-R0RR"((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytget_bpbynumber�s

cC@sNtt|�j||�\|_|_|j|jd|_|j|jfS(Ni(R+R)t	get_stacktstacktindexR.(R-tftt((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyRJ�s'cC@s"|j|�}|jd7_dS(s8Increment the ignore count of Breakpoint number 'bpnum'.iN(RIR(R-tbpnumR"((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt
set_ignore�scC@s|j|�}t|_dS(N(RIRR(R-ROR"((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt
set_enable�scC@s|j|�}t|_dS(N(RIRR(R-ROR"((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytset_disable�scC@s+|j||�}|r't|��ndS(N(tclear_breakR(R-tfnameR@terr((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt	set_clear�scC@sB|jstd��n|jd8_|j|jd|_dS(sMove up in the frame stack.sOldest frameiiN(RLRRKR.(R-((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytset_up�s	cC@sU|jdt|j�kr+td��n|jd7_|j|jd|_dS(sMove down in the frame stack.isNewest frameiN(RLtlenRKRR.(R-((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytset_down�sN(RRR	R,RRR>RIRJRPRQRRRVRWRY(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR)hs								tTracercB@s�eZdZdedd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�ZRS(s$A tracer for testing the bdb module.cC@sXtt|�jd|�||_||_|dk	rAd|nd|_|j�dS(NtskipsDry-run results for %s:(R+RZt__init__t
expect_settdry_runRtheadert	init_test(R-R]R[R^t	test_case((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR\�s
		cC@sad|_d|_d|_tt|jddd��|_tt|jddd��|_dS(Niii(	Rt
cur_exceptt
expect_set_notbreakpoint_hitstlistRR]t
expected_listtset_list(R-((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR`�s
			!cC@s�|jdk	r|j�n|dkrsy&tt|�j|||�}|SWq�tk
ro}||_|jSXntt|�j|||�SdS(Nt	exception(RbRR+RZR,R(R-R.R/R0REte((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR,�s	cC@s4|j|�sdS|jd||�|j�dS(Ntcall(t	stop_heret
process_eventtnext_set_method(R-R.t
argument_list((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt	user_call�scC@s�|jd|�|jr_|jr_t�jd�}x(|jd�D]}td|�qDWn|j�d|_|j	�dS(NR s
s  (
RlR^RdR(tstriptsplittprinttdelete_temporariesRRm(R-R.R%R ((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt	user_line�s
	cC@s!|jd||�|j�dS(Ntreturn(RlRm(R-R.treturn_value((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytuser_return�scC@s'||_|jd|�|j�dS(NRh(texc_infoRlRm(R-R.Rx((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytuser_exception�s	cC@s|jg}||f|_dS(N(R*Rd(R-R0R#((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytdo_clearscC@s5|jr1x%|jdD]}|j|�qWndS(Ni(Rdtclear_bpbynumber(R-tn((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyRss	cC@sh|jd7_y|jjd�|_Wn$tk
rNtd|j��nX|jjd�|_dS(Niis-expect_set list exhausted, cannot pop item %d(RcRftpoptexpectRHRRgt	set_tuple(R-((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytpop_next
s
c
G@s+d}|dkr"|jd}n|j||�|jdk	ri|jri|jg}|gf|_n||_|j�|jr�|j|j	�dS|j
r�|j|j
d|d�|j�n|dkr�|j
d�nBt|j
�dkr'|dkr�|j
d\}}t|j��}|jsK|jd	|j�n|j||jdd
�|jg|D]}	||	^qrg|jdD]}	|j|	�j^q�d�|jt|�|jdd
�q'|dkr't|jd|j
d�s$|jd|j|jf�q$q'ndS(NRhiisWrong event typeRjRuiR s(No breakpoints hit at expect_set item %dsBreakpoint numbers do not matchsWrong breakpoint hit countisWrong temporary breakpointss/Wrong exception at expect_set item %d, got '%s'(RjRu(RRxRJR*RdR/R�R^tprint_stateR_R~tcheck_equaltcheck_lno_nametcheck_expect_max_sizeRXtsortedtkeystraise_not_expectedRcRIRR2(
R-R/R.targsttbR#tbpsttemporariestbpnumsR|((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyRlsL	
		
	 &
cC@s1||krdS|jd||j|f�dS(Ns"%s at expect_set item %d, got '%s'(R�Rc(R-texpectedtresulttmsg((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�Fs	cC@szt|j�}|dkrD|j�}|j|jd|d�n|dkrv|j|jd|jjjd�ndS(s+Check the line number and function co_name.isWrong line numberisWrong function nameN(RXR~tlno_abs2relR�R.tf_codeR=(R-tsR@((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�LscC@s8t|j�|kr4td|j|jf��ndS(Ns'Invalid size of the %s expect tuple: %s(RXR~R
R/(R-tsize((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�VscC@sR|j|jjj�}|jj}||jt�krN||jjjdS|S(Ni(tcanonicR.R�R;tf_linenoR4R<(R-RTR@((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�[scC@s=|r9|j|�|jt�kr9|jjj|dS|S(Ni(R�R4R.R�R<(R-RTR@((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytlno_rel2absas9cC@s!|j�}|jjj}d|j||f}|jr�d}xN|jdD]?}|dkrm|d7}n|d||j|�jf7}qNW|d7}d|dt|jd�d	}|d|7}n*|jd
kr�|d|j	dj
7}n|d7}|jd�t|j�d
S(Ns('%s', %d, '%s't{is, s%s: %st}t(it)Rhs), i t,(
R�R.R�R=R/RdRIRR3RxRtljustR(R-R@R=tstateR�R|((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt	get_statefs 	
$
#
cC@sP|dk	r/|jdkr/t�t|�ntd|j|j�f�dS(Nis%d: %s(RRcRrR�(R-R_((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�xs
cC@sE|d7}|dt|j�7}|d|j�7}t|��dS(Ns
s  Expected: %s
s  Got:      (R3R~R�R(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�~s
cC@s�|jd}t|j�dkr/|jdnd}t|d|�}|dkr_|�dS|dkr|||j�dS|d
kr�||j�dS|r�|dks�|dkr�|dkr|d}|d}|j||�}||gt|d�}||�n/|dkr)||�n|dkr?|�nd|_|j�|j	rh|j
�n#|jr~|j�n|j
d�|j�ntd|j��dS(Niiitset_tsteptcontinuetquitRRutuntiltbreaktclearRtenabletdisabletuptdownis"%s" is an invalid set_tuple(R�R�R�(RRu(R�R�RR�R�(R�R�(R�R�(RR�R�(R�R�(RRXRtgetattrR.R�ReR/R�R^R�R~R�R�RmR
(R-tset_typeR�t
set_methodRTR@((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyRm�sD
(

	




	
	
	


N(RRR	RRR\R`R,RoRtRwRyRzRsR�RlR�R�R�R�R�R�R�R�Rm(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyRZ�s*					
					
	2		
					t	TracerRuncB@s5eZdZdd�Zd�Zdddd�ZRS(sAProvide a context for running a Tracer instance with a test case.cC@sF||_|j|_t|jd|d|jd|j��|_dS(NR[R^Ra(RaR^RZR]tidttracer(R-RaR[((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR\�s	cC@st�|jS(N(RR�(R-((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt	__enter__�scC@st�tjd�d}|jjrG|d7}|d|jj7}n|dk	r�tt|�r�t	|t
�r�|jr�|jd}|r�|d|7}n|jr�t
|�tS|jj|�q�ts�td��n|r|jr�t
|�q|jj|�ndS(NRs+All paired tuples have not been processed, sthe last one was number %dis
s#BdbNotExpectedError with empty args(RtsystsettraceRR�RgRct
issubclassRR2t
BaseExceptionR�R^RrRRatfailRtAssertionError(R-ttype_tvaluet	tracebackt	not_emptyterr_msg((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt__exit__�s*


	
	
N(RRR	RR\R�R�(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR��s	c
C@s�d�}ddg}|j|�t�}t|_d�|_t|td	�t|���|_t	|��Ct
jjt
j��t|d|��}|jt�WdQXWdQXdS(
s{Run a test and print the dry-run results.

    'modules':  A dictionary mapping module names to their source code as a
                string. The dictionary MUST include one module named
                'test_module' with a main() function.
    'set_list': A list of set_type tuples to be run on the module.

    For example, running the following script outputs the following results:

    *****************************   SCRIPT   ********************************

    from test.test_bdb import run_test, break_in_func

    code = '''
        def func():
            lno = 3

        def main():
            func()
            lno = 7
    '''

    set_list = [
                break_in_func('func', 'test_module.py'),
                ('continue', ),
                ('step', ),
                ('step', ),
                ('step', ),
                ('quit', ),
            ]

    modules = { 'test_module': code }
    run_test(modules, set_list)

    ****************************   results   ********************************

    1: ('line', 2, 'tfunc_import'),    ('next',),
    2: ('line', 3, 'tfunc_import'),    ('step',),
    3: ('call', 5, 'main'),            ('break', ('test_module.py', None, False, None, 'func')),
    4: ('None', 5, 'main'),            ('continue',),
    5: ('line', 3, 'func', ({1: 1}, [])), ('step',),
      BpNum Temp Enb Hits Ignore Where
      1     no   yes 1    0      at test_module.py:2
    6: ('return', 3, 'func'),          ('step',),
    7: ('line', 7, 'main'),            ('step',),
    8: ('return', 7, 'main'),          ('quit',),

    *************************************************************************

    cs@sFy-x&t|�}t|�}|V|VqWWntk
rAdSXdS(N(Rt
StopIteration(tatbtxty((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytgens

RR�cS@sdS(N(R(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt<lambda>"RR[N(R(R�((textendtBaseTestCaseRR^R�ReRtiterR]tcreate_modulesR�RtappendRtgetcwdR�truncallttfunc_import(tmodulesRgR[R�tslttestR�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pytrun_test�s3	
		$
c
c@s�tjj���z|tjjdtj��xW|D]O}|d}t|d��!}|j	t
j||��WdQXtj
|�q3WdVWdtjjd�x|D]}tjj|�q�WXWdQXdS(Nis.pytw(R�tsupportttemp_cwdR�RtinsertRR�topentwritettextwraptdedentt	linecachet
checkcacheR}tforget(R�tmRTRM((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�)s

 	
cC@sd|d|||ffS(NR�(R(R1RTRR!((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt
break_in_func9sttest_module_for_bdbcC@sddl}|j�dS(Ni(R�tmain(R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�>scC@s*d}t�t�d}d}d}dS(Niiii(ttfunc_firstttfunc_second(tlno((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt
tfunc_mainBscC@sd}d}d}dS(Niii((R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�JscC@s
d}dS(Ni((R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�OsR�cB@seZdZeZRS(sBase class for all tests.(RRR	R^(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�Rst
StateTestCasecB@s�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�ZRS(s;Test the step, next, return, until and quit 'set_' methods.c	C@sGd
ddd
ddddg|_t|��}|jt�WdQXdS(NR iR�R�iRjiR�R�(R iR�(R�(R iR�(R�(RjiR�(R�(R iR�(R�(R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt	test_stepYscC@sxdddddd	tdffdddddidd6gffdddg|_t|��}|jt�WdQXdS(NR iR�R�iRjiR�R�RR�iR�(R iR�(R�(R iR�(R�(RjiR�(RiR�(R�(R�(R iR�(R�(R4R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_step_on_last_statementcscC@sxdddddd	tdffdddddidd6gffdddg|_t|��}|jt�WdQXdS(NR iR�R�iRjiR�R�RR�RiR�(R iR�(R�(R iR�(R�(RjiR�(RiR�(R�(R(R iR�(R�(R4R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_next_on_last_statementoscC@sMdd
ddddddddg
|_t|��}|jt�WdQXdS(NR iR�R�iRiRjiR�R�(R iR�(R�(R iR�(R(R iR�(R�(RjiR�(R�(R iR�(R�(R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt	test_next{sc
C@sad}i|t6}t|��<dd	d
dg|_t|��}|jt�WdQXWdQXdS(Ns9
            def main():
                lno = 3
        R iR�RiR�(R iR�(R(R iR�(R�(tTEST_MODULER�R]R�R�R�(R-RDR�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_next_over_import�s

c	C@sGddd
dddddg|_t|��}|jt�WdQXdS(NR iR�R�iRjiR�RR�(R iR�(R�(R iR�(R�(RjiR�(R(R iR�(R�(R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_next_on_plain_statement�scC@sMddddddddddg
|_t|��}|jt�WdQXdS(NR iR�R�iRjiR�R�RRiR�(R iR�(R�(R iR�(R�(RjiR�(R�(RiR�(R(R iR�(R�(R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_next_in_caller_frame�sc
C@sSdd
ddddddddddg|_t|��}|jt�WdQXdS(NR iR�R�iRjiR�RuiR�(R iR�(R�(R iR�(R�(RjiR�(R�(R iR�(Ru(RuiR�(R�(R iR�(R�(R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_return�scC@sMddddddddddg
|_t|��}|jt�WdQXdS(NR iR�R�iRjiR�R�RRuiR�(R iR�(R�(R iR�(R�(RjiR�(R�(RiR�(Ru(RuiR�(R�(R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_return_in_caller_frame�scC@sMddd
dddddddg
|_t|��}|jt�WdQXdS(NR iR�R�iRjiR�R�R�(R iR�(R�(R iR�(R�(RjiR�(R�(R iR�(R�(R iR�(R�(R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt
test_until�scC@sMddddddddddg
|_t|��}|jt�WdQXdS(NR iR�R�iRjiR�R�RR�iR�(R iR�(R�(R iR�(R�(RjiR�(R�(RiR�(R�(R iR�(R�(R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_until_in_caller_frame�sc
C@ssd}i|t6}t|��Nd
ddd
g|_dtf}t|d	|��}|jt�WdQXWdQXdS(Ns9
            def main():
                lno = 3
        R iR�R�iR�s
importlib*R[(R iR�(R�(R iR�(R�(R�R�R]R�R�R�(R-RDR�R[R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt	test_skip�s

cC@s>ddg|_t|��}|jt|jt�WdQXdS(NR iR�R�(R iR�(R�(R]R�tassertRaisesRR�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt	test_down�sc	C@sGdd
ddddddg|_t|��}|jt�WdQXdS(NR iR�R�iRjiR�R�RR�(R iR�(R�(R iR�(R�(RjiR�(R�(RiR�(R�(R]R�R�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_up�s(RRR	R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�Vs	
						
						tBreakpointTestCasecB@sheZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(sTest the breakpoint set method.cC@sDdddfg|_t|��}|jt|jt�WdQXdS(	NR iR�R�s/non/existent/module.pyi(R iR�(s/non/existent/module.pyi(R]R�R�RR�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_bp_on_non_existent_modulescC@spd}i|t6}t|��Kddtdffg|_t|��}|jt|jt�WdQXWdQXdS(Ns9
            def main():
                lno = 3
        R iR�R�i(R iR�(	R�R�tTEST_MODULE_FNAMER]R�R�RR�R�(R-RDR�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_bp_after_last_statements

cC@s�d}i|t6}t|���dtdtt�dtdtt�d
ddddid	d	6d	gffddddid	d6dgffdg
|_t|��}|jt�WdQXWdQXdS(Ns�
            def func():
                lno = 3

            def main():
                for i in range(2):
                    func()
        R iR�RCRR�iiR�(R iR�(RiR�(RiR�(R�(R�(R�(	R�R�R�R�RR]R�R�R�(R-RDR�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_temporary_bps

"+cC@sd}i|t6}t|���d
tdt�dtdtt�dddfdddd	did
d
6gffddfdddfdddd	did
d6dgffddfdddd	didd
6gffdg|_t|��}|jt�WdQXWdQXdS(Ns�
            def func():
                lno = 3

            def main():
                for i in range(3):
                    func()
        R iR�RCRR�R�iiR�R�(R iR�(RiR�(RiR�(i(RiR�(R�(i(RiRC(i(RiRC(R�(i(RiRC(R�(R�(	R�R�R�R�RR]R�R�R�(R-RDR�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_disabled_temporary_bp+s"

%((cC@s�d}i|t6}t|��jdtdttd�d
ddd	did	d
6gffdg|_t|��}|jt�WdQXWdQXdS(Ns�
            def func(a):
                lno = 3

            def main():
                for i in range(3):
                    func(i)
        R iR�RCsa == 2RR�iiR�(R iR�(RiR�(R�(R�(	R�R�R�R�RR]R�R�R�(R-RDR�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_bp_conditionGs

(cC@s�d}i|t6}t|��jdtdttd�d
ddd	did
d
6gffdg|_t|��}|jt�WdQXWdQXdS(Nsk
            def func(a):
                lno = 3

            def main():
                func(0)
        R iR�RCs1 // 0RR�iiR�(R iR�(RiR�(R�(R�(	R�R�R�R�RR]R�R�R�(R-RDR�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt)test_bp_exception_on_condition_evaluation[s

(cC@s�d}i|t6}t|��pdtdt�d
ddfdddd
didd6gffdg|_t|��}|jt�WdQXWdQXdS(Ns�
            def func():
                lno = 3

            def main():
                for i in range(2):
                    func()
        R iR�RCRRiR�iR�(R iR�(RiR�(i(RiR�(R�(R�(R�R�R�R�R]R�R�R�(R-RDR�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_bp_ignore_countns

(cC@s�d}i|t6}t|���dtdt�dtdt�dddfdd	dfdddddidd6gffddfdddddidd6gffddddidd6gffdg|_t|��}|jt�WdQXWdQXdS(Ns�
            def func():
                lno = 3

            def main():
                for i in range(3):
                    func()
        R iR�RCRRiR�R�iR�R�(R iR�(RiR�(RiR�(i(RiR�(i(RiR�(R�(i(RiRC(R�(R�(R�(R�R�R�R�R]R�R�R�(R-RDR�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt test_ignore_count_on_disabled_bp�s 

%(cC@sd}i|t6}t|���ddtdffddtdffddtdffddddd
idd6gffdddd
idd6gffdtdffddddd
idd6gffdg|_t|��}|jt�WdQXWdQXdS(Ns�
            def func():
                lno = 3
                lno = 4

            def main():
                for i in range(3):
                    func()
        R iR�R�iRiR�RCiR�R�(R iR�(RiR�(RiR�(RiR�(R�(R�(RiRC(R�(R�(R�R�R�R]R�R�R�(R-RDR�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_clear_two_bp_on_same_line�s	

+(cC@sJddtdffg|_t|��}|jt|jt�WdQXdS(NR iR�R�i(R iR�(R4R]R�R�RR�R�(R-R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_clear_at_no_bp�s(
RRR	R�R�R�R�R�R�R�R�R�R�(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR��s		
							tRunTestCasecB@s eZdZd�Zd�ZRS(s Test run, runeval and set_trace.c	C@sVd}d
ddd
g|_t|��)}|jttj|�dd	��WdQXdS(Ns
            lno = 2
        R is<module>R�RuR�s<string>texec(R is<module>(R�(Ruis<module>(R�(R]R�truntcompileR�R�(R-RDR�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt
test_run_step�s
cC@s�d}i|t6}t|��fddddddddddg
|_ddl}t|�� }|jd
t�t��WdQXWdQXdS(Ns9
            def main():
                lno = 3
        R is<module>R�RjiR�iRuR�istest_module_for_bdb.main()(R is<module>(R�(RjiR�(R�(R iR�(R�(RuiR�(R�(Ruis<module>(R�(R�R�R]R�R�trunevalR5tlocals(R-RDR�R�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyttest_runeval_step�s

(RRR	RR(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�s	tIssuesTestCasecB@seZdZd�ZRS(sTest fixed bdb issues.cC@s�d}d}i|t6|d6}t|��pdtdd�dddddidd6gffdddddg
|_t|��}|jt�WdQXWdQXdS(Ns�
            from test_module_for_bdb_2 import func
            def main():
                func()
                lno = 5
        s9
            def func():
                lno = 3
        ttest_module_for_bdb_2R iR�RCstest_module_for_bdb_2.pyRR�iiR�RuiR�R�(R iR�(RiR�(R�(R�(RuiRC(R�(R iR�(R�(R�R�R�R]R�R�R�(R-tcode_1tcode_2R�R�((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt+test_step_at_return_with_no_trace_in_caller�s	

(RRR	R(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyR�scC@stjjtttt�dS(N(R�R�trun_unittestR�RR�R(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt	test_mains
	t__main__((5R	t
__future__RRtbdbRR�RtunittestR�R6R�t
contextlibRt	itertoolsRRttest.supportR�t	ExceptionRRR
RR^RtsplitextR4RR(R)tobjectRZR�RR�R�RR�R�R�R�R�R�R�tTestCaseR�R�R�RRRR(((s4/usr/local/python-2.7/lib/python2.7/test/test_bdb.pyt<module>1sP		U�,K
				��"!	
© 2025 GrazzMean