ó
ŠwÛjc           @@ sp  d  Z  d d l m Z d d l m Z d d l Z d d l Z d d l Z d d l Z d d l	 Z	 d d l
 Z
 d d l Z d d l m Z d d l m Z m Z d d l Z d e f d „  ƒ  YZ d	 e f d
 „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d Z e j j e ƒ d d Z d „  Z d „  Z d e j e f d „  ƒ  YZ d e f d „  ƒ  YZ  d d, d „  ƒ  YZ! d d „ Z# e d „  ƒ Z$ e e% d d „ Z& d Z' e' d Z( d „  Z) d „  Z* d „  Z+ d „  Z, d  e j- f d! „  ƒ  YZ. d" e. f d# „  ƒ  YZ/ d$ e. f d% „  ƒ  YZ0 d& e. f d' „  ƒ  YZ1 d( e. f d) „  ƒ  YZ2 d* „  Z3 e4 d+ k rle3 ƒ  n  d S(-   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    (   t   absolute_import(   t   print_functionN(   t   contextmanager(   t   islicet   repeatt   BdbExceptionc           B@ s   e  Z RS(    (   t   __name__t
   __module__(    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR   A   s    t   BdbErrorc           B@ s   e  Z d  Z RS(   s!   Error raised by the Bdb instance.(   R   R   t   __doc__(    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR   B   s    t   BdbSyntaxErrorc           B@ s   e  Z d  Z RS(   s   Syntax error in the test case.(   R   R   R	   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR
   C   s    t   BdbNotExpectedErrorc           B@ s   e  Z d  Z RS(   s   Unexpected result.(   R   R   R	   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR   D   s    s   .pyc           C@ s+   d t  j _ i  t  j _ d  g t  j _ d  S(   Ni   (   t   _bdbt
   Breakpointt   nextt   bplistt   Nonet
   bpbynumber(    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   reset_BreakpointN   s    c       
   C@ sñ   g  t  j j D] }  |  r |  ^ q } | s/ d St } xµ | D]­ }  | sW d } t } n  |  j rf d n d } |  j r{ d n d } | d |  j | | |  j |  j	 t
 j j |  j ƒ |  j f 7} |  j rß | d |  j f 7} n  | d	 7} q< W| S(
   Nt    s!   BpNum Temp Enb Hits Ignore Where
s   yes s   no  t   yess   no s   %-5d %s %s %-4d %-6d at %s:%ds   
	stop only if %ss   
(   R   R   R   t   Falset   Truet	   temporaryt   enabledt   numbert   hitst   ignoret   ost   patht   basenamet   filet   linet   cond(   t   bpt   bp_listt   header_addedt   infot   dispt   enab(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   info_breakpointsS   s"    %	 	t   Bdbc           B@ sq   e  Z d  Z d „  Z e d d d „ Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d	 „  Z d
 „  Z RS(   s$   Extend Bdb to enhance test coverage.c         C@ s%   d  |  _ t t |  ƒ j | | | ƒ S(   N(   R   t	   currentbpt   superR)   t   trace_dispatch(   t   selft   framet   eventt   arg(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR,   k   s    	c      	   C@ sÈ   t  | t ƒ ry | t k r' t ƒ  } n t j | d  ƒ } | j } t | | ƒ } | j }	 |	 j	 } |	 j
 } |	 j } n  t t |  ƒ j | | d | d | d | ƒ}
 t  |
 t ƒ rÄ t |
 ƒ ‚ n  |
 S(   NiýÿÿÿR   R!   t   funcname(   t
   isinstancet   strt   __file__t   globalst	   importlibt   import_modulet   __dict__t   evalt   __code__t   co_filenamet   co_firstlinenot   co_nameR+   R)   t	   set_breakR   (   R-   t   filenamet   linenoR   R!   R1   t   globals_t   modulet   funct   codet   res(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR>   o   s    				c         C@ s¤   | s t  d ƒ ‚ n  y t | ƒ } Wn! t  k
 rH t  d | ƒ ‚ n Xy t j j | } Wn! t k
 r€ t  d | ƒ ‚ n X| d k r  t  d | ƒ ‚ 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.
        s   Breakpoint number expecteds    Non-numeric breakpoint number %ss!   Breakpoint number %d out of ranges   Breakpoint %d already deletedN(   t
   ValueErrort   intR   R   R   t
   IndexErrorR   (   R-   R0   R   R"   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   get_bpbynumber„   s    c         C@ sN   t  t |  ƒ j | | ƒ \ |  _ |  _ |  j |  j d |  _ |  j |  j f S(   Ni    (   R+   R)   t	   get_stackt   stackt   indexR.   (   R-   t   ft   t(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRJ   ˜   s    'c         C@ s"   |  j  | ƒ } | j d 7_ d S(   s8   Increment the ignore count of Breakpoint number 'bpnum'.i   N(   RI   R   (   R-   t   bpnumR"   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt
   set_ignore�   s    c         C@ s   |  j  | ƒ } t | _ d  S(   N(   RI   R   R   (   R-   RO   R"   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt
   set_enable¢   s    c         C@ s   |  j  | ƒ } t | _ d  S(   N(   RI   R   R   (   R-   RO   R"   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   set_disable¦   s    c         C@ s+   |  j  | | ƒ } | r' t | ƒ ‚ n  d  S(   N(   t   clear_breakR   (   R-   t   fnameR@   t   err(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt	   set_clearª   s    c         C@ sB   |  j  s t d ƒ ‚ n  |  j  d 8_  |  j |  j  d |  _ d S(   s   Move up in the frame stack.s   Oldest framei   i    N(   RL   R   RK   R.   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   set_up¯   s    	c         C@ sU   |  j  d t |  j ƒ k r+ t d ƒ ‚ n  |  j  d 7_  |  j |  j  d |  _ d S(   s   Move down in the frame stack.i   s   Newest framei    N(   RL   t   lenRK   R   R.   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   set_down¶   s    N(   R   R   R	   R,   R   R   R>   RI   RJ   RP   RQ   RR   RV   RW   RY   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR)   h   s   								t   Tracerc           B@ sÎ   e  Z d  Z d e d d „ Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d d „ Z d „  Z d „  Z RS(   s$   A tracer for testing the bdb module.c         C@ sX   t  t |  ƒ j d | ƒ | |  _ | |  _ | d  k	 rA d | n d  |  _ |  j ƒ  d  S(   Nt   skips   Dry-run results for %s:(   R+   RZ   t   __init__t
   expect_sett   dry_runR   t   headert	   init_test(   R-   R]   R[   R^   t	   test_case(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR\   À   s
    		c         C@ sa   d  |  _ d |  _ d  |  _ t t |  j d d  d ƒ ƒ |  _ t t |  j d d  d ƒ ƒ |  _ d  S(   Ni    i   i   (	   R   t
   cur_exceptt   expect_set_not   breakpoint_hitst   listR   R]   t   expected_listt   set_list(   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR`   È   s
    			!c         C@ s“   |  j  d  k	 r |  j  ‚ n  | d k rs y& t t |  ƒ j | | | ƒ } | SWq� t k
 ro } | |  _  |  j SXn t t |  ƒ j | | | ƒ Sd  S(   Nt	   exception(   Rb   R   R+   RZ   R,   R   (   R-   R.   R/   R0   RE   t   e(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR,   Ï   s    	c         C@ s4   |  j  | ƒ s d  S|  j d | | ƒ |  j ƒ  d  S(   Nt   call(   t	   stop_heret   process_eventt   next_set_method(   R-   R.   t   argument_list(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt	   user_callá   s    c         C@ s€   |  j  d | ƒ |  j r_ |  j r_ t ƒ  j d ƒ } x( | j d ƒ D] } t d | ƒ qD Wn  |  j ƒ  d  |  _ |  j	 ƒ  d  S(   NR    s   
s     (
   Rl   R^   Rd   R(   t   stript   splitt   printt   delete_temporariesR   Rm   (   R-   R.   R%   R    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt	   user_lineê   s    
	c         C@ s!   |  j  d | | ƒ |  j ƒ  d  S(   Nt   return(   Rl   Rm   (   R-   R.   t   return_value(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   user_return÷   s    c         C@ s'   | |  _  |  j d | ƒ |  j ƒ  d  S(   NRh   (   t   exc_infoRl   Rm   (   R-   R.   Rx   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   user_exceptionû   s    	c         C@ s   |  j  g } | | f |  _ d  S(   N(   R*   Rd   (   R-   R0   R#   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   do_clear   s    c         C@ s5   |  j  r1 x% |  j  d D] } |  j | ƒ q Wn  d  S(   Ni   (   Rd   t   clear_bpbynumber(   R-   t   n(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRs     s    	c         C@ sh   |  j  d 7_  y |  j j d ƒ |  _ Wn$ t k
 rN t d |  j  ƒ ‚ n X|  j j d ƒ |  _ d  S(   Ni   i    s-   expect_set list exhausted, cannot pop item %d(   Rc   Rf   t   popt   expectRH   R   Rg   t	   set_tuple(   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   pop_next
  s    c   
      G@ s+  d  } | d k r" |  j d } n  |  j | | ƒ |  j d  k	 ri |  j ri |  j g } | g  f |  _ n  | |  _ |  j ƒ  |  j r™ |  j |  j	 ƒ d  S|  j
 rÉ |  j |  j
 d | d ƒ |  j ƒ  n  | d k rå |  j d ƒ nBt |  j
 ƒ d k r'| d k rØ|  j
 d \ } } t | j ƒ  ƒ } |  j sK|  j d	 |  j ƒ n  |  j | |  j d d
 ƒ |  j g  | D] }	 | |	 ^ qrg  |  j d D] }	 |  j |	 ƒ j ^ q“d ƒ |  j t | ƒ |  j d d ƒ q'| d k r't |  j d |  j
 d ƒ s$|  j d |  j |  j f ƒ q$q'n  d  S(   NRh   i   i    s   Wrong event typeRj   Ru   i   R    s(   No breakpoints hit at expect_set item %ds   Breakpoint numbers do not matchs   Wrong breakpoint hit counti   s   Wrong temporary breakpointss/   Wrong exception at expect_set item %d, got '%s'(   Rj   Ru   (   R   Rx   RJ   R*   Rd   R/   R€   R^   t   print_stateR_   R~   t   check_equalt   check_lno_namet   check_expect_max_sizeRX   t   sortedt   keyst   raise_not_expectedRc   RI   R   R2   (
   R-   R/   R.   t   argst   tbR#   t   bpst   temporariest   bpnumsR|   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRl     sL    	
			 &
c         C@ s1   | | k r d  S|  j  d | |  j | f ƒ d  S(   Ns"   %s at expect_set item %d, got '%s'(   R‡   Rc   (   R-   t   expectedt   resultt   msg(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR‚   F  s    	c         C@ sz   t  |  j ƒ } | d k rD |  j ƒ  } |  j |  j d | d ƒ n  | d k rv |  j |  j d |  j j j d ƒ n  d S(   s+   Check the line number and function co_name.i   s   Wrong line numberi   s   Wrong function nameN(   RX   R~   t   lno_abs2relR‚   R.   t   f_codeR=   (   R-   t   sR@   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRƒ   L  s    c         C@ s8   t  |  j ƒ | k r4 t d |  j |  j f ƒ ‚ n  d  S(   Ns'   Invalid size of the %s expect tuple: %s(   RX   R~   R
   R/   (   R-   t   size(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR„   V  s    c         C@ sR   |  j  |  j j j ƒ } |  j j } | |  j  t ƒ k rN | |  j j j d S| S(   Ni   (   t   canonicR.   R‘   R;   t   f_linenoR4   R<   (   R-   RT   R@   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR�   [  s    c         C@ s=   | r9 |  j  | ƒ |  j  t ƒ k r9 |  j j j | d S| S(   Ni   (   R”   R4   R.   R‘   R<   (   R-   RT   R@   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   lno_rel2absa  s    9c         C@ s!  |  j  ƒ  } |  j j j } d |  j | | f } |  j rÏ d } xN |  j d D]? } | d k rm | d 7} n  | d | |  j | ƒ j f 7} qN W| d 7} d | d t |  j d ƒ d	 } | d | 7} n* |  j d
 k rù | d |  j	 d j
 7} n  | d 7} | j d ƒ t |  j ƒ d S(   Ns   ('%s', %d, '%s't   {i    s   , s   %s: %st   }t   (i   t   )Rh   s   ), i    t   ,(   R�   R.   R‘   R=   R/   Rd   RI   R   R3   Rx   R   t   ljustR   (   R-   R@   R=   t   stateRŠ   R|   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt	   get_statef  s     	$
#
c         C@ sP   | d  k	 r/ |  j d k r/ t ƒ  t | ƒ n  t d |  j |  j ƒ  f ƒ d  S(   Ni   s   %d: %s(   R   Rc   Rr   Rž   (   R-   R_   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR�   x  s    c         C@ sE   | d 7} | d t  |  j ƒ 7} | d |  j ƒ  7} t | ƒ ‚ d  S(   Ns   
s     Expected: %s
s     Got:      (   R3   R~   Rž   R   (   R-   R�   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR‡   ~  s    
c         C@ s¯  |  j  d } t |  j  ƒ d k r/ |  j  d n d  } t |  d | ƒ } | d k r_ | ƒ  d  S| d k r| | |  j ƒ d  S| d
 k r™ | |  j ƒ d  S| r« | d k s· | d k r˜| d k r| d } | d } |  j | | ƒ } | | g t | d ƒ } | | Œ  n/ | d k r)| | Œ  n | d k r?| ƒ  n  d  |  _ |  j ƒ  |  j	 rh|  j
 ƒ  n# |  j r~|  j ƒ  n  |  j d ƒ |  j ƒ  n t d |  j  ƒ ‚ d  S(   Ni    i   i   t   set_t   stept   continuet   quitR   Ru   t   untilt   breakt   clearR   t   enablet   disablet   upt   downi   s   "%s" is an invalid set_tuple(   R    R¡   R¢   (   R   Ru   (   R¤   R¥   R   R¦   R§   (   R¨   R©   (   R¤   R¥   (   R   R¦   R§   (   R¨   R©   (   R   RX   R   t   getattrR.   R–   Re   R/   R€   R^   R�   R~   Rƒ   R„   Rm   R
   (   R-   t   set_typeRˆ   t
   set_methodRT   R@   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRm   „  sD    (	


	
		N(   R   R   R	   R   R   R\   R`   R,   Ro   Rt   Rw   Ry   Rz   Rs   R€   Rl   R‚   Rƒ   R„   R�   R–   Rž   R�   R‡   Rm   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRZ   ½   s*   										
	2		
					t	   TracerRunc           B@ s5   e  Z d  Z d d „ Z d „  Z d d d d „ Z RS(   sA   Provide a context for running a Tracer instance with a test case.c         C@ sF   | |  _  | j |  _ t | j d | d |  j d | j ƒ  ƒ|  _ d  S(   NR[   R^   Ra   (   Ra   R^   RZ   R]   t   idt   tracer(   R-   Ra   R[   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR\   µ  s    	c         C@ s   t  ƒ  |  j S(   N(   R   R¯   (   R-   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt	   __enter__»  s    c         C@ sþ   t  ƒ  t j d  ƒ d } |  j j rG | d 7} | d |  j j 7} n  | d  k	 rË t t | ƒ rË t	 | t
 ƒ rË | j rË | j d } | rž | d | 7} n  |  j rµ t | ƒ t S|  j j | ƒ qË n  | rú |  j rç t | ƒ qú |  j j | ƒ n  d  S(   NR   s+   All paired tuples have not been processed, s   the last one was number %di    s   
(   R   t   syst   settraceR   R¯   Rg   Rc   t
   issubclassR   R2   t   BaseExceptionRˆ   R^   Rr   R   Ra   t   fail(   R-   t   type_t   valuet	   tracebackt	   not_emptyt   err_msg(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   __exit__À  s*    
	
	N(   R   R   R	   R   R\   R°   R»   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR­   ²  s   	c      
   C@ s¹   d „  } d d g } | j  | ƒ t ƒ  } t | _ d „  | _ t | t d	 ƒ t | ƒ ƒ ƒ | _ t	 |  ƒ �C t
 j j t j ƒ  ƒ t | d | ƒ� } | j t ƒ Wd QXWd QXd S(
   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',),

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

    c         s@ sF   y- x& t  |  ƒ } t  | ƒ } | V| Vq WWn t k
 rA d  SXd  S(   N(   R   t   StopIteration(   t   at   bt   xt   y(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   gen  s    R   R    c           S@ s   d  S(   N(   R   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   <lambda>"  R   R[   N(   R   (   R    (    (   t   extendt   BaseTestCaseR   R^   R®   Re   R   t   iterR]   t   create_modulesR±   R   t   appendR   t   getcwdR­   t   runcallt   tfunc_import(   t   modulesRg   R[   RÁ   t   slt   testR¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   run_testÞ  s    3			$c         c@ sË   t  j j ƒ  �¶ z| t j j d t j ƒ  ƒ xW |  D]O } | d } t | d ƒ �! } | j	 t
 j |  | ƒ ƒ Wd  QXt j | ƒ q3 Wd  VWd  t j j d ƒ x |  D] } t  j j | ƒ q¦ WXWd  QXd  S(   Ni    s   .pyt   w(   RÍ   t   supportt   temp_cwdR±   R   t   insertR   RÈ   t   opent   writet   textwrapt   dedentt	   linecachet
   checkcacheR}   t   forget(   RË   t   mRT   RM   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRÆ   )  s    
 	c         C@ s   d | d  | | |  f f S(   NR¤   (   R   (   R1   RT   R   R!   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   break_in_func9  s    t   test_module_for_bdbc          C@ s   d d  l  }  |  j ƒ  d  S(   Ni    (   RÜ   t   main(   RÜ   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRÊ   >  s    c          C@ s*   d }  t  ƒ  t ƒ  d }  d }  d }  d  S(   Ni   i   i   i   (   t   tfunc_firstt   tfunc_second(   t   lno(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt
   tfunc_mainB  s    c          C@ s   d }  d }  d }  d  S(   Ni   i   i   (    (   Rà   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRÞ   J  s    c          C@ s
   d }  d  S(   Ni   (    (   Rà   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRß   O  s    RÄ   c           B@ s   e  Z d  Z e Z RS(   s   Base class for all tests.(   R   R   R	   R^   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRÄ   R  s   t   StateTestCasec           B@ sŒ   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z RS(   s;   Test the step, next, return, until and quit 'set_' methods.c      	   C@ sG   d
 d d d d d d d g |  _  t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   Rj   i   RÞ   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R    (   Rj   i   RÞ   (   R    (   R    i   RÞ   (   R¢   (   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt	   test_stepY  s    c         C@ sx   d d d d d d	 t  d f f d d d d d i d d 6g  f f d d d g |  _ t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   Rj   i   RÞ   R¤   R   R¡   i   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R    (   Rj   i   RÞ   (   R   i   RÞ   (   R¡   (   R    (   R    i   RÞ   (   R¢   (   R4   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_step_on_last_statementc  s    c         C@ sx   d d d d d d	 t  d f f d d d d d i d d 6g  f f d d d g |  _ t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   Rj   i   RÞ   R¤   R   R¡   R   i   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R    (   Rj   i   RÞ   (   R   i   RÞ   (   R¡   (   R   (   R    i   RÞ   (   R¢   (   R4   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_next_on_last_statemento  s    c         C@ sM   d d d d d d d d d d g
 |  _  t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   R   i   Rj   i   Rß   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R   (   R    i   Rá   (   R    (   Rj   i   Rß   (   R    (   R    i   Rß   (   R¢   (   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt	   test_next{  s    c      
   C@ sa   d } i | t  6} t | ƒ �< d d	 d
 d g |  _ t |  ƒ � } | j t ƒ Wd  QXWd  QXd  S(   Ns9   
            def main():
                lno = 3
        R    i   RÊ   R   i   R¢   (   R    i   RÊ   (   R   (   R    i   RÊ   (   R¢   (   t   TEST_MODULERÆ   R]   R­   RÉ   RÊ   (   R-   RD   RË   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_next_over_import†  s    c      	   C@ sG   d d d d d d d d g |  _  t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   Rj   i   RÞ   R   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R    (   Rj   i   RÞ   (   R   (   R    i   RÞ   (   R¢   (   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_next_on_plain_statement”  s    c         C@ sM   d d d d d d d d d d g
 |  _  t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   Rj   i   RÞ   R¨   R   R   i   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R    (   Rj   i   RÞ   (   R¨   (   R   i   Rá   (   R   (   R    i   Rá   (   R¢   (   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_next_in_caller_frame   s    c         C@ sS   d d d d d d d d d d d d g |  _  t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   Rj   i   RÞ   Ru   i   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R    (   Rj   i   RÞ   (   R    (   R    i   RÞ   (   Ru   (   Ru   i   RÞ   (   R    (   R    i   Rá   (   R¢   (   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_return­  s    c         C@ sM   d d d d d d d d d d g
 |  _  t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   Rj   i   RÞ   R¨   R   Ru   i   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R    (   Rj   i   RÞ   (   R¨   (   R   i   Rá   (   Ru   (   Ru   i   Rá   (   R¢   (   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_return_in_caller_frame¹  s    c         C@ sM   d d d d d d d d d d g
 |  _  t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   Rj   i   RÞ   R£   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R    (   Rj   i   RÞ   (   R    (   R    i   RÞ   (   R£   (   R    i   RÞ   (   R¢   (   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt
   test_untilÄ  s    c         C@ sM   d d d d d d d d d d g
 |  _  t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   Rj   i   RÞ   R¨   R   R£   i   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R    (   Rj   i   RÞ   (   R¨   (   R   i   Rá   (   R£   (   R    i   Rá   (   R¢   (   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_until_in_caller_frameÏ  s    c      
   C@ ss   d } i | t  6} t | ƒ �N d
 d d d g |  _ d t  f } t |  d	 | ƒ� } | j t ƒ Wd  QXWd  QXd  S(   Ns9   
            def main():
                lno = 3
        R    i   RÊ   R    i   R¢   s
   importlib*R[   (   R    i   RÊ   (   R    (   R    i   RÊ   (   R¢   (   Rç   RÆ   R]   R­   RÉ   RÊ   (   R-   RD   RË   R[   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt	   test_skipÚ  s    c         C@ s>   d d g |  _  t |  ƒ � } |  j t | j t ƒ Wd  QXd  S(   NR    i   Rá   R©   (   R    i   Rá   (   R©   (   R]   R­   t   assertRaisesR   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt	   test_downë  s    c      	   C@ sG   d d d d d d d d g |  _  t |  ƒ � } | j t ƒ Wd  QXd  S(   NR    i   Rá   R    i   Rj   i   RÞ   R¨   R   R¢   (   R    i   Rá   (   R    (   R    i   Rá   (   R    (   Rj   i   RÞ   (   R¨   (   R   i   Rá   (   R¢   (   R]   R­   RÉ   Rá   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_upó  s    (   R   R   R	   Rã   Rä   Rå   Ræ   Rè   Ré   Rê   Rë   Rì   Rí   Rî   Rï   Rñ   Rò   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRâ   V  s   	
												t   BreakpointTestCasec           B@ sh   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z RS(   s   Test the breakpoint set method.c         C@ sD   d d d f g |  _  t |  ƒ � } |  j t | j t ƒ Wd  QXd  S(	   NR    i   RÊ   R¤   s   /non/existent/module.pyi   (   R    i   RÊ   (   s   /non/existent/module.pyi   (   R]   R­   Rð   R   RÉ   RÊ   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_bp_on_non_existent_module   s    c         C@ sp   d } i | t  6} t | ƒ �K d d t d f f g |  _ t |  ƒ � } |  j t | j t ƒ Wd  QXWd  QXd  S(   Ns9   
            def main():
                lno = 3
        R    i   RÊ   R¤   i   (   R    i   RÊ   (	   Rç   RÆ   t   TEST_MODULE_FNAMER]   R­   Rð   R   RÉ   RÊ   (   R-   RD   RË   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_bp_after_last_statement  s    c         C@ sÃ   d } i | t  6} t | ƒ �ž d t d t t ƒ d t d t t ƒ d d d d d i d	 d	 6d	 g f f d d d d i d	 d 6d g f f d g
 |  _ t |  ƒ � } | j t ƒ Wd  QXWd  QXd  S(   Ns�   
            def func():
                lno = 3

            def main():
                for i in range(2):
                    func()
        R    i   RÊ   RC   R   R¡   i   i   R¢   (   R    i   RÊ   (   R   i   RÊ   (   R   i   RÊ   (   R¡   (   R¡   (   R¢   (	   Rç   RÆ   RÛ   Rõ   R   R]   R­   RÉ   RÊ   (   R-   RD   RË   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_temporary_bp  s    "+c         C@ s  d } i | t  6} t | ƒ �ç d t d t ƒ d t d t t ƒ d d d f d d d d	 d i d
 d
 6g  f f d d f d d d f d d d d	 d i d
 d 6d g f f d d f d d d d	 d i d d
 6g  f f d g |  _ t |  ƒ � } | j t ƒ Wd  QXWd  QXd  S(   Ns�   
            def func():
                lno = 3

            def main():
                for i in range(3):
                    func()
        R    i   RÊ   RC   R   R§   R¡   i   i   R¦   R¢   (   R    i   RÊ   (   R   i   RÊ   (   R   i   RÊ   (   i   (   R   i   RÊ   (   R¡   (   i   (   R   i   RC   (   i   (   R   i   RC   (   R¡   (   i   (   R   i   RC   (   R¡   (   R¢   (	   Rç   RÆ   RÛ   Rõ   R   R]   R­   RÉ   RÊ   (   R-   RD   RË   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_disabled_temporary_bp+  s"    %((c         C@ s�   d } i | t  6} t | ƒ �j d t d t t d ƒ d d d d	 d i d	 d
 6g  f f d g |  _ t |  ƒ � } | j t ƒ Wd  QXWd  QXd  S(   Ns’   
            def func(a):
                lno = 3

            def main():
                for i in range(3):
                    func(i)
        R    i   RÊ   RC   s   a == 2R   R¡   i   i   R¢   (   R    i   RÊ   (   R   i   RÊ   (   R¡   (   R¢   (	   Rç   RÆ   RÛ   Rõ   R   R]   R­   RÉ   RÊ   (   R-   RD   RË   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_bp_conditionG  s    (c         C@ s�   d } i | t  6} t | ƒ �j d t d t t d ƒ d d d d	 d i d
 d
 6g  f f d g |  _ t |  ƒ � } | j t ƒ Wd  QXWd  QXd  S(   Nsk   
            def func(a):
                lno = 3

            def main():
                func(0)
        R    i   RÊ   RC   s   1 // 0R   R¡   i   i   R¢   (   R    i   RÊ   (   R   i   RÊ   (   R¡   (   R¢   (	   Rç   RÆ   RÛ   Rõ   R   R]   R­   RÉ   RÊ   (   R-   RD   RË   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt)   test_bp_exception_on_condition_evaluation[  s    (c         C@ s•   d } i | t  6} t | ƒ �p d t d t ƒ d d d f d d d d
 d i d d 6g  f f d g |  _ t |  ƒ � } | j t ƒ Wd  QXWd  QXd  S(   Ns�   
            def func():
                lno = 3

            def main():
                for i in range(2):
                    func()
        R    i   RÊ   RC   R   R   i   R¡   i   R¢   (   R    i   RÊ   (   R   i   RÊ   (   i   (   R   i   RÊ   (   R¡   (   R¢   (   Rç   RÆ   RÛ   Rõ   R]   R­   RÉ   RÊ   (   R-   RD   RË   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_bp_ignore_countn  s    (c         C@ sú   d } i | t  6} t | ƒ �Õ d t d t ƒ d t d t ƒ d d d f d d	 d f d d d d d i d d 6g  f f d d f d d d d d i d d 6g  f f d d d d i d d 6g  f f d g |  _ t |  ƒ � } | j t ƒ Wd  QXWd  QXd  S(   Ns�   
            def func():
                lno = 3

            def main():
                for i in range(3):
                    func()
        R    i   RÊ   RC   R   R   i   R§   R¡   i   R¦   R¢   (   R    i   RÊ   (   R   i   RÊ   (   R   i   RÊ   (   i   (   R   i   RÊ   (   i   (   R   i   RÊ   (   R¡   (   i   (   R   i   RC   (   R¡   (   R¡   (   R¢   (   Rç   RÆ   RÛ   Rõ   R]   R­   RÉ   RÊ   (   R-   RD   RË   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt    test_ignore_count_on_disabled_bpƒ  s     %(c         C@ s   d } i | t  6} t | ƒ �Û d d t d f f d d t d f f d d t d f f d d d d d
 i d d 6g  f f d d d d
 i d d 6g  f f d t d f f d d d d d
 i d d 6g  f f d g |  _ t |  ƒ � } | j t ƒ Wd  QXWd  QXd  S(   Ns¨   
            def func():
                lno = 3
                lno = 4

            def main():
                for i in range(3):
                    func()
        R    i   RÊ   R¤   i   R   i   R¡   RC   i   R¥   R¢   (   R    i   RÊ   (   R   i   RÊ   (   R   i   RÊ   (   R   i   RÊ   (   R¡   (   R¡   (   R   i   RC   (   R¡   (   R¢   (   Rç   RÆ   Rõ   R]   R­   RÉ   RÊ   (   R-   RD   RË   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_clear_two_bp_on_same_linež  s    	+(c         C@ sJ   d d t  d f f g |  _ t |  ƒ � } |  j t | j t ƒ Wd  QXd  S(   NR    i   RÊ   R¥   i   (   R    i   RÊ   (   R4   R]   R­   Rð   R   RÉ   RÊ   (   R-   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_clear_at_no_bp·  s    (   R   R   R	   Rô   Rö   R÷   Rø   Rù   Rú   Rû   Rü   Rý   Rþ   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRó   ý  s   									t   RunTestCasec           B@ s    e  Z d  Z d „  Z d „  Z RS(   s    Test run, runeval and set_trace.c      	   C@ sV   d } d
 d d d g |  _  t |  ƒ �) } | j t t j | ƒ d d	 ƒ ƒ Wd  QXd  S(   Ns   
            lno = 2
        R    i   s   <module>R    Ru   R¢   s   <string>t   exec(   R    i   s   <module>(   R    (   Ru   i   s   <module>(   R¢   (   R]   R­   t   runt   compileRÕ   RÖ   (   R-   RD   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_run_stepÁ  s
    c         C@ s‹   d } i | t  6} t | ƒ �f d d d d d d d d d d g
 |  _ d d  l } t |  ƒ �  } | j d t ƒ  t ƒ  ƒ Wd  QXWd  QXd  S(   Ns9   
            def main():
                lno = 3
        R    i   s   <module>R    Rj   i   RÝ   i   Ru   R¢   i    s   test_module_for_bdb.main()(   R    i   s   <module>(   R    (   Rj   i   RÝ   (   R    (   R    i   RÝ   (   R    (   Ru   i   RÝ   (   R    (   Ru   i   s   <module>(   R¢   (   Rç   RÆ   R]   RÜ   R­   t   runevalR5   t   locals(   R-   RD   RË   RÜ   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   test_runeval_stepÍ  s    (   R   R   R	   R  R  (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyRÿ   ¾  s   	t   IssuesTestCasec           B@ s   e  Z d  Z d „  Z RS(   s   Test fixed bdb issues.c         C@ s¢   d } d } i | t  6| d 6} t | ƒ �p d t d d ƒ d d d d d i d d 6g  f f d d d d d g
 |  _ t |  ƒ � } | j t ƒ Wd  QXWd  QXd  S(   Nsƒ   
            from test_module_for_bdb_2 import func
            def main():
                func()
                lno = 5
        s9   
            def func():
                lno = 3
        t   test_module_for_bdb_2R    i   RÊ   RC   s   test_module_for_bdb_2.pyR   R¡   i   i   R    Ru   i   RÝ   R¢   (   R    i   RÊ   (   R   i   RÊ   (   R¡   (   R    (   Ru   i   RC   (   R    (   R    i   RÝ   (   R¢   (   Rç   RÆ   RÛ   R]   R­   RÉ   RÊ   (   R-   t   code_1t   code_2RË   R¯   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt+   test_step_at_return_with_no_trace_in_callerã  s    	
(   R   R   R	   R  (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyR  à  s   c           C@ s   t  j j t t t t ƒ d  S(   N(   RÍ   RÐ   t   run_unittestRâ   Rÿ   Ró   R  (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt	   test_main  s
    	t   __main__(    (5   R	   t
   __future__R    R   t   bdbR   R±   R   t   unittestRÕ   R6   R×   t
   contextlibR   t	   itertoolsR   R   t   test.supportRÍ   t	   ExceptionR   R   R
   R   R^   R   t   splitextR4   R   R(   R)   t   objectRZ   R­   R   RÎ   RÆ   R   RÛ   Rç   Rõ   RÊ   Rá   RÞ   Rß   t   TestCaseRÄ   Râ   Ró   Rÿ   R  R  R   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_bdb.pyt   <module>1   sP   		Uõ,K
				§Á"!	