ó
ŒwÛjc           @   s¬   d  d l  Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z e j d d e d ƒ d „  Z	 d „  Z
 d e j f d „  ƒ  YZ d	 „  Z e d
 k r¨ e ƒ  n  d S(   iÿÿÿÿNt   ignores   integer argument expectedt   unittestc         c   sO   |  | | d k  rK | |  | | 7} x" |  | k rG |  V|  | 7}  q) Wn  d  S(   Ni    (    (   t   startt   stopt   step(    (    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_xrange.pyt   pyrange   s
    c         C   s+   | |  | | 7} t  | | |  | | ƒ S(   N(   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_xrange.pyt   pyrange_reversed   s    t
   XrangeTestc           B   sA   e  Z d d  „ Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c   
      C   s  | d  k	 r3 t j | | ƒ } t j | | ƒ } n  t ƒ  } t j | | d | ƒ} x§ t | ƒ D]™ \ } \ } }	 | |	 k r… qa qa | | k r° |  j d j | | |	 ƒ ƒ qa |	 | k rÛ |  j d j | | | ƒ ƒ qa |  j d j | | |	 | ƒ ƒ qa Wd  S(   Nt	   fillvalues;   {}: iterator ended unexpectedly at position {}; expected {}s/   {}: unexpected excess element {} at position {}s4   {}: wrong element at position {};expected {}, got {}(   t   Nonet	   itertoolst   islicet   objectt   izip_longestt	   enumeratet   failt   format(
   t   selft   xst   yst   test_idt   limitt   sentinelt   pairst   it   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_xrange.pyt   assert_iterators_equal   s     	c         C   sB  t  | ƒ t  | ƒ k rF |  j d j | | t  | ƒ t  | ƒ ƒ ƒ n  t  | ƒ d k r× | d | d k r– |  j d j | | | d | d ƒ ƒ n  | d | d k r× |  j d j | | | d | d ƒ ƒ q× n  t  | ƒ d k r>| d | d } | d | d } | | k r>|  j d j | | | | ƒ ƒ q>n  d  S(	   Ns,   {} and {} have different lengths: {} and {} i   i    s5   {} and {} have different initial elements: {} and {} iÿÿÿÿs3   {} and {} have different final elements: {} and {} i   s)   {} and {} have different step: {} and {} (   t   lenR   R   (   R   R   R   t   x_stept   y_step(    (    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_xrange.pyt   assert_xranges_equivalent1   s     "!c         C   sÅ  |  j  t t d ƒ ƒ d d d g ƒ |  j  t t d d ƒ ƒ d d d d g ƒ |  j  t t d ƒ ƒ g  ƒ |  j  t t d ƒ ƒ g  ƒ |  j  t t d d d ƒ ƒ d d d	 g ƒ |  j  t t d d
 d ƒ ƒ d d d d g ƒ d } d } d } |  j  t t | | d ƒ ƒ | | d g ƒ |  j  t t | d | d ƒ ƒ | d | d g ƒ |  j  t t | d | d ƒ ƒ | d | d g ƒ t t | | | ƒ ƒ } |  j | | ƒ |  j | | ƒ |  j  t | ƒ d ƒ t t | | | ƒ ƒ } |  j | | ƒ |  j | | ƒ |  j  t | ƒ d ƒ t t | | | ƒ ƒ } |  j | | ƒ |  j | | ƒ |  j  t | ƒ d ƒ |  j t t ƒ |  j t t d d d d ƒ |  j t t d d d ƒ |  j t	 t d d d ƒ |  j t t d d ƒ |  j t t d d d ƒ |  j  t t d t
 j t
 j d ƒ ƒ d ƒ |  j t	 t t
 j t
 j ƒ |  j t	 t d d t
 j ƒ t t
 j t
 j d ƒ } |  j  t | ƒ t
 j ƒ |  j t	 t t
 j d t
 j d ƒ d  S(   Ni   i    i   i   i   i   iýÿÿÿi
   i   iûÿÿÿiÿÿÿÿiüÿÿÿid   i2   lÿÿÿÿ iþÿÿÿie   t   spami*   l                DG¨†dªrÓâÈYâ|gÄO¬s&YR5I l                (Ëh‘V<m«zFXÔXÐÛ`;°/_¹}|7\- l                (Ëh‘V<m«zFXÔXÐÛ`;°/_¹}|7\- (   t   assertEqualt   listt   xranget   assertInt   assertNotInR   t   assertRaisest	   TypeErrort
   ValueErrort   OverflowErrort   syst   maxint(   R   t   at   bt   ct   seqt   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_xrange.pyt   test_xrangeG   sH    %++.-44,c         C   s±  d d d d d d g } xi t  t j d ƒ D]T } xK | D]C } t | Œ  } |  j t t j t j | | ƒ ƒ ƒ t | ƒ ƒ q9 Wq, Wt t	 j
 t	 j ƒ } | d | d f | d d f d | | d f | d | d f d | d f d | d | f | | d f | | d f | | d f | | d
 f | | d f | | d f g } xc t  t j d ƒ D]N } xE | D]= } t | Œ  } t j t j | | ƒ ƒ } |  j | | ƒ qhWq[Wd  S(   Ni   i    i   iêÿÿÿi
   i   i   iÿÿÿÿi   iþÿÿÿi   i   i   iY)  i üÿÿi§Öÿÿ(   i   (   i    i   (   iêÿÿÿi
   (   i   i   iÿÿÿÿ(   i   i   i   (   iþÿÿÿi   i   (   t   ranget   picklet   HIGHEST_PROTOCOLR#   R!   R"   t   loadst   dumpst   minR*   R+   t   maxsizeR   (   R   t	   testcasest   protot   tR0   t   Mt   large_testcasest   r_out(    (    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_xrange.pyt   test_picklingx   s4    $c         C   s  t  t j t j ƒ } d d d d d d d | d f | d d f d | | d f | d | d f d | d f d | d | f | | d f | | d f | | d f | | d
 f | | d f | | d f g } x< | D]4 } t | Œ  } t t | ƒ ƒ } |  j | | ƒ qØ Wd  S(   Ni   i    i   iêÿÿÿi
   i   i   iÿÿÿÿi   iþÿÿÿi   i   i   iY)  i üÿÿi§Öÿÿ(   i   (   i    i   (   iêÿÿÿi
   (   i   i   iÿÿÿÿ(   i   i   i   (   iþÿÿÿi   i   (   R7   R*   R+   R8   R#   t   evalt   reprR   (   R   R<   R9   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_xrange.pyt	   test_repr–   s.    c      	   C   sœ  g  d d f D]C } | | d d | d | f D] } d D] } | | ^ q: q0 q } g  | D]A } | D]4 } d d d d d d f D] } | | | f ^ qƒ qg q] } xñ | D]é \ } } } y t  | | | ƒ }	 Wn t k
 rã nA Xt | | | ƒ }
 d
 j | | | ƒ } |  j |	 |
 | d d ƒy t t  | | | ƒ ƒ }	 Wn t k
 rSq« Xt | | | ƒ }
 d j | | | ƒ } |  j |	 |
 | d d ƒq« Wd  S(   Ni   i    i@   i    iþÿÿÿiÿÿÿÿi   i?   i   s   xrange({}, {}, {})R   id   s   reversed(xrange({}, {}, {}))I       l            (   iþÿÿÿiÿÿÿÿi    i   i   l            lûÿÿÿ         I   €    i   €(   R#   R)   R   R   R   t   reversedR   (   R   R<   t   baset   jigglet   limitsR   t   endR   t   test_rangest   iter1t   iter2R   (    (    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_xrange.pyt   test_range_iterators¶   s.    # 

7N(	   t   __name__t
   __module__R	   R   R   R1   R?   RB   RK   (    (    (    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_xrange.pyR      s   		1		 c           C   s   t  j j t ƒ d  S(   N(   t   testt   test_supportt   run_unittestR   (    (    (    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_xrange.pyt	   test_mainÖ   s    t   __main__(   t   test.test_supportRN   R   R*   R3   R
   t   warningst   filterwarningst   DeprecationWarningR   R   t   TestCaseR   RQ   RL   (    (    (    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_xrange.pyt   <module>   s   
			»	