ó
‹wÛjc           @   sQ  d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l m Z m Z m Z m	 Z	 m
 Z
 d  d l m Z d  d l m Z d e  j f d „  ƒ  YZ d e f d „  ƒ  YZ d	 e f d
 „  ƒ  YZ d e f d „  ƒ  YZ d e d d „ Z d e  j f d „  ƒ  YZ d e  j f d „  ƒ  YZ d d „ Z e d k rMe d e ƒ n  d S(   iÿÿÿÿN(   t   logt   expt   pit   fsumt   sin(   t   reduce(   t   test_supportt   TestBasicOpsc           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 RS(   c         C   s&   g  t  | ƒ D] } |  j j ƒ  ^ q S(   s0   Helper function to make a list of random numbers(   t   xranget   gent   random(   t   selft   nt   i(    (    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_random.pyt
   randomlist   s    c         C   sY   |  j  j ƒ  |  j  j ƒ  } t j d ƒ |  j  j ƒ  |  j  j ƒ  } |  j | | ƒ d  S(   Ngš™™™™™¹?(   R	   t   seedt   getstatet   timet   sleept   assertNotEqual(   R   t   state1t   state2(    (    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_random.pyt   test_autoseed   s    c         C   s^   d } |  j  j ƒ  |  j  j ƒ  } |  j | ƒ } |  j  j | ƒ |  j | |  j | ƒ ƒ d  S(   Niè  (   R	   R   R   R   t   setstatet   assertEqual(   R   t   Nt   statet   randseq(    (    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_random.pyt   test_saverestore   s    c         C   sÉ   xK d  d d d d d d d d d	 d d t d ƒ g D] } |  j j | ƒ q4 Wx< t d ƒ t d d ƒ g D] } |  j t |  j j | ƒ qj W|  j t |  j j d d ƒ |  j t t |  j ƒ g  ƒ d  S(   Ni    l    i   l    iÿÿÿÿlÿÿÿÿ i
   i   g…ëQ¸	@y               @t   at   abci   t   onei   l      Fµx:^V l      Fµx:^V lûÿÿÿ   Fµx:^V y      ð?       @(	   t   Nonet   tupleR	   R   t   ranget   dictt   assertRaisest	   TypeErrort   type(   R   t   arg(    (    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_random.pyt   test_seedargs#   s    "c      	   C   sÉ   |  j  j ƒ  |  j  j ƒ  } |  j  j d ƒ |  j  j ƒ  } |  j | | ƒ |  j  j d ƒ |  j  j ƒ  } |  j | | ƒ t j d t ƒ �7 |  j t	 |  j  j ƒ |  j t	 |  j  j d d ƒ Wd  QXd  S(   Nid   t   quieti   i   (
   R	   R   R   t	   jumpaheadR   R   t   check_py3k_warningst   TrueR$   R%   (   R   R   R   t   state3(    (    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_random.pyt   test_jumpahead,   s    c         C   sZ   |  j  j d ƒ |  j  j d ƒ x3 t d ƒ D]% } |  j  j ƒ  } |  j | d ƒ q- Wd  S(   Ni€µßl   Œiê®)m` iô  g      ð?(   R	   R   R*   R"   R
   t
   assertLess(   R   R   t   val(    (    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_random.pyt#   test_jumpahead_produces_valid_state:   s
    c         C   s¶   d } t  | ƒ } x~ t  | d ƒ D]l } |  j j | | ƒ } |  j t | ƒ | ƒ t | ƒ } |  j t | ƒ | ƒ |  j | t | ƒ k ƒ q# W|  j |  j j g  d ƒ g  ƒ d  S(   Nid   i   i    (   R   R	   t   sampleR   t   lent   sett
   assertTrue(   R   R   t
   populationt   kt   st   uniq(    (    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_random.pyt   test_sampleB   s    c   	      C   s²   d } t  | ƒ } d } d „  } xŠ t | ƒ D]| } | | ƒ | | | ƒ } i  } xS t | ƒ D]; } d  | t |  j j | | ƒ ƒ <t | ƒ | k ra Pqa qa W|  j ƒ  q. Wd  S(   Ni   i'  c         S   s   t  t j t d |  ƒ d ƒ S(   Ni   (   R   t   intt   __mul__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_random.pyt	   factorialU   s    (   R"   R   R    R!   R	   R2   R3   t   fail(	   R   R   t   popt   trialsR=   R7   t   expectedt   permsR   (    (    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_random.pyt   test_sample_distributionO   s    	c         C   s‡   |  j  j t t d ƒ ƒ d ƒ |  j  j t d ƒ d ƒ |  j  j t d ƒ d ƒ |  j  j t d ƒ d ƒ |  j  j t d ƒ d ƒ d  S(   Ni   i   t   abcdefghijklmnopqrst(   R	   R2   R4   R"   R   t   strR!   (   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_random.pyt   test_sample_inputsa   s
    c         C   s  |  j  j t j d ƒ d ƒ t j t d ƒ t d d d ƒ t d d ƒ ƒ } |  j  j | d ƒ d } t d „  t | ƒ Dƒ ƒ } xW t | d	 ƒ D]E } |  j  j | | ƒ } x' | D] } |  j t | ƒ t k ƒ q¶ Wq” W| j	 ƒ  |  j
 | t | ƒ ƒ d  S(
   NRD   i   i
   id   in   i   i   c         s   s$   |  ] } | t  | | ƒ f Vq d  S(   N(   t   complex(   t   .0R   (    (    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_random.pys	   <genexpr>t   s    i   (   R	   R2   R#   t   fromkeysR"   R   R5   R&   R;   t   sortR   (   R   R   R   t   dR7   t   sampt   x(    (    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_random.pyt   test_sample_on_dictsi   s    2!
c         C   s�   x– d	 D]Ž } |  j  j | ƒ |  j  j ƒ  } |  j  j d d ƒ } |  j  j | ƒ |  j  j ƒ  } |  j  j d d ƒ } |  j | | ƒ |  j | | ƒ q Wd  S(
   Ni   i   i{   iÒ  i90  i@â iñû	 i    (   i   i   i{   iÒ  i90  i@â iñû	 (   R	   R   R
   t   gaussR   (   R   R   t   x1t   y1t   x2t   y2(    (    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_random.pyt
   test_gauss}   s    c         C   s£   xœ t  t j d ƒ D]‡ } t j |  j | ƒ } g  t d ƒ D] } |  j j ƒ  ^ q< } t j | ƒ } g  t d ƒ D] } | j ƒ  ^ qs } |  j | | ƒ q Wd  S(   Ni   i
   (	   R"   t   picklet   HIGHEST_PROTOCOLt   dumpsR	   R   R
   t   loadsR   (   R   t   protoR   R   t   origseqt   newgent   restoredseq(    (    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_random.pyt   test_picklingŽ   s    (%c         C   st   d	 d
 d g } x^ | D]V \ } } t  t j | ƒ d ƒ } t j | ƒ } | j ƒ  |  j | j d ƒ | ƒ q Wd  S(   Ns   randv2_32.pcki  s   randv2_64.pckib  s
   randv3.pckiW  t   rbiè  (   s   randv2_32.pcki  (   s   randv2_64.pckib  (   s
   randv3.pckiW  (   t   openR   t   findfileRU   t   loadt   closeR   t	   randrange(   R   t   filest   filet   valuet   ft   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_random.pyt   test_bug_1727780–   s    	
(   t   __name__t
   __module__R   R   R   R(   R.   R1   R:   RC   RF   RN   RT   R]   Ri   (    (    (    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_random.pyR   
   s   													t   WichmannHill_TestBasicOpsc           B   s8   e  Z e j ƒ  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   s   |  j  t |  j j d ƒ d  S(   Ni   (   i   NN(   R$   t
   ValueErrorR	   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_random.pyt   test_setstate_first_arg¦   s    c         C   s‹   d } |  j  j ƒ  } |  j  j | ƒ |  j  j ƒ  } |  j  j | ƒ x! t | ƒ D] } |  j  j ƒ  qQ W|  j  j ƒ  } |  j | | ƒ d  S(   Niè  (   R	   R   R*   R
   R   R   R   (   R   R   R8   t   r1R   t   r2(    (    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_random.pyt   test_strong_jumpahead©   s    c         C   s�   x– d	 D]Ž } |  j  j | ƒ |  j  j ƒ  } |  j  j d d ƒ } |  j  j | ƒ |  j  j ƒ  } |  j  j d d ƒ } |  j | | ƒ |  j | | ƒ q Wd  S(
   Ni   i   i{   iÒ  i90  i@â iñû	 i    (   i   i   i{   iÒ  i90  i@â iñû	 (   R	   t   whseedR
   RO   R   (   R   R   RP   RQ   RR   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_random.pyt   test_gauss_with_whseed¶   s    c      	   C   s@   t  j ƒ  �. t  j d d ƒ |  j t |  j j d ƒ Wd  QXd  S(   Nt   errors   Underlying randomi   i<   I       (   t   warningst   catch_warningst   filterwarningsR$   t   UserWarningR	   Rc   (   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_random.pyt   test_bigrandÇ   s    (	   Rj   Rk   R
   t   WichmannHillR	   Rn   Rq   Rs   Ry   (    (    (    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_random.pyRl   £   s
   			t   SystemRandom_TestBasicOpsc           B   s†   e  Z e j ƒ  Z d  „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d „  Z d	 „  Z d
 „  Z e e d „ Z RS(   c         C   s   |  j  j ƒ  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_random.pyR   Ð   s    c         C   s3   |  j  t |  j j ƒ |  j  t |  j j d  ƒ d  S(   N(   R$   t   NotImplementedErrorR	   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_random.pyR   Ô   s    c         C   s   |  j  j d ƒ d  S(   Nid   (   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_random.pyR(   Ø   s    c         C   s   |  j  j d ƒ d  S(   Nid   (   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_random.pyR.   Ü   s    c         C   s6   d  |  j _ |  j j d ƒ |  j |  j j d  ƒ d  S(   Nid   (   R    R	   t
   gauss_nextR   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_random.pyRT   à   s    c         C   s>   x7 t  t j d ƒ D]" } |  j t t j |  j | ƒ q Wd  S(   Ni   (   R"   RU   RV   R$   R|   RW   R	   (   R   RY   (    (    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_random.pyR]   å   s    c         C   sX   d } d } x1 t  d ƒ D]# } | t |  j j ƒ  | ƒ O} q W|  j | | d ƒ d  S(   Ni   i5   i    id   i   I        (   R   R;   R	   R
   R   (   R   t   spant   cumR   (    (    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_random.pyt   test_53_bits_per_floaté   s
    !c         C   sz   d } d } xS t  d ƒ D]E } |  j j | ƒ } |  j d | k oN | k  n ƒ | | O} q W|  j | | d ƒ d  S(   Ni   iô  i    id   i   l"                                                                       (   R   R	   Rc   R5   R   (   R   R~   R   R   Rh   (    (    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_random.pyRy   ñ   s    #c      	   C   s¤   x� d d d d d d d d d	 g	 D]z } |  j  j d
 | d
 ƒ } |  j  j d
 | ƒ } | | k rj q" n  |  j | |  j  j | | ƒ k o– | k  n ƒ q" Wd  S(   Ni(   iP   i    iÈ   iÓ   iú   iw  i   i&  i   (   R	   Rc   R5   (   R   R   t   startt   stop(    (    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_random.pyt   test_bigrand_rangesü   s    (c      	   C   s}   xv d d	 d f d d f g D]Y \ } } |  j  t t | | ƒ ƒ t g  t d ƒ D] } |  j j | | ƒ ^ qP ƒ ƒ q Wd  S(   Niþÿÿÿi    i   i<   id   (   iþÿÿÿi    I       I       ðIþÿÿÿÿÿÿïI       I       ðI       I       I      (   R   R4   R"   R   R	   Rc   (   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_random.pyt   test_rangelimits  s    (c         C   sZ  xJ t  d d ƒ D]9 } |  j d |  j j | ƒ k oC d | k  n ƒ q W|  j j } x} d d d d d d d d	 d
 d d d d d g D]K } d } x$ t  d ƒ D] } | | | ƒ O} q£ W|  j | d | d ƒ qŠ W|  j t |  j j ƒ |  j t |  j j d d ƒ |  j t |  j j d ƒ |  j t |  j j d ƒ |  j t |  j j d ƒ d  S(   Ni   iè  i    i   i   i   i   i    i4   i5   i6   iw   i   i€   i�   id   iÿÿÿÿg333333$@(   R   R5   R	   t   getrandbitsR   R$   R%   Rm   (   R   R7   t   getbitsR~   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_random.pyt   test_genrandbits	  s    77c         C   sL  xEt  d d ƒ D]4} d | >} | d } | d | | d ƒ ƒ } |  j | | ƒ |  j | d | d k ƒ | | d 7} | d | | d ƒ ƒ } |  j | | | d g ƒ |  j d | | k oØ d | d k n ƒ | | d ?8} | d | | d ƒ ƒ } |  j | | ƒ |  j d | | k o>d | d k n ƒ q Wd  S(   Ni   iè  l    grÄZ|
 ð?i   i   (   R   R   R5   t   assertIn(   R   t   _logR;   R   R   t   numbitsR7   (    (    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_random.pyt   test_randbelow_logic  s    

/(   Rj   Rk   R
   t   SystemRandomR	   R   R   R(   R.   RT   R]   R€   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_random.pyR{   Í   s   											t   MersenneTwister_TestBasicOpsc           B   s˜   e  Z e j ƒ  Z e j d  „  ƒ Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d „  Z d „  Z d „  Z d	 „  Z d
 „  Z e e d „ Z d „  Z RS(   c         C   sž   d t  f d „  ƒ  Y} d t f d „  ƒ  Y} |  j j d ƒ |  j j ƒ  } xL d | d ƒ | d ƒ g D]/ } |  j j | ƒ |  j |  j j ƒ  | ƒ qg Wd  S(   Nt   BadIntc           B   s   e  Z d  „  Z RS(   c         S   s   d d d  S(   Ni   g        (    (   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_random.pyt   __abs__;  s    (   Rj   Rk   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_random.pyRŽ   :  s   t   BadLongc           B   s   e  Z d  „  Z RS(   c         S   s   d d d  S(   Ni   g        (    (   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_random.pyR�   >  s    (   Rj   Rk   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_random.pyR�   =  s   i*   l   * (   R;   t   longR	   R   R
   R   (   R   RŽ   R�   t   expected_valuet   seed_arg(    (    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_random.pyt   test_bug_314786  s    "c         C   s   |  j  t |  j j d ƒ d  S(   Ni   (   i   NN(   R$   Rm   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_random.pyRn   F  s    c      	   C   sV  |  j  j ƒ  } |  j t |  j  j d
 ƒ |  j t |  j  j d d d  f ƒ |  j t |  j  j d d d d  f ƒ |  j t |  j  j d d d d d  f ƒ |  j t t f ƒ �& |  j  j d d d d d  f ƒ Wd  QX|  j t t f ƒ �& |  j  j d d d d d  f ƒ Wd  QX|  j  j d	 ƒ } |  j  j | ƒ |  j	 |  j  j d	 ƒ | ƒ d  S(   Ni   i   i   R   iq  i    ip  iÿÿÿÿid   (   i   NN(   i   i   i   (   R   (   i    (   R   (   i   (   iq  (   i   (   iÿÿÿÿ(
   R	   R   R$   R%   R   R    Rm   t   OverflowErrorR…   R   (   R   t   start_statet   bits100(    (    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_random.pyt   test_setstate_middle_argI  s    "&*''c      
   C   s�   d d d d d d d d d	 d
 g
 } |  j  j d d d d ƒ |  j d ƒ d } x3 t | | ƒ D]" \ } } |  j | | d d ƒqc Wd  S(   Ng>F¤±dVÝ?g¥wR1Û‰ë?g€Q¥"¶í?g~ëªá5ÿÖ?g Ámbò´?gÌY×KbXÂ?gH,rÌŠ”µ?g”VÁ‚ƒ8á?gðO¾ËÖ¶?gÆ4ÓÔ–é?l   #q l   Gai    l   fi@   l   Ÿ$ i`   iÐ  iöÿÿÿt   placesi   l        l           `&l               À'R (   R	   R   R   t   zipt   assertAlmostEqual(   R   RA   t   actualR   t   e(    (    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_random.pyt   test_referenceImplementation]  s    	c      
   C   s¦   d d l  m } d d d d d d d	 d
 d d g
 } |  j j d d d d ƒ |  j d ƒ d } x< t | | ƒ D]+ \ } } |  j t | | d ƒ ƒ | ƒ qs Wd  S(   Niÿÿÿÿ(   t   ldexpl   #¤1É,u l   ¥w¤bl'Ü l    £JŠXí l   ¿uªak~[ l   @"p1y l   sVë%bX$ l   ‰E3EJ l   ”V‚b‰ l   þa“oek l   Æ4¦)[vÈ l   #q l   Gai    l   fi@   l   Ÿ$ i`   iÐ  iöÿÿÿi5   l        l           `&l               À'R (   t   mathRŸ   R	   R   R   Rš   R   R‘   (   R   RŸ   RA   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_random.pyt$   test_strong_reference_implementation|  s    	c         C   s"   d d >d } |  j  j | ƒ d  S(   Nl    i'  i   i   i€8 (   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_random.pyt   test_long_seed’  s    c         C   sX   d } d } x1 t  d ƒ D]# } | t |  j j ƒ  | ƒ O} q W|  j | | d ƒ d  S(   Ni   i5   i    id   i   I        (   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_random.pyR€   ›  s
    !c         C   sz   d } d } xS t  d ƒ D]E } |  j j | ƒ } |  j d | k oN | k  n ƒ | | O} q W|  j | | d ƒ d  S(   Ni   iô  i    id   i   l"                                                                       (   R   R	   Rc   R5   R   (   R   R~   R   R   Rh   (    (    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_random.pyRy   £  s    #c      	   C   s¤   x� d d d d d d d d d	 g	 D]z } |  j  j d
 | d
 ƒ } |  j  j d
 | ƒ } | | k rj q" n  |  j | |  j  j | | ƒ k o– | k  n ƒ q" Wd  S(   Ni(   iP   i    iÈ   iÓ   iú   iw  i   i&  i   (   R	   Rc   R5   (   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_random.pyRƒ   ®  s    (c      	   C   s}   xv d d	 d f d d f g D]Y \ } } |  j  t t | | ƒ ƒ t g  t d ƒ D] } |  j j | | ƒ ^ qP ƒ ƒ q Wd  S(   Niþÿÿÿi    i   i<   id   (   iþÿÿÿi    I       I       ðIþÿÿÿÿÿÿïI       I       ðI       I       I      (   R   R4   R"   R   R	   Rc   (   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_random.pyR„   ¶  s    (c         C   s†  |  j  j d ƒ |  j |  j  j d ƒ d ƒ xJ t d d ƒ D]9 } |  j d |  j  j | ƒ k oo d | k  n ƒ q< W|  j  j } x} d d d d	 d
 d d d d d d d d d g D]K } d } x$ t d ƒ D] } | | | ƒ O} qÏ W|  j | d | d ƒ q¶ W|  j t |  j  j ƒ |  j t |  j  j d ƒ |  j t |  j  j d d ƒ |  j t |  j  j d ƒ |  j t |  j  j d ƒ d  S(   Ni‡Ö id   l   S!mÿ.vFXO i   iè  i    i   i   i   i   i    i4   i5   i6   iw   i   i€   i�   R   iÿÿÿÿ(	   R	   R   R   R…   R   R5   R$   R%   Rm   (   R   R7   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_random.pyR‡   »  s     77c         C   sL  xEt  d d ƒ D]4} d | >} | d } | d | | d ƒ ƒ } |  j | | ƒ |  j | d | d k ƒ | | d 7} | d | | d ƒ ƒ } |  j | | | d g ƒ |  j d | | k oØ d | d k n ƒ | | d ?8} | d | | d ƒ ƒ } |  j | | ƒ |  j d | | k o>d | d k n ƒ q Wd  S(   Ni   iè  l    grÄZ|
 ð?i   i   (   R   R   R5   Rˆ   (   R   R‰   R;   R   R   RŠ   R7   (    (    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_random.pyR‹   Ó  s    

/c         C   si   d } d } d } |  j  j | | | ƒ } |  j | | k  oG | k n ƒ |  j | | | d ƒ d  S(   NI ¥Ôè   lûÿÿÿ   Fµx:^V i8ÿÿÿi    (   R	   Rc   R5   R   (   R   R�   R‚   t   stepRM   (    (    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_random.pyt   test_randrange_bug_1590891è  s    #(   Rj   Rk   R
   t   RandomR	   R   t   cpython_onlyR”   Rn   R˜   Rž   R¡   R¢   R€   Ry   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_random.pyR�   3  s   											g       @g      à?c         C   s±   |  d k  r, t  t t  |  ƒ t d |  ƒ S|  d } | |  d t | ƒ | t d d |  d |  d d |  d d	 |  d
 d |  d d |  d d |  d d |  d g	 ƒ S(   Ng      à?g      ð?g      @gïÿÿÿÿï?g÷
Ã¶)$…@g&ÔŽŽ¬“ÀgtÓa–ˆ@g       @g—”œQ®fÀg      @g>@~Â)@g      @gA~»²¼Á¿g      @gã~\ÇÕä>g      @gÈÛáiåE†>g      @(   R   R   t   gammaR   R   (   t   zt   sqrt2pit   az(    (    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_random.pyR§   ð  s     
t   TestDistributionsc           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s×  t  j ƒ  } g  t d ƒ D] } | j  ƒ  ^ q d g d } | j | _  | j d d ƒ | j | _  | j d ƒ | j | _  | j d ƒ | j | _  | j d d ƒ | j | _  | j d d ƒ | j | _  | j	 d d ƒ | j | _  | j
 d d ƒ | j | _  | j d d ƒ | j | _  | j d d ƒ | j | _  | j d d ƒ | j | _  | j d d ƒ | j | _  | j d d ƒ | j | _  | j d	 d	 ƒ | j | _  | j d d d d	 ƒ d  S(
   Ni2   g        i   i   i
   g      ð?g{®Gáz„?g      i@g      @(   R
   R¥   R   R?   t   uniformt   paretovariatet   expovariatet   weibullvariatet   vonmisesvariatet   normalvariateRO   t   lognormvariatet   gammavariatet   betavariatet
   triangular(   R   t   gR   RM   (    (    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_random.pyt   test_zeroinputs  s<    0              c         C   s6  t  j ƒ  } d } g  t d | ƒ D] } | t | ƒ ^ q" } xñ| j d d d d d f | j d d d d f d	 d
 d d
 d f | j d d d d d f | j d t t d d f | j	 d d d d d d  f | j
 d! t d d d ƒ t d d d ƒ t d d d ƒ d f g D]\ } } } } | j | _  g  }	 xE t t | ƒ ƒ D]1 } y |	 j | | Œ  ƒ WqXt k
 rˆqXXqXWd }
 } x* |	 D]" } |
 | 7}
 | | | d 7} qžWt |	 ƒ } |  j |
 | | d d d d | j | f ƒ|  j | | d | d d d d | j | f ƒq Wd  S("   Niˆ  i   g      ð?g      $@i   i   g        g      @g      @g      "@g      @g      2@g      ø?g®Gáz®ó?i    i   g      @R™   t   msgs   %s%r(   g      ð?g      $@g      &@g      "@g     @T@(   g      ø?g      @(   g®Gáz®ó?i    (   g      @g      @g      @g      0@g      @(   g      ð?g      @(   R
   R¥   R   t   floatR¬   Rµ   R®   R°   R   R­   R¯   R§   R?   R3   t   appendt
   IndexErrorR›   Rj   (   R   R¶   R   R   RM   t   variatet   argst   mut	   sigmasqrdt   yt   s1t   s2R�   (    (    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_random.pyt   test_avg_std  s8    ,+@

c         C   sH  t  j ƒ  } d } x/| j d d f | j d d f | j d	 d f | j t d ƒ f d f | j d t d ƒ f d f | j d
 d f | j d d f | j t d ƒ d f d f | j	 d d f | j
 t d ƒ f d f | j d t d ƒ f d f | j d d f g D]< \ } } } x* t | ƒ D] } |  j | | Œ  | ƒ q WqWd  S(   Nid   g      $@t   infg        g      @g      ð?(   g      $@g      $@(   g      $@g      $@(   g      $@g      $@g      $@(   g      $@g        (   g        g        (   g      $@g        (   g        g      $@(   R
   R¥   R¬   Rµ   R®   R¹   R°   RO   R²   R±   R­   R¯   R"   R   (   R   R¶   R   R¼   R½   RA   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_random.pyt   test_constant6  s"    "c      
   C   sœ   t  j ƒ  } d } xƒ d D]{ } xr d D]j } xa t | ƒ D]S } | j | | ƒ } |  j d | k oq t  j k n d	 d
 j | | | ƒ ƒq9 Wq& Wq Wd  S(   Nid   g        gš™™™™™¹?gÍÌÌÌÌÌ@gÍÌÌÌÌÌ@gffffff@g     @@i    R¸   sC   vonmisesvariate({}, {}) produced a result {} out of range [0, 2*pi](   g        gš™™™™™¹?gÍÌÌÌÌÌ@gÍÌÌÌÌÌ@(   g        gffffff@g     @@(   R
   R¥   R"   R°   R5   t   TWOPIt   format(   R   R¶   R   R¾   t   kappat   _R2   (    (    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_random.pyt   test_von_mises_rangeJ  s    c         C   s$   t  j d d ƒ t  j d d ƒ d  S(   Ni    g  4&õkCg}Ã”%­I²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_random.pyt   test_von_mises_large_kappaX  s    (   Rj   Rk   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_random.pyR«     s
   		 		t
   TestModulec           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   sP   |  j  t j d ƒ |  j  t j d ƒ |  j  t j d ƒ |  j  t j d ƒ d  S(   Ngˆ3?Írû?gê.DTû!@gì9úþB.ö?g†tîºY@(   R›   R
   t   NV_MAGICCONSTRÆ   t   LOG4t   SG_MAGICCONST(   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_random.pyt   testMagicConstants_  s    c         C   s,   |  j  t t j ƒ t t t ƒ ƒ k ƒ d  S(   N(   R5   R4   R
   t   __all__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_random.pyt   test__all__e  s    c         C   s*   d t  j f d „  ƒ  Y} | d d ƒ d  S(   Nt   Subclassc           B   s   e  Z d d  „ Z RS(   c         S   s   t  j j |  ƒ d  S(   N(   R
   R¥   t   __init__(   R   t   newarg(    (    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_random.pyRÕ   l  s    N(   Rj   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_random.pyRÔ   k  s   RÖ   i   (   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_random.pyt    test_random_subclass_with_kwargsi  s    (   Rj   Rk   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_random.pyRÌ   ^  s   		c         C   sÈ   t  t t t g } y t j ƒ  j ƒ  Wn t k
 r9 n X| j t ƒ t	 j
 | Œ  d d  l } |  rÄ t | d ƒ rÄ d  g d } x7 t t | ƒ ƒ D]# } t	 j
 | Œ  | j ƒ  | | <q• W| GHn  d  S(   Niÿÿÿÿt   gettotalrefcounti   (   Rl   R�   R«   RÌ   R
   RŒ   R|   Rº   R{   R   t   run_unittestt   syst   hasattrR    R   R3   RØ   (   t   verboset   testclassesRÚ   t   countsR   (    (    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_random.pyt	   test_mainq  s"    	t   __main__RÜ   (   t   unittestR
   R   RU   Ru   R    R    R   R   R   R   t	   functoolsR   t   testR   t   TestCaseR   Rl   R{   R�   R§   R«   RÌ   R    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_random.pyt   <module>   s"   (™*f½\