mò
­fIc           @   s  d  k  Z  d  k Z d  k Z y
 e Z Wn e j
 o d „  Z n Xd e f d „  ƒ  YZ d e f d „  ƒ  YZ	 d e
 f d „  ƒ  YZ d e
 f d	 „  ƒ  YZ d
 e f d „  ƒ  YZ d e f d „  ƒ  YZ d e i f d „  ƒ  YZ d e  i f d „  ƒ  YZ d „  Z e d j o e ƒ  n d  S(   Nc         C   s   |  S(   N(   t   x(   R    (    (    t-   /mit/python/lib/python2.4/test/test_pprint.pyt   uni   s    t   list2c           B   s   t  Z RS(   N(   t   __name__t
   __module__(    (    (    R   R      s   t   list3c           B   s   t  Z d „  Z RS(   Nc         C   s   t  i |  ƒ S(   N(   t   listt   __repr__t   self(   R	   (    (    R   R      s    (   R   R   R   (    (    (    R   R      s   t   tuple2c           B   s   t  Z RS(   N(   R   R   (    (    (    R   R
      s   t   tuple3c           B   s   t  Z d „  Z RS(   Nc         C   s   t  i |  ƒ S(   N(   t   tupleR   R	   (   R	   (    (    R   R      s    (   R   R   R   (    (    (    R   R      s   t   dict2c           B   s   t  Z RS(   N(   R   R   (    (    (    R   R      s   t   dict3c           B   s   t  Z d „  Z RS(   Nc         C   s   t  i |  ƒ S(   N(   t   dictR   R	   (   R	   (    (    R   R      s    (   R   R   R   (    (    (    R   R      s   t   QueryTestCasec           B   sG   t  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   Nc         C   s2   t  d ƒ |  _ t  d ƒ |  _ |  i |  i d <d  S(   Nid   iÈ   iôÿÿÿ(   t   rangeR	   t   at   b(   R	   (    (    R   t   setUp   s    c      
   C   sÖ   |  i } t i ƒ  } xº d d d d d g d	 h  d d <t d ƒ |  i |  i f
 D]| } | t i
 | ƒ d | f ƒ | t i | ƒ d | f ƒ | | i
 | ƒ d | f ƒ | | i | ƒ d | f ƒ qR Wd  S(
   Ni   f2.0x0.02.0t   abci   t
   yaddayaddas   expected not isrecursive for %rs   expected isreadable for %r(   i   i   (   R	   t   assert_t   verifyt   pprintt   PrettyPrintert   ppR   R   R   t   safet   isrecursivet
   isreadable(   R	   R   R   R   (    (    R   t
   test_basic#   s    	= c         C   s§  |  i |  i d <h  |  _ |  i |  i d <|  i d <|  i d <|  i } t i ƒ  } x‰ |  i |  i |  i |  i |  i f f D]` } | t i
 | ƒ d ƒ | t i | ƒ d ƒ | | i
 | ƒ d ƒ | | i | ƒ d ƒ q| W|  i i ƒ  |  i 2|  i 2x¥ |  i |  i |  i |  i |  i f f D]| } | t i
 | ƒ d | f ƒ | t i | ƒ d | f ƒ | | i
 | ƒ d | f ƒ | | i | ƒ d | f ƒ q#Wd  S(	   NiC   i    i   i   s   expected isrecursives   expected not isreadables   expected not isrecursive for %rs   expected isreadable for %r(   R	   R   R   t   dR   R   R   R   R   t   ickyR   R   t   clearR   (   R	   R   R   R   R!   (    (    R   t   test_knotted4   s0    	&	( ( c         C   s´   |  i } t i ƒ  } x˜ t d ƒ t t i f D]~ } | t i | ƒ d | f ƒ | t i	 | ƒ d | f ƒ | | i | ƒ d | f ƒ | | i	 | ƒ d | f ƒ q. Wd  S(   Ni   s   expected not isrecursive for %rs   expected not isreadable for %r(
   R	   R   R   R   R   R   t   typeR   t
   unreadableR   (   R	   R   R%   R   (    (    R   t   test_unreadableV   s    	 c   	   -   C   s7  |  i } x'd d d d d d t d ƒ f  t ƒ  t ƒ  g  t ƒ  t ƒ  h  t ƒ  t	 ƒ  | t
 d d d d d	 d
 t d
 ƒ d f d g h  d d <d d f d d g h  d d <d d <t d d f ƒ t d d f ƒ t t d ƒ ƒ d d g t d d g ƒ t d d g ƒ t t d ƒ ƒ h  d d <d d <t h  d d <d d <ƒ t	 h  d d <d d <ƒ t	 g  } t d ƒ D] } | | | f qx~ ƒ h  d d f <d g  g <f  h  <t d d d ƒ f* D]d } t | ƒ } xO d d f D]A } t t
 | ƒ } | | ƒ } | | | j d | | | f ƒ qêWqËWd  S(   Ni    l    x0.00.0f0.0t    iúÿÿÿlÿÿÿÿ x0.06.0f-1.5R    i   i   i   i   i   i   i   i   id   s   xy	ab
i
   iõÿÿÿiÿÿÿÿt   pformatt   safereprs!   expected %s got %s from pprint.%s(   R	   R   R   R   R
   R   R   R   R   R   R   R   t   _[1]R    t   simplet   reprt   nativet   functiont   getattrt   ft   got(	   R	   R.   R0   R+   R   R*   R    R1   R-   (    (    R   t   test_same_as_reprf   s    	ÿ Ã  c         C   s«  h  d d <d d <d d <d d <d d <d d <d	 d
 <} d } x3 t t g D]% } |  i t i | | ƒ ƒ | ƒ qX Wt	 d ƒ } d d i
 t t | ƒ ƒ } x3 t t g D]% } |  i t i | | ƒ ƒ | ƒ q¶ Wt t	 d ƒ ƒ } d d i
 t t | ƒ ƒ } x3 t t g D]% } |  i t i | | ƒ ƒ | ƒ qWt	 d ƒ } d d i
 t t | ƒ ƒ } x9 t t g D]+ } |  i t i | | ƒ d d ƒ| ƒ qxWd  S(   Nt   RPM_cali    t   RPM_cal2i»»  t	   Speed_calt   controldesk_runtime_ust   main_code_runtime_ust   read_io_runtime_ust   write_io_runtime_usiªª  s¦   {'RPM_cal': 0,
 'RPM_cal2': 48059,
 'Speed_cal': 0,
 'controldesk_runtime_us': 0,
 'main_code_runtime_us': 0,
 'read_io_runtime_us': 0,
 'write_io_runtime_us': 43690}id   s   [%s]s   ,
 s   (%s)s   [   %s]s   ,
    t   indenti   (   t   ot   expR   R   R$   R	   t   assertEqualR   R(   R   t   joint   mapt   strR   R   R   R
   (   R	   R;   R<   R$   (    (    R   t   test_basic_line_wrap   s(    E # # # c         C   s>   h  d d <d d <} d } |  i t ƒ  i | ƒ | ƒ d  S(   Ns   names with spacess    should be presented using repr()s   others.should.not.bes	   like.thiss[   {'names with spaces': 'should be presented using repr()',
 others.should.not.be: like.this}(   R;   R<   R	   R=   t   DottedPrettyPrinterR(   (   R	   R<   R;   (    (    R   t   test_subclassing£   s    (	   R   R   R   R   R#   R&   R2   RA   RC   (    (    (    R   R      s   			"			$RB   c           B   s   t  Z d „  Z RS(   Nc         C   se   t  | t ƒ o5 d | j o t | ƒ d d f Sqa | d d f Sn t i i |  | | | | ƒ Sd  S(   Nt    i   i    (   t
   isinstancet   objectR@   R,   R   R   t   formatR	   t   contextt	   maxlevelst   level(   R	   RF   RH   RI   RJ   (    (    R   RG   ®   s
    (   R   R   RG   (    (    (    R   RB   ¬   s   c           C   s   t  i i t ƒ d  S(   N(   t   testt   test_supportt   run_unittestR   (    (    (    R   t	   test_main¹   s    t   __main__(   R   t   test.test_supportRK   t   unittestt   unicodeR   t	   NameErrorR   R   R   R   R
   R   R   R   R   t   TestCaseR   R   RB   RN   R   (   R   R   RQ   R   R   R   R
   R   RN   RK   R   R   RB   (    (    R   t   ?   s"   			
	