ó
‹wÛjc           @   s	  d  d l  Z  d  d l m Z m Z m Z m Z d  d l Z d  d l Z d  d l Z d  d l	 Z	 y d  d l
 Z
 Wn e k
 r‡ e Z
 n Xd e f d „  ƒ  YZ d e f d „  ƒ  YZ d e  j f d „  ƒ  YZ d	 e  j f d
 „  ƒ  YZ d „  Z e d k re ƒ  n  d S(   iÿÿÿÿN(   t   verboset   run_unittestt   start_threadst   requires_type_collectingt   C1055820c           B   s   e  Z d  „  Z RS(   c         C   s   | |  _  |  |  _ d  S(   N(   t   it   loop(   t   selfR   (    (    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_gc.pyt   __init__   s    	(   t   __name__t
   __module__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_gc.pyR      s   t   GC_Detectorc           B   s   e  Z d  „  Z RS(   c            s7   t  ˆ  _ ‡  f d †  } t j t d ƒ | ƒ ˆ  _ d  S(   Nc            s   t  ˆ  _ d  S(   N(   t   Truet   gc_happened(   t   ignored(   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_gc.pyt   it_happened"   s    iš  (   t   FalseR   t   weakreft   refR   t   wr(   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_gc.pyR      s    	(   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_gc.pyR      s   t   GCTestsc           B   s
  e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e d „  ƒ Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e j e d ƒ d „  ƒ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s:   g  } | j  | ƒ t j ƒ  ~ |  j t j ƒ  d ƒ d  S(   Ni   (   t   appendt   gct   collectt   assertEqual(   R   t   l(    (    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_gc.pyt	   test_list.   s
    
c         C   s7   i  } | | d <t  j ƒ  ~ |  j t  j ƒ  d ƒ d  S(   Ni   (   R   R   R   (   R   t   d(    (    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_gc.pyt	   test_dict5   s
    

c         C   sF   g  } | f } | j  | ƒ t j ƒ  ~ ~ |  j t j ƒ  d ƒ d  S(   Ni   (   R   R   R   R   (   R   R   t   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_gc.pyt
   test_tuple<   s    	
c         C   sC   d d d „  ƒ  Y} | | _  t j ƒ  ~ |  j t j ƒ  d ƒ d  S(   Nt   Ac           B   s   e  Z RS(    (   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_gc.pyR   G   s   i    (    (   t   aR   R   t   assertNotEqual(   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_gc.pyt
   test_classF   s
    	
c         C   s=   d t  f d „  ƒ  Y} t j ƒ  ~ |  j t j ƒ  d ƒ d  S(   NR   c           B   s   e  Z RS(    (   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_gc.pyR   O   s   i    (   t   objectR   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_gc.pyt   test_newstyleclassN   s    
c         C   sL   d d d „  ƒ  Y} | ƒ  } | | _  t j ƒ  ~ |  j t j ƒ  d ƒ d  S(   NR   c           B   s   e  Z RS(    (   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_gc.pyR   V   s   i    (    (   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_gc.pyt   test_instanceU   s    		
c         C   s
  d t  f d „  ƒ  Y} | ƒ  } | | _ t j ƒ  ~ |  j t j ƒ  d ƒ d t f d „  ƒ  Y} d | | f d „  ƒ  Y} | ƒ  } | | _ t j ƒ  ~ |  j t j ƒ  d ƒ ~ ~ |  j t j ƒ  d ƒ | ƒ  | _ ~ |  j t j ƒ  d ƒ |  j t j ƒ  d ƒ d  S(   NR   c           B   s   e  Z RS(    (   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_gc.pyR   `   s   i    t   Bc           B   s   e  Z RS(    (   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_gc.pyR&   g   s   t   Cc           B   s   e  Z RS(    (   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_gc.pyR'   i   s   (   R#   R    R   R   R!   t   listR   (   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_gc.pyt   test_newinstance^   s&    		
		
c         C   sC   d d d „  ƒ  Y} | ƒ  } t  j ƒ  ~ |  j t  j ƒ  d ƒ d  S(   NR   c           B   s   e  Z d  „  Z RS(   c         S   s   |  j  |  _ d  S(   N(   R   t   init(   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_gc.pyR   z   s    (   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_gc.pyR   y   s   i    (    (   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_gc.pyt   test_methodw   s
    	
c         C   sÍ   d d d „  ƒ  Y} d d d „  ƒ  Y} | ƒ  } | | _  t | ƒ } | ƒ  } | | _ t j ƒ  ~ ~ |  j t j ƒ  d ƒ x: t j D]" } t | ƒ | k r† | `  Pq† q† W|  j d ƒ t j j | ƒ d  S(	   NR   c           B   s   e  Z d  „  Z RS(   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_gc.pyt   __del__…   t    (   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_gc.pyR   „   s   R&   c           B   s   e  Z RS(    (   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_gc.pyR&   †   s   i    s&   didn't find obj in garbage (finalizer)(    (    (	   R    t   idt   bR   R   R!   t   garbaget   failt   remove(   R   R   R&   R    t   id_aR/   t   obj(    (    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_gc.pyt   test_finalizer�   s"    				
c         C   sÓ   d t  f d „  ƒ  Y} d t  f d „  ƒ  Y} | ƒ  } | | _ t | ƒ } | ƒ  } | | _ t j ƒ  ~ ~ |  j t j ƒ  d ƒ x: t j D]" } t | ƒ | k rŒ | ` PqŒ qŒ W|  j d ƒ t j j	 | ƒ d  S(   NR   c           B   s   e  Z d  „  Z RS(   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_gc.pyR,   �   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_gc.pyR   œ   s   R&   c           B   s   e  Z RS(    (   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_gc.pyR&   ž   s   i    s&   didn't find obj in garbage (finalizer)(
   R#   R    R.   R/   R   R   R!   R0   R1   R2   (   R   R   R&   R    R3   R/   R4   (    (    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_gc.pyt   test_finalizer_newclass™   s"    				
c         B   s5   i  } d | Ue  j ƒ  ~ |  j e  j ƒ  d ƒ d  S(   Ns   def f(): pass
i   (   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_gc.pyt   test_function±   s
    
c         C   s4   d „  } t  j ƒ  | ƒ  |  j t  j ƒ  d ƒ d  S(   Nc          S   s   t  j ƒ  }  d  S(   N(   t   syst	   _getframe(   t   frame(    (    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_gc.pyt   f»   s    i   (   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_gc.pyt
   test_frameº   s    	
c         C   s¸   t  j ƒ  |  j t  j g  ƒ g  } | j | ƒ t | ƒ } t  j ƒ  } t  j | t  j Bƒ ~ t  j ƒ  t  j | ƒ |  j t	 t  j ƒ d ƒ t  j j
 ƒ  } |  j t | ƒ | ƒ d  S(   Ni   (   R   R   R   R0   R   R.   t	   get_debugt	   set_debugt   DEBUG_SAVEALLt   lent   pop(   R   t   Lt   id_Lt   debugR4   (    (    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_gc.pyt   test_saveallÁ   s    

c         C   s]   t  j ƒ  } t  j ƒ  t  j d ƒ d d d „  ƒ  Y} | ƒ  } ~ t  j ƒ  t  j | Œ  d  S(   Ni   R   c           B   s   e  Z d  „  Z RS(   c         S   s   t  |  ƒ d  S(   N(   t   dir(   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_gc.pyR,   à   s    (   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_gc.pyR   ß   s   (    (   R   t   get_thresholdt   enablet   set_thresholdt   disable(   R   t
   thresholdsR   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_gc.pyt   test_delÙ   s    
	
c         C   s`   t  j ƒ  } t  j ƒ  t  j d ƒ d t f d „  ƒ  Y} | ƒ  } ~ t  j ƒ  t  j | Œ  d  S(   Ni   R   c           B   s   e  Z d  „  Z RS(   c         S   s   t  |  ƒ d  S(   N(   RF   (   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_gc.pyR,   ï   s    (   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_gc.pyR   î   s   (   R   RG   RH   RI   R#   RJ   (   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_gc.pyt   test_del_newclassè   s    
	
c         C   sF   |  j  } t j ƒ  | t j ƒ  d ƒ t ƒ  } | t j ƒ  d ƒ d  S(   Ni    i   (   i    i    i    (   i   i    i    (   t   _baseAssertEqualR   R   t	   get_countt   dict(   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_gc.pyt   test_get_countý   s
    	
	c         C   s€   |  j  } t j ƒ  t ƒ  } t j d ƒ | t j ƒ  d ƒ t j d ƒ | t j ƒ  d ƒ t j d ƒ | t j ƒ  d ƒ d  S(   Ni    i   i   (   i    i   i    (   i    i    i   (   i    i    i    (   R   R   R   RP   RO   (   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_gc.pyt   test_collect_generations  s    	
	c            sÚ   d d ‡  f d †  ƒ  Y‰  t  j ƒ  d } x  t d ƒ D]’ } g  } x# t | ƒ D] } | ˆ  ƒ  g } qO Wg  } x# t | ƒ D] } | ˆ  ƒ  g } q{ Wi  } x+ t | ƒ D] } i | d 6ˆ  ƒ  d 6} q§ Wq6 Wt  j ƒ  d  S(   Nt   Ouchc              s   e  Z d  Z ‡  f d †  Z RS(   i    c            s4   ˆ  j  d ˆ  _  ˆ  j  d d k r0 t j ƒ  n  d  S(   Ni   i   i    (   t   nR   R   (   R   (   RS   (    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_gc.pyR,     s    (   R	   R
   RT   R,   (    (   RS   (    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_gc.pyRS     s   i–   i   i   (    (   R   RH   t   rangeRJ   (   R   t   Nt   countR   R   t   ut   v(    (   RS   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_gc.pyt   test_trashcan  s    
s*   test meaningless on builds without threadsc            s$  d ‰ d } d „  ‰ d t  f ‡  ‡ f d †  ƒ  Y‰  ‡  ‡ f d †  ‰ ‡ ‡ f d †  } t j ƒ  } t j d ƒ zr g  ‰ g  } x3 t | ƒ D]% } t j d	 | ƒ } | j | ƒ q� Wt | ‡ f d
 †  ƒ � t	 j
 d ƒ Wd  QXWd  t j | ƒ Xt j ƒ  |  j t ˆ  j ƒ t ˆ  j ƒ ƒ d  S(   Ni<   i   c           s   s   z	 d VWd t  j d ƒ Xd S(   s<   A generator that releases the GIL when closed or dealloc'ed.Ng�íµ ÷Æ°>(   t   timet   sleep(    (    (    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_gc.pyt   sleeper_gen<  s    	R'   c              s5   e  Z g  Z g  Z ‡  f d  †  Z ‡  ‡ f d †  Z RS(   c            s   | |  (ˆ  j  j d  ƒ d  S(   N(   t   initsR   t   None(   R   t   alist(   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_gc.pyR   G  s    c            s'   ˆ  j  j d  ƒ ˆ ƒ  } t | ƒ d  S(   N(   t   delsR   R_   t   next(   R   t   g(   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_gc.pyR,   J  s    	(   R	   R
   R^   Ra   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_gc.pyR'   C  s   c             s<   ˆ  g  ƒ }  x& t  ˆ ƒ D] } ˆ  |  g ƒ g }  q W~  d S(   sy   Create a sufficiently nested container object so that the
            trashcan mechanism is invoked when deallocating it.N(   RU   (   t   xR   (   R'   t   NESTING(    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_gc.pyt   make_nestedU  s    c              s   x ˆ  s ˆ ƒ  q Wd S(   s!   Exercise make_nested() in a loop.N(    (    (   t   exitRf   (    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_gc.pyt
   run_thread]  s    	i   t   targetc              s   ˆ  j  d ƒ S(   Ni   (   R   (    (   Rg   (    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_gc.pyt   <lambda>j  R-   g      ð?(   R(   R8   t   getcheckintervalt   setcheckintervalRU   t	   threadingt   ThreadR   R   R[   R\   R   R   R   R@   R^   Ra   (   R   t	   N_THREADSRh   t   old_checkintervalt   threadsR   R   (    (   R'   Re   Rg   Rf   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_gc.pyt   test_trashcan_threads6  s&    	
c         C   s‰   d d d „  ƒ  Y} | ƒ  } | ƒ  } | | _  | | _  t j ƒ  t t j ƒ } ~ ~ |  j t j ƒ  d ƒ |  j t t j ƒ | ƒ d  S(   Nt   Boomc           B   s   e  Z d  „  Z RS(   c         S   s   |  `  t ‚ d  S(   N(   t   attrt   AttributeError(   R   t   someattribute(    (    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_gc.pyt   __getattr__s  s    (   R	   R
   Rw   (    (    (    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_gc.pyRs   r  s   i   (    (   Rt   R   R   R@   R0   R   (   R   Rs   R    R/   t
   garbagelen(    (    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_gc.pyt	   test_boomq  s    				
c         C   s‰   d d d „  ƒ  Y} | ƒ  } | ƒ  } | | _  | | _  t j ƒ  t t j ƒ } ~ ~ |  j t j ƒ  d ƒ |  j t t j ƒ | ƒ d  S(   Nt   Boom2c           B   s   e  Z d  „  Z d „  Z RS(   c         S   s   d |  _  d  S(   Ni    (   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_gc.pyR   ‹  s    c         S   s1   |  j  d 7_  |  j  d k r' |  ` n  t ‚ d  S(   Ni   (   Rd   Rt   Ru   (   R   Rv   (    (    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_gc.pyRw   Ž  s    	(   R	   R
   R   Rw   (    (    (    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_gc.pyRz   Š  s   	i   (    (   Rt   R   R   R@   R0   R   (   R   Rz   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_gc.pyt
   test_boom2‰  s    
				
c         C   sŒ   d t  f d „  ƒ  Y} | ƒ  } | ƒ  } | | _ | | _ t j ƒ  t t j ƒ } ~ ~ |  j t j ƒ  d ƒ |  j t t j ƒ | ƒ d  S(   Nt   Boom_Newc           B   s   e  Z d  „  Z RS(   c         S   s   |  `  t ‚ d  S(   N(   Rt   Ru   (   R   Rv   (    (    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_gc.pyRw   ©  s    (   R	   R
   Rw   (    (    (    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_gc.pyR|   ¨  s   i   (   R#   Rt   R   R   R@   R0   R   (   R   R|   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_gc.pyt   test_boom_new¤  s    				
c         C   sŒ   d t  f d „  ƒ  Y} | ƒ  } | ƒ  } | | _ | | _ t j ƒ  t t j ƒ } ~ ~ |  j t j ƒ  d ƒ |  j t t j ƒ | ƒ d  S(   Nt	   Boom2_Newc           B   s   e  Z d  „  Z d „  Z RS(   c         S   s   d |  _  d  S(   Ni    (   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_gc.pyR   º  s    c         S   s1   |  j  d 7_  |  j  d k r' |  ` n  t ‚ d  S(   Ni   (   Rd   Rt   Ru   (   R   Rv   (    (    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_gc.pyRw   ½  s    	(   R	   R
   R   Rw   (    (    (    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_gc.pyR~   ¹  s   	i   (   R#   Rt   R   R   R@   R0   R   (   R   R~   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_gc.pyt   test_boom2_new¸  s    
				
c         C   s+  d d d g } t  j | ƒ } | j ƒ  |  j | | ƒ t | ƒ } t  j | ƒ } | j ƒ  |  j | | ƒ i d d 6d d 6} d d d d g } t  j | ƒ } | j ƒ  |  j | | ƒ t  j d d g i d d 6d
 ƒ } | j ƒ  |  j | d d g t d ƒ ƒ |  j t  j d d d	 ƒ g  ƒ d  S(   Ni   i   i   i   i   i   i    R    y              @(   i    i    i    (   R   t   get_referentst   sortR   t   tupleRU   (   R   R`   t   gott   atuplet   adictt   expected(    (    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_gc.pyt   test_get_referentsÎ  s"    


"
 c         C   s÷  |  j  t j d  ƒ ƒ |  j  t j d ƒ ƒ |  j  t j d ƒ ƒ |  j  t j d
 ƒ ƒ |  j  t j t ƒ ƒ |  j  t j t ƒ ƒ |  j  t j d ƒ ƒ |  j  t j d ƒ ƒ |  j  t j t d ƒ ƒ ƒ |  j  t j t ƒ ƒ |  j  t j t ƒ ƒ |  j  t j t	 ƒ ƒ |  j  t j t	 ƒ  ƒ ƒ d d d „  ƒ  Y} d t	 f d	 „  ƒ  Y} |  j
 t j t ƒ ƒ |  j
 t j | ƒ ƒ |  j
 t j | ƒ  ƒ ƒ |  j
 t j | ƒ ƒ |  j
 t j | ƒ  ƒ ƒ |  j
 t j g  ƒ ƒ |  j
 t j t ƒ  ƒ ƒ d  S(   Ni   g      ð?y              @R    u   at   OldStylec           B   s   e  Z RS(    (   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_gc.pyRˆ   ø  s   t   NewStylec           B   s   e  Z RS(    (   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_gc.pyR‰   ú  s   y      ð?      @(    (   t   assertFalseR   t
   is_trackedR_   R   R   t	   bytearrayt   typet   intR#   t
   assertTruet   set(   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_gc.pyt   test_is_trackedå  s,    c            sÓ   g  ‰ ‡  ‡ f d †  } g  t  d ƒ D] } t | ƒ ^ q% } g  | D] } t j | | ƒ ^ qD ‰  d  } t j ƒ  |  j t ˆ ƒ d ƒ d  } t j ƒ  |  j t ˆ ƒ d ƒ x ˆ D] } |  j | d  ƒ qµ Wd  S(   Nc            s!   g  ˆ  D] } | ƒ  ^ q ˆ (d  S(   N(    (   R   R   (   t   WRst   ouch(    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_gc.pyt   callback  s    i   i    (	   RU   R   R   R   R_   R   R   R   R@   (   R   R”   R   t   Cst   cRd   (    (   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_gc.pyt   test_bug1055820b  s    %%

(    R	   R
   R   R   R   R"   R$   R%   R   R)   R+   R5   R6   R7   R<   RE   RL   RM   RQ   RR   RZ   t   unittestt
   skipUnlessRm   Rr   Ry   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_gc.pyR   -   s4   			
					
									
		#;						t   GCTogglingTestsc           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   s   t  j ƒ  d  S(   N(   R   RH   (   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_gc.pyt   setUp  s    c         C   s   t  j ƒ  d  S(   N(   R   RJ   (   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_gc.pyt   tearDown   s    c   
         s-  t  d ƒ } t j ƒ  t  d ƒ } | | _ | ` t  d ƒ } t j | ƒ ‰  g  ‰ ‡  ‡ f d †  } t j | | ƒ } d  } } } g  } d } t ƒ  } xV | j	 sñ | d 7} | d k rË |  j
 d ƒ n  |  j t ˆ ƒ d ƒ | j g  ƒ qœ W|  j t ˆ ƒ d ƒ x ˆ D] }	 |  j |	 d  ƒ qWd  S(   Ni    i   i   c            s   ˆ  ƒ  g ˆ (d  S(   N(    (   R   (   t   c2wrR“   (    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_gc.pyR”   3  s    i'  s'   gc didn't happen after 10000 iterations(   R   R   R   t   keep_c0_aliveR   R   R   R_   R   R   R1   R   R@   R   (
   R   t   c0t   c1t   c2R”   t   c0wrt   junkR   t   detectorRd   (    (   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_gc.pyt   test_bug1055820c#  s.    
	 	
c   	         s(  g  ‰ d t  f ‡  ‡ f d †  ƒ  Y} | d ƒ } t j ƒ  t  d ƒ } | | _ | ` t  d ƒ } t j | ƒ ‰  d  } } } t ƒ  } g  } d } xV | j	 sì | d 7} | d k rÆ |  j
 d ƒ n  |  j t ˆ ƒ d ƒ | j g  ƒ q— W|  j t ˆ ƒ d ƒ x ˆ D] } |  j | d  ƒ q
Wd  S(   Nt   Dc              s   e  Z ‡  ‡ f d  †  Z RS(   c            s   ˆ  ƒ  g ˆ (d  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_gc.pyR,   p  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_gc.pyR¦   o  s   i    i   i   i'  s'   gc didn't happen after 10000 iterations(   R   R   R   t   keep_d0_aliveR   R   R   R_   R   R   R1   R   R@   R   (	   R   R¦   t   d0R    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_gc.pyt   test_bug1055820di  s,    
		
(   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_gc.pyRš     s   			Fc          C   s’   t  j ƒ  }  t  j ƒ  t  j ƒ  } t  j | t  j @ƒ z t  j ƒ  t t t	 ƒ Wd  t  j | ƒ t
 rp d GHn  t  j ƒ  |  s� t  j ƒ  n  Xd  S(   Ns   restoring automatic collection(   R   t	   isenabledRJ   R=   R>   t
   DEBUG_LEAKR   R   R   Rš   R    RH   (   t   enabledRD   (    (    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_gc.pyt	   test_main¬  s    


t   __main__(   R˜   t   test.supportR    R   R   R   R8   R[   R   R   Rm   t   ImportErrorR_   R#   R   R   t   TestCaseR   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_gc.pyt   <module>   s"   "

ÿ ð�	