ó
­«Y]c           @   sl  d  Z  d d l Z d d l Z d d l m Z d d l m Z m Z e j d d d g ƒZ	 e j d d d g ƒZ
 d	 d
 d d d d d g Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ e e
 d ƒ d e f d „  ƒ  Yƒ Z d d; d „  ƒ  YZ d d< d „  ƒ  YZ d d= d „  ƒ  YZ d „  Z d  d> d! „  ƒ  YZ d" d? d# „  ƒ  YZ d$ d@ d% „  ƒ  YZ d& dA d' „  ƒ  YZ d( dB d) „  ƒ  YZ d* dC d+ „  ƒ  YZ d, dD d- „  ƒ  YZ d d. l m Z m Z d/ „  Z d0 dE d1 „  ƒ  YZ d2 e f d3 „  ƒ  YZ  d4 e  f d5 „  ƒ  YZ! e e
 d ƒ d6 e  f d7 „  ƒ  Yƒ Z" d d8 „ Z$ e% d9 k rhe$ d: e& ƒ n  d S(F   s   Unittests for heapq.iÿÿÿÿN(   t   test_support(   t   TestCaset
   skipUnlesst   heapqt   blockedt   _heapqt   fresht   heapifyt   heappopt   heappusht   heappushpopt   heapreplacet	   _nlargestt
   _nsmallestt   TestModulesc           B   s)   e  Z d  „  Z e e d ƒ d „  ƒ Z RS(   c         C   s1   x* t  D]" } |  j t t | ƒ j d ƒ q Wd  S(   NR   (   t
   func_namest   assertEqualt   getattrt   py_heapqt
   __module__(   t   selft   fname(    (    s    lib/python2.7/test/test_heapq.pyt   test_py_functions   s    s   requires _heapqc         C   s1   x* t  D]" } |  j t t | ƒ j d ƒ q Wd  S(   NR   (   R   R   R   t   c_heapqR   (   R   R   (    (    s    lib/python2.7/test/test_heapq.pyt   test_c_functions   s    (   t   __name__R   R   R   R   R   (    (    (    s    lib/python2.7/test/test_heapq.pyR      s   	t   TestHeapc           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 d „  Z RS(   c         C   s@  g  } g  } |  j  | ƒ xM t d ƒ D]? } t j ƒ  } | j | ƒ |  j j | | ƒ |  j  | ƒ q& Wg  } x6 | r§ |  j j | ƒ } |  j  | ƒ | j | ƒ qr W| } | j ƒ  |  j | | ƒ |  j  | ƒ |  j	 t
 |  j j g  ƒ y9 |  j	 t
 |  j j d  d  ƒ |  j	 t
 |  j j d  ƒ Wn t k
 r;n Xd  S(   Ni   (   t   check_invariantt   ranget   randomt   appendt   moduleR	   R   t   sortR   t   assertRaisest	   TypeErrort   Nonet   AttributeError(   R   t   heapt   datat   it   itemt   resultst   data_sorted(    (    s    lib/python2.7/test/test_heapq.pyt   test_push_pop   s.    	
c         C   sO   xH t  | ƒ D]: \ } } | r | d d ?} |  j | | | k ƒ q q Wd  S(   Ni   (   t	   enumeratet
   assertTrue(   R   R%   t   posR(   t	   parentpos(    (    s    lib/python2.7/test/test_heapq.pyR   ;   s    c         C   sv   xV t  d ƒ D]H } g  t  | ƒ D] } t j ƒ  ^ q  } |  j j | ƒ |  j | ƒ q W|  j t |  j j d  ƒ d  S(   Ni   (   R   R   R   R   R   R!   R"   R#   (   R   t   sizet   dummyR%   (    (    s    lib/python2.7/test/test_heapq.pyt   test_heapifyB   s
    %c         C   sŸ   g  t  d ƒ D] } t j d ƒ ^ q } g  } xF | D]> } |  j j | | ƒ t | ƒ d k r5 |  j j | ƒ q5 q5 W| j ƒ  |  j | t	 | ƒ d ƒ d  S(   Niè  iÐ  i
   iöÿÿÿ(
   R   R   t	   randrangeR   R	   t   lenR   R    R   t   sorted(   R   R'   R&   R%   R(   (    (    s    lib/python2.7/test/test_heapq.pyt   test_naive_nbestJ   s    (
c         c   s4   y x |  j  j | ƒ Vq WWn t k
 r/ n Xd  S(   N(   R   R   t
   IndexError(   R   R%   (    (    s    lib/python2.7/test/test_heapq.pyt   heapiterT   s
    c         C   sû   g  t  d ƒ D] } t j d ƒ ^ q } | d  } |  j j | ƒ x8 | d D], } | | d k rM |  j j | | ƒ qM qM W|  j t |  j | ƒ ƒ t	 | ƒ d ƒ |  j
 t |  j j d  ƒ |  j
 t |  j j d  d  ƒ |  j
 t |  j j g  d  ƒ d  S(   Niè  iÐ  i
   i    iöÿÿÿ(   R   R   R3   R   R   R   R   t   listR8   R5   R!   R"   R#   R7   (   R   R'   R&   R%   R(   (    (    s    lib/python2.7/test/test_heapq.pyt
   test_nbest\   s    (
)c         C   s¶   g  t  d ƒ D] } t j d ƒ ^ q } | d  } |  j j | ƒ x% | d D] } |  j j | | ƒ qM W|  j t |  j | ƒ ƒ t	 | ƒ d ƒ |  j |  j j g  d ƒ d ƒ d  S(   Niè  iÐ  i
   iöÿÿÿt   x(
   R   R   R3   R   R   R
   R   R9   R8   R5   (   R   R'   R&   R%   R(   (    (    s    lib/python2.7/test/test_heapq.pyt   test_nbest_with_pushpopn   s    (
)c         C   s"  g  } |  j  j | d ƒ } |  j | | f g  d f ƒ d g } |  j  j | d ƒ } |  j | | f d g d f ƒ |  j t | d ƒ t ƒ |  j t | ƒ t ƒ d g } |  j  j | d ƒ } |  j | | f d g d f ƒ d g } |  j  j | d ƒ } |  j | | f d g d f ƒ d  S(   Ni
   g      $@i    i	   i   (   R   R
   R   t   typet   intt   float(   R   t   hR;   (    (    s    lib/python2.7/test/test_heapq.pyt   test_heappushpopw   s    			c         C   sá   xÚ t  d ƒ D]Ì } t j d ƒ } g  t | ƒ D] } t j d ƒ ^ q/ } | d @rn | } |  j j | ƒ n* g  } x! | D] } |  j j | | ƒ q{ Wg  t | ƒ D] } |  j j | ƒ ^ q¥ } |  j | t	 | ƒ ƒ q Wd  S(   Nid   i2   i   i   (
   t   xrangeR   R3   R   R   R   R	   R   R   R5   (   R   t   trialR0   R'   R&   R%   R(   t   heap_sorted(    (    s    lib/python2.7/test/test_heapq.pyt   test_heapsortŠ   s    (
+c         C   s©   g  } xO t  t j d ƒ ƒ D]8 } t d „  t t j d ƒ ƒ Dƒ ƒ } | j | ƒ q W|  j t t | Œ  ƒ t |  j	 j
 | Œ  ƒ ƒ |  j t |  j	 j
 ƒ  ƒ g  ƒ d  S(   Ni   c         s   s   |  ] } t  j d  ƒ Vq d S(   iè  N(   R   R3   (   t   .0t   j(    (    s    lib/python2.7/test/test_heapq.pys	   <genexpr>œ   s    i
   (   RB   R   R3   R5   R   R   R   t   chainR9   R   t   merge(   R   t   inputsR'   t   row(    (    s    lib/python2.7/test/test_heapq.pyt
   test_merge™   s    %.c         C   sB   d „  } |  j  t ƒ $ t |  j j | ƒ  | ƒ  ƒ ƒ Wd  QXd  S(   Nc          s   s6   t  t d ƒ ƒ }  x t d ƒ D] } |  | Vq Wd  S(   Ni
   i   (   R9   R   (   t   sR'   (    (    s    lib/python2.7/test/test_heapq.pyt   iterable£   s    (   R!   R7   R9   R   RI   (   R   RN   (    (    s    lib/python2.7/test/test_heapq.pyt(   test_merge_does_not_suppress_index_error¡   s    	c         C   sæ   d t  f d „  ƒ  Y} g  g  g  g  g } x^ t d ƒ D]P } t j d ƒ } t j d ƒ } | | ƒ } | | f | _ | | j | ƒ q5 Wx | D] } | j ƒ  q Wg  |  j j | Œ  D] } | j ^ q· } |  j	 | t
 | ƒ ƒ d  S(   Nt   Intc           B   s   e  Z RS(    (   R   R   (    (    (    s    lib/python2.7/test/test_heapq.pyRP   «   s   i N  i   iô  (   R>   R   R   R3   t   pairR   R    R   RI   R   R5   (   R   RP   RJ   R'   t   streamR;   t   objt   result(    (    s    lib/python2.7/test/test_heapq.pyt   test_merge_stabilityª   s    (c      
   C   s»   g  t  d ƒ D] } t j d ƒ | f ^ q } x† d  d „  f D]u } xl d D]d } |  j |  j j | | ƒ t | ƒ |  ƒ |  j |  j j | | d | ƒt | d | ƒ|  ƒ qK Wq> Wd  S(   Niè  iÐ  c         S   s   |  d d d S(   Ni    i#  iÐ  (    (   R;   (    (    s    lib/python2.7/test/test_heapq.pyt   <lambda>»   t    i    i   i   i
   id   i  iç  iL  t   key(	   i    i   i   i
   id   i  iç  iè  iL  (   R   R   R3   R#   R   R   t	   nsmallestR5   (   R   R'   R&   t   ft   n(    (    s    lib/python2.7/test/test_heapq.pyt   test_nsmallest¹   s    .)c      
   C   sÇ   g  t  d ƒ D] } t j d ƒ | f ^ q } x’ d  d „  f D] } xx d D]p } |  j |  j j | | ƒ t | d t ƒ|  ƒ |  j |  j j | | d | ƒt | d | d t ƒ|  ƒ qK Wq> Wd  S(   Niè  iÐ  c         S   s   |  d d d S(   Ni    i#  iÐ  (    (   R;   (    (    s    lib/python2.7/test/test_heapq.pyRV   Ã   RW   i    i   i   i
   id   i  iç  iL  t   reverseRX   (	   i    i   i   i
   id   i  iç  iè  iL  (	   R   R   R3   R#   R   R   t   nlargestR5   t   True(   R   R'   R&   RZ   R[   (    (    s    lib/python2.7/test/test_heapq.pyt   test_nlargestÁ   s    .c            s¢   ‡  f d †  } d d d „  ƒ  Y} d d	 d „  ƒ  Y} g  t  d ƒ D] } t j ƒ  ^ qB } t | d t ƒ} ˆ  j | | | ƒ | ƒ ˆ  j | | | ƒ | ƒ d  S(
   Nc            sQ   t  | |  ƒ }  ˆ  j j |  ƒ g  t t |  ƒ ƒ D] } ˆ  j j |  ƒ j ^ q2 S(   N(   t   mapR   R   R   R4   R   R;   (   R&   t   compR'   (   R   (    s    lib/python2.7/test/test_heapq.pyt   hsortÌ   s    t   LTc           B   s   e  Z d  „  Z d „  Z RS(   c         S   s   | |  _  d  S(   N(   R;   (   R   R;   (    (    s    lib/python2.7/test/test_heapq.pyt   __init__Ñ   s    c         S   s   |  j  | j  k S(   N(   R;   (   R   t   other(    (    s    lib/python2.7/test/test_heapq.pyt   __lt__Ó   s    (   R   R   Re   Rg   (    (    (    s    lib/python2.7/test/test_heapq.pyRd   Ð   s   	t   LEc           B   s   e  Z d  „  Z d „  Z RS(   c         S   s   | |  _  d  S(   N(   R;   (   R   R;   (    (    s    lib/python2.7/test/test_heapq.pyRe   Ö   s    c         S   s   |  j  | j  k S(   N(   R;   (   R   Rf   (    (    s    lib/python2.7/test/test_heapq.pyt   __le__Ø   s    (   R   R   Re   Ri   (    (    (    s    lib/python2.7/test/test_heapq.pyRh   Õ   s   	id   R]   (    (    (   R   R   R5   R_   R   (   R   Rc   Rd   Rh   R'   R&   t   target(    (   R   s    lib/python2.7/test/test_heapq.pyt   test_comparison_operatorÊ   s    %N(   R   R   R#   R   R+   R   R2   R6   R8   R:   R<   RA   RE   RL   RO   RU   R\   R`   Rk   (    (    (    s    lib/python2.7/test/test_heapq.pyR      s    				
													t   TestHeapPythonc           B   s   e  Z e Z RS(    (   R   R   R   R   (    (    (    s    lib/python2.7/test/test_heapq.pyRl   à   s   s   requires _heapqt	   TestHeapCc           B   s   e  Z e Z RS(    (   R   R   R   R   (    (    (    s    lib/python2.7/test/test_heapq.pyRm   ä   s   t   LenOnlyc           B   s   e  Z d  Z d „  Z RS(   s:   Dummy sequence class defining __len__ but not __getitem__.c         C   s   d S(   Ni
   (    (   R   (    (    s    lib/python2.7/test/test_heapq.pyt   __len__í   s    (   R   R   t   __doc__Ro   (    (    (    s    lib/python2.7/test/test_heapq.pyRn   ë   s   t   GetOnlyc           B   s   e  Z d  Z d „  Z RS(   s:   Dummy sequence class defining __getitem__ but not __len__.c         C   s   d S(   Ni
   (    (   R   t   ndx(    (    s    lib/python2.7/test/test_heapq.pyt   __getitem__ò   s    (   R   R   Rp   Rs   (    (    (    s    lib/python2.7/test/test_heapq.pyRq   ð   s   t   CmpErrc           B   s   e  Z d  Z d „  Z RS(   s;   Dummy element that always raises an error during comparisonc         C   s
   t  ‚ d  S(   N(   t   ZeroDivisionError(   R   Rf   (    (    s    lib/python2.7/test/test_heapq.pyt   __cmp__÷   s    (   R   R   Rp   Rv   (    (    (    s    lib/python2.7/test/test_heapq.pyRt   õ   s   c         c   s   x |  D] } | Vq Wd S(   s   Regular generatorN(    (   t   seqnR'   (    (    s    lib/python2.7/test/test_heapq.pyt   Rú   s    t   Gc           B   s    e  Z d  Z d „  Z d „  Z RS(   s   Sequence using __getitem__c         C   s   | |  _  d  S(   N(   Rw   (   R   Rw   (    (    s    lib/python2.7/test/test_heapq.pyRe     s    c         C   s   |  j  | S(   N(   Rw   (   R   R'   (    (    s    lib/python2.7/test/test_heapq.pyRs     s    (   R   R   Rp   Re   Rs   (    (    (    s    lib/python2.7/test/test_heapq.pyRy   ÿ   s   	t   Ic           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s    Sequence using iterator protocolc         C   s   | |  _  d |  _ d  S(   Ni    (   Rw   R'   (   R   Rw   (    (    s    lib/python2.7/test/test_heapq.pyRe     s    	c         C   s   |  S(   N(    (   R   (    (    s    lib/python2.7/test/test_heapq.pyt   __iter__  s    c         C   sD   |  j  t |  j ƒ k r! t ‚ n  |  j |  j  } |  j  d 7_  | S(   Ni   (   R'   R4   Rw   t   StopIteration(   R   t   v(    (    s    lib/python2.7/test/test_heapq.pyt   next  s
     	(   R   R   Rp   Re   R{   R~   (    (    (    s    lib/python2.7/test/test_heapq.pyRz     s   		t   Igc           B   s    e  Z d  Z d „  Z d „  Z RS(   s9   Sequence using iterator protocol defined with a generatorc         C   s   | |  _  d |  _ d  S(   Ni    (   Rw   R'   (   R   Rw   (    (    s    lib/python2.7/test/test_heapq.pyRe     s    	c         c   s   x |  j  D] } | Vq
 Wd  S(   N(   Rw   (   R   t   val(    (    s    lib/python2.7/test/test_heapq.pyR{     s    (   R   R   Rp   Re   R{   (    (    (    s    lib/python2.7/test/test_heapq.pyR     s   	t   Xc           B   s    e  Z d  Z d „  Z d „  Z RS(   s    Missing __getitem__ and __iter__c         C   s   | |  _  d |  _ d  S(   Ni    (   Rw   R'   (   R   Rw   (    (    s    lib/python2.7/test/test_heapq.pyRe     s    	c         C   sD   |  j  t |  j ƒ k r! t ‚ n  |  j |  j  } |  j  d 7_  | S(   Ni   (   R'   R4   Rw   R|   (   R   R}   (    (    s    lib/python2.7/test/test_heapq.pyR~   !  s
     	(   R   R   Rp   Re   R~   (    (    (    s    lib/python2.7/test/test_heapq.pyR     s   	t   Nc           B   s    e  Z d  Z d „  Z d „  Z RS(   s   Iterator missing next()c         C   s   | |  _  d |  _ d  S(   Ni    (   Rw   R'   (   R   Rw   (    (    s    lib/python2.7/test/test_heapq.pyRe   )  s    	c         C   s   |  S(   N(    (   R   (    (    s    lib/python2.7/test/test_heapq.pyR{   ,  s    (   R   R   Rp   Re   R{   (    (    (    s    lib/python2.7/test/test_heapq.pyR‚   '  s   	t   Ec           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s   Test propagation of exceptionsc         C   s   | |  _  d |  _ d  S(   Ni    (   Rw   R'   (   R   Rw   (    (    s    lib/python2.7/test/test_heapq.pyRe   1  s    	c         C   s   |  S(   N(    (   R   (    (    s    lib/python2.7/test/test_heapq.pyR{   4  s    c         C   s   d d d  S(   Ni   i    (    (   R   (    (    s    lib/python2.7/test/test_heapq.pyR~   6  s    (   R   R   Rp   Re   R{   R~   (    (    (    s    lib/python2.7/test/test_heapq.pyRƒ   /  s   		t   Sc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s   Test immediate stopc         C   s   d  S(   N(    (   R   Rw   (    (    s    lib/python2.7/test/test_heapq.pyRe   ;  s    c         C   s   |  S(   N(    (   R   (    (    s    lib/python2.7/test/test_heapq.pyR{   =  s    c         C   s
   t  ‚ d  S(   N(   R|   (   R   (    (    s    lib/python2.7/test/test_heapq.pyR~   ?  s    (   R   R   Rp   Re   R{   R~   (    (    (    s    lib/python2.7/test/test_heapq.pyR„   9  s   		(   RH   t   imapc         C   s(   t  t d „  t t t |  ƒ ƒ ƒ ƒ ƒ S(   s    Test multiple tiers of iteratorsc         S   s   |  S(   N(    (   R;   (    (    s    lib/python2.7/test/test_heapq.pyRV   E  RW   (   RH   R…   Rx   R   Ry   (   Rw   (    (    s    lib/python2.7/test/test_heapq.pyt   LC  s    t   SideEffectLTc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s   | |  _  | |  _ d  S(   N(   t   valueR%   (   R   Rˆ   R%   (    (    s    lib/python2.7/test/test_heapq.pyRe   H  s    	c         C   s   g  |  j  (|  j | j k  S(   N(   R%   Rˆ   (   R   Rf   (    (    s    lib/python2.7/test/test_heapq.pyRg   L  s    
(   R   R   Re   Rg   (    (    (    s    lib/python2.7/test/test_heapq.pyR‡   G  s   	t   TestErrorHandlingc           B   sM   e  Z d Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 RS(   c         C   s‘   x9 |  j  j |  j  j f D] } |  j t t f | d ƒ q WxN |  j  j |  j  j |  j  j |  j  j	 f D]" } |  j t t f | d d ƒ qg Wd  S(   Ni
   (
   R   R   R   R!   R"   R$   R	   R   R^   RY   (   R   RZ   (    (    s    lib/python2.7/test/test_heapq.pyt   test_non_sequenceT  s
    c         C   sÁ   x< |  j  j |  j  j f D]" } |  j t t f | t ƒ  ƒ q Wx? |  j  j |  j  j f D]% } |  j t t f | t ƒ  d ƒ qX Wx9 |  j  j	 |  j  j
 f D] } |  j t | d t ƒ  ƒ qš Wd  S(   Ni
   i   (   R   R   R   R!   R"   R$   Rn   R	   R   R^   RY   (   R   RZ   (    (    s    lib/python2.7/test/test_heapq.pyt   test_len_only[  s     #c         C   sÄ   t  ƒ  t  ƒ  t  ƒ  g } x3 |  j j |  j j f D] } |  j t | | ƒ q1 Wx6 |  j j |  j j f D] } |  j t | | d ƒ qg Wx6 |  j j |  j j	 f D] } |  j t | d | ƒ q  Wd  S(   Ni
   i   (
   Rt   R   R   R   R!   Ru   R	   R   R^   RY   (   R   t   seqRZ   (    (    s    lib/python2.7/test/test_heapq.pyt   test_get_onlyc  s    c         C   sd   x] |  j  j |  j  j |  j  j |  j  j |  j  j |  j  j f D] } |  j t t	 f | d ƒ q= Wd  S(   Ni
   (
   R   R   R   R	   R   R^   RY   R!   R"   R$   (   R   RZ   (    (    s    lib/python2.7/test/test_heapq.pyt   test_arg_parsingl  s    c         C   s6  x/|  j  j |  j  j f D]} xd d t d ƒ d t d d d ƒ f D]ã } xg t t t t t	 f D]P } t
 j d	 t f d
 t ƒ- |  j | d | | ƒ ƒ | d | ƒ ƒ Wd  QXqc W|  j | d t | ƒ ƒ g  ƒ |  j t | d t | ƒ ƒ |  j t | d t | ƒ ƒ |  j t | d t | ƒ ƒ qG Wq Wd  S(   Nt   123RW   iè  t   dog333333ó?iÐ  i˜  i   s%   comparing unequal types not supportedt   quieti   (   R   g333333ó?(   R   R^   RY   R   RB   Ry   Rz   R   R†   Rx   R    t   check_py3k_warningst   DeprecationWarningR_   R   R„   R!   R"   R   R‚   Ru   Rƒ   (   R   RZ   RM   t   g(    (    s    lib/python2.7/test/test_heapq.pyt   test_iterable_argsr  s    .2c      	      se   g  ‰  ˆ  j  ‡  f d †  t d ƒ Dƒ ƒ |  j t t f ƒ ! |  j j ˆ  t d ˆ  ƒ ƒ Wd  QXd  S(   Nc         3   s   |  ] } t  | ˆ  ƒ Vq d  S(   N(   R‡   (   RF   R'   (   R%   (    s    lib/python2.7/test/test_heapq.pys	   <genexpr>ƒ  s    iÈ   i   (   t   extendR   R!   R7   t   RuntimeErrorR   R	   R‡   (   R   (    (   R%   s    lib/python2.7/test/test_heapq.pyt   test_heappush_mutating_heap  s    #c            sY   g  ‰  ˆ  j  ‡  f d †  t d ƒ Dƒ ƒ |  j t t f ƒ  |  j j ˆ  ƒ Wd  QXd  S(   Nc         3   s   |  ] } t  | ˆ  ƒ Vq d  S(   N(   R‡   (   RF   R'   (   R%   (    s    lib/python2.7/test/test_heapq.pys	   <genexpr>Š  s    iÈ   (   R–   R   R!   R7   R—   R   R   (   R   (    (   R%   s    lib/python2.7/test/test_heapq.pyt   test_heappop_mutating_heapˆ  s    #N(   R   R   R#   R   RŠ   R‹   R   RŽ   R•   R˜   R™   (    (    (    s    lib/python2.7/test/test_heapq.pyR‰   Q  s   							t   TestErrorHandlingPythonc           B   s   e  Z e Z RS(    (   R   R   R   R   (    (    (    s    lib/python2.7/test/test_heapq.pyRš     s   t   TestErrorHandlingCc           B   s   e  Z e Z RS(    (   R   R   R   R   (    (    (    s    lib/python2.7/test/test_heapq.pyR›   ”  s   c         C   s    t  t t t t g } t j | Œ  |  rœ t t d ƒ rœ d d  l	 } d  g d } xA t t | ƒ ƒ D]- } t j | Œ  | j ƒ  t j ƒ  | | <qc W| GHn  d  S(   Nt   gettotalrefcountiÿÿÿÿi   (   R   Rl   Rm   Rš   R›   R    t   run_unittestt   hasattrt   syst   gcR#   RB   R4   t   collectRœ   (   t   verboset   test_classesR    t   countsR'   (    (    s    lib/python2.7/test/test_heapq.pyt	   test_mainœ  s    	
t   __main__R¢   (    (    (    (    (    (    (    (    (    (    (    ('   Rp   RŸ   R   t   testR    t   unittestR   R   t   import_fresh_moduleR   R   R   R   R   Rl   Rm   Rn   Rq   Rt   Rx   Ry   Rz   R   R   R‚   Rƒ   R„   t	   itertoolsRH   R…   R†   R‡   R‰   Rš   R›   R#   R¥   R   R_   (    (    (    s    lib/python2.7/test/test_heapq.pyt   <module>   sD   Ä		
		
?