ó
wŰjc           @   sT   d  d l  Z d  d l Z d e j f d     YZ d   Z e d k rP e   n  d S(   i˙˙˙˙Nt   PowTestc           B   sG   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c      	   C   s  | t  k rČxĽ t d d  D] } |  j t | |  d  d  |  j t | |  d  | |   |  j t | d  d  | d   |  j t | d  d  | d   q Wx> t d d  D]- } |  j t | |  d  | | |  qÄ Wd } xI t d d  D]8 } |  j t d	 |  |  | d
 k r| d	 } qqWx~ t t f D]m } xd t d d  t d d  D]F } | |  } x1 t d d  D]  } | |  } t | |  qWqwWqTWn  xv t t t  f D]e } x\ t d d  D]K } | d  } | | d  }	 |	 d k r#qîn  |  j t t | |	  qîWqŘWd \ }
 } d \ } } d \ } } |  j } | t  k rd }
 |  j } n0 | t k rĄd } n | t k rźd \ } } n  xŰ t |
 | d  D]Ć } x˝ t | | d  D]¨ } x t | | d  D] } | d k r| t  k s.| d k  rS|  j t	 t | |  | |  qn  | t | |  | |  t | |  |  | |   qqWqęWqĐWd  S(   Niü˙˙ič  i    i   i˙˙˙id   i   i   i   i   iö˙˙˙i
   i   g      $@iě˙˙˙i   iű˙˙˙i   i   (   iě˙˙˙i   (   iű˙˙˙i   (   iö˙˙˙i
   (   i    i   (
   t   floatt   ranget   assertEqualt   powt   intt   longt   assertRaisest   ZeroDivisionErrort   assertAlmostEqualt	   TypeError(   t   selft   typet   it   pow2t	   othertypet   iit   jt   jjt   zerot   expt   ilt   iht   jlt   jht   klt   kht   asseqt   k(    (    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_pow.pyt   powtest   s^    %%)+ #		c         C   s   |  j  t  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_pow.pyt   test_powint;   s    c         C   s   |  j  t  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_pow.pyt   test_powlong>   s    c         C   s   |  j  t  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_pow.pyt   test_powfloatA   s    c      	   C   sŇ  |  j  t d d  d t d d d   |  j  t d d  d t d d d   |  j  t d d  d t d d d   |  j  t d d  d t d d d   |  j  t d d  d t d d d   |  j  t d d  d t d d d   |  j  t d d  d t d d d   |  j  t d d  d t d d d   |  j  t d d  d t d d d   |  j  t d	 d  d t d	 d d   |  j  t d	 d  d t d	 d d   |  j  t d
 d  d t d
 d d   xß t d d  D]Î } xĹ t d d  D]´ } xŤ t d d  D] } | d k rr| d k rr|  j  t | |  | t | | |   n  | d k r(| d k r(|  j  t t |  |  | t t |  | |   q(q(WqWqüWd  S(   Ni   i   iř˙˙˙i   iţ˙˙˙iý˙˙˙i   l    l˙˙˙˙ l    iö˙˙˙i   i    i   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_pow.pyt
   test_otherD   s.    ))))))))))))c         C   s"   d d d     Y} d  |   d  S(   Nt   TestRpowc           B   s   e  Z d    Z RS(   c         S   s   d  S(   N(   t   None(   R   t   other(    (    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_pow.pyt   __rpow__d   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_pow.pyR"   c   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_pow.pyt   test_bug643260b   s    c         C   s˙   |  j  } d } | t | d  d  | t | d  d  xC t d d  D]2 } | t | t |   | d @rv d py d  qK Wxj t d d	  D]Y } t d
 |  } | d rˇ d pş d } | t | |  |  | t | |  |  q W| | d  d  S(   Ng      đżgŕNÝŻ bg      đ?gŕNÝŻ âiö˙˙˙i   i   i    id   i   g       @(   R   R   R   R   (   R   t   eqt   at   bt   nt   fivetot   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_pow.pyt   test_bug705231h   s    	0(	   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_pow.pyR       s   	6					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_pow.pyt	   test_main}   s    t   __main__(   t   test.test_supportR0   t   unittestt   TestCaseR    R3   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_pow.pyt   <module>   s   z	