ó
‹wÛjc           @@ sq  d  Z  d d l m Z d d l m Z d d l m Z d d l Z d d l m Z d d l	 Z	 d d l
 Z d d l Z d f  d „  ƒ  YZ d	 f  d
 „  ƒ  YZ d e e e j f d „  ƒ  YZ d f  d „  ƒ  YZ d e e e e j f d „  ƒ  YZ d e e j f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d „  Z e d k rme ƒ  n  d S(   ud   Unit tests for memory-based file-like objects.
StringIO -- for unicode strings
BytesIO -- for bytes
i    (   t   unicode_literals(   t   print_function(   t   absolute_importN(   t   test_supportt   MemorySeekTestMixinc           B@ s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C@ s"   |  j  d ƒ } |  j | ƒ } d  S(   Nu
   1234567890(   t   buftypet   ioclass(   t   selft   buft   bytesIo(    (    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_memoryio.pyt   testInit   s    c         C@ s•   |  j  d ƒ } |  j | ƒ } |  j | d  | j d ƒ ƒ |  j | d d !| j d ƒ ƒ |  j | d | j d ƒ ƒ |  j |  j | j ƒ  ƒ d  S(   Nu
   1234567890i   i   i   i„  (   R   R   t   assertEqualt   readt   EOF(   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_memoryio.pyt   testRead   s     c         C@ sQ   |  j  d ƒ } |  j | ƒ } |  j | | j ƒ  ƒ |  j |  j | j ƒ  ƒ d  S(   Nu
   1234567890(   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_memoryio.pyt   testReadNoArgs    s    c         C@ s�   |  j  d ƒ } |  j | ƒ } | j d ƒ | j d ƒ |  j | | j ƒ  ƒ | j d ƒ |  j | d | j ƒ  ƒ |  j t | j d ƒ d  S(   Nu
   1234567890i   i    i   g        (   R   R   R   t   seekR   t   assertRaisest	   TypeError(   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_memoryio.pyt   testSeek'   s    c         C@ s~   |  j  d ƒ } |  j | ƒ } |  j d | j ƒ  ƒ | j d ƒ |  j d | j ƒ  ƒ | j d ƒ |  j d | j ƒ  ƒ d  S(   Nu
   1234567890i    i   i'  (   R   R   R   t   tellR   (   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_memoryio.pyt   testTell3   s    (   t   __name__t
   __module__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_memoryio.pyR      s
   					t   MemoryTestMixinc           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 d „  Z d „  Z d „  Z d „  Z RS(   c         C@ s&   |  j  ƒ  } |  j |  j | j ƒ d  S(   N(   R   R   t   UnsupportedOperationt   detach(   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_memoryio.pyt   test_detach@   s    c         C@ s&  |  j  | j | d ƒ ƒ d ƒ |  j  | j d ƒ d ƒ |  j  | j | d ƒ ƒ d ƒ |  j  | j ƒ  d ƒ |  j  | j d ƒ d ƒ |  j  | j ƒ  d ƒ |  j  | j | d ƒ ƒ d ƒ |  j  | j d ƒ d ƒ |  j  | j | d ƒ ƒ d	 ƒ |  j  | j d
 ƒ d
 ƒ |  j  | j ƒ  d	 ƒ d  S(   Nu   blah.i   i    u   Hello.i   u	    world


i	   u   hi   i   (   R   t   writeR   R   t   truncate(   R   t   ft   t(    (    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_memoryio.pyt	   write_opsD   s    c         C@ s¿   |  j  d ƒ } |  j | ƒ } |  j | |  j  ƒ |  j | j ƒ  | ƒ |  j ƒ  } |  j | |  j  ƒ |  j | j ƒ  | ƒ |  j t | j d  ƒ | j	 ƒ  |  j t
 | j |  j  d ƒ ƒ d  S(   Nu   hello world
u    (   R   R   R    R   t   getvalueR   R   R   t   Nonet   closet
   ValueError(   R   R   t   memio(    (    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_memoryio.pyt
   test_writeQ   s    
c         C@ sø   |  j  d ƒ } |  j ƒ  } |  j | j | g d ƒ d  ƒ |  j | j ƒ  | d ƒ | j g  ƒ |  j | j ƒ  | d ƒ |  j ƒ  } |  j t | j | g d g ƒ |  j | j ƒ  | ƒ |  j t | j d  ƒ | j ƒ  |  j t	 | j g  ƒ d  S(   Nu
   1234567890id   i   (
   R   R   R   t
   writelinesR"   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_memoryio.pyt   test_writelines^   s      
c         @ s8   ˆ  j  ƒ  } ‡  f d †  } ˆ  j t | j | ƒ  ƒ d  S(   Nc           3@ s   ˆ  j  d ƒ Vt ‚ d  S(   Nu   spam(   R   t   KeyboardInterrupt(    (   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_memoryio.pyt	   error_geno   s    (   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_memoryio.pyt   test_writelines_errorm   s    c         C@ s�  |  j  d ƒ } |  j | ƒ } |  j t | j d ƒ | j d ƒ |  j | j ƒ  d ƒ |  j | j ƒ  | d  ƒ |  j | j d ƒ d ƒ |  j | j ƒ  | d  ƒ |  j | j d ƒ d ƒ |  j | j ƒ  | d  ƒ |  j | j ƒ  d ƒ | j d d ƒ | j	 | ƒ |  j | j ƒ  | d  | ƒ | j ƒ  } |  j | j d  ƒ | ƒ |  j | j ƒ  | ƒ |  j t | j d ƒ | j ƒ  |  j t | j d ƒ d  S(	   Nu
   1234567890iÿÿÿÿi   i   l    i    i   u   0(   R   R   R   R$   R   R   R   R!   R   R   R"   R   R#   (   R   R   R%   t   pos(    (    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_memoryio.pyt   test_truncateu   s(    
c         C@ s®   |  j  d ƒ } |  j | ƒ } |  j | j ƒ  | ƒ |  j d  ƒ } |  j | j ƒ  |  j ƒ | j | d ƒ |  j | j ƒ  | d ƒ | j | ƒ |  j | j ƒ  | ƒ d  S(   Nu
   1234567890i   (   R   R   R   R!   R"   R   t   __init__(   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_memoryio.pyt	   test_init�   s    c         C@ sà  |  j  d ƒ } |  j | ƒ } |  j | j d ƒ |  j ƒ |  j | j d ƒ | d  ƒ |  j | j d ƒ | d d !ƒ |  j | j d ƒ | d ƒ |  j | j ƒ  |  j ƒ | j d ƒ |  j | j ƒ  | ƒ |  j | j ƒ  |  j ƒ |  j | j ƒ  d ƒ | j d ƒ |  j | j d ƒ | ƒ | j d ƒ |  j t | j ƒ  ƒ t | ƒ ƒ | j d	 ƒ |  j t | j ƒ  ƒ t | ƒ ƒ | j d ƒ |  j | j d  ƒ | ƒ |  j	 t
 | j d
 ƒ | j ƒ  |  j	 t | j ƒ d  S(   Nu
   1234567890i    i   l    i   i„  i
   iÿÿÿÿid   u    (   R   R   R   R   R   R   R   t   typeR"   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_memoryio.pyt	   test_read˜   s,     ""
c         C@ s=  |  j  d ƒ } |  j | d ƒ } |  j | j d ƒ |  j ƒ |  j | j ƒ  | ƒ |  j | j ƒ  | ƒ |  j | j ƒ  |  j ƒ | j d ƒ |  j | j d ƒ | d  ƒ |  j | j d ƒ | d d !ƒ |  j | j d ƒ | d d !ƒ | j d ƒ |  j | j d ƒ | ƒ | j d ƒ |  j | j d ƒ |  j ƒ |  j  d ƒ } |  j | d	 d  ƒ } |  j | j ƒ  | ƒ |  j | j ƒ  | ƒ |  j | j ƒ  | d  ƒ |  j | j ƒ  |  j ƒ | j d ƒ |  j t | j ƒ  ƒ t | ƒ ƒ |  j | j ƒ  | ƒ |  j t | j d
 ƒ | j	 ƒ  |  j t
 | j ƒ d  S(   Nu   1234567890
i   i    i   l    i
   i   iÿÿÿÿi   u    (   R   R   R   t   readlineR   R   R0   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_memoryio.pyt   test_readline²   s4      "
c         C@ s’  |  j  d ƒ } |  j | d ƒ } |  j | j ƒ  | g d ƒ | j d ƒ |  j | j ƒ  | d g | g d ƒ | j d ƒ |  j | j d ƒ | g d ƒ | j d ƒ |  j | j d ƒ | g d ƒ | j d ƒ |  j | j d ƒ | g d ƒ | j d ƒ |  j t | j ƒ  d ƒ t | ƒ ƒ | j d ƒ |  j | j d  ƒ | g d ƒ |  j t | j d	 ƒ | j	 ƒ  |  j t
 | j ƒ d  S(
   Nu   1234567890
i
   i   i	   i    l    i   iÿÿÿÿu    (   R   R   R   t	   readlinesR   R0   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_memoryio.pyt   test_readlinesÑ   s$    (   & 
c         C@ s'  |  j  d ƒ } |  j | d ƒ } |  j t | ƒ | ƒ |  j t | d ƒ ƒ |  j t | d ƒ ƒ d } x( | D]  } |  j | | ƒ | d 7} qq W|  j | d ƒ | j d ƒ d } x( | D]  } |  j | | ƒ | d 7} q¿ W|  j | d ƒ |  j | d ƒ } | j ƒ  |  j t	 t
 | ƒ d  S(   Nu   1234567890
i
   u   __iter__u   nexti    i   i   (   R   R   R   t   itert
   assertTruet   hasattrR   R#   R   R$   t   next(   R   R   R%   t   it   line(    (    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_memoryio.pyt   test_iteratorç   s&    
c         C@ sÜ   |  j  d ƒ } |  j | ƒ } |  j | j ƒ  | ƒ | j ƒ  |  j | j ƒ  | ƒ |  j t | j ƒ  ƒ t | ƒ ƒ |  j | d ƒ } |  j | j ƒ  d |  j  d ƒ ƒ |  j | ƒ } | j ƒ  |  j t | j ƒ d  S(   Nu
   1234567890iè  iýÿÿÿu   890(	   R   R   R   R!   R   R0   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_memoryio.pyt   test_getvalueý   s    
"#
c         C@ só  |  j  d ƒ } |  j | ƒ } | j d ƒ |  j t | j d ƒ |  j t | j d d ƒ |  j t | j d d ƒ |  j | j d ƒ d ƒ |  j | j d d ƒ d ƒ |  j | j ƒ  | ƒ |  j | j d ƒ d ƒ |  j | j d ƒ d ƒ |  j | j d d ƒ d ƒ |  j | j ƒ  | d ƒ |  j | j t | ƒ ƒ t | ƒ ƒ |  j | j ƒ  |  j ƒ | j t | ƒ d ƒ |  j | j ƒ  |  j ƒ |  j | j d d ƒ t | ƒ ƒ |  j | j ƒ  |  j ƒ | j	 ƒ  |  j t | j d ƒ d  S(	   Nu
   1234567890i   iÿÿÿÿi   i   i    l    i   (
   R   R   R   R   R$   R   R   t   lenR   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_memoryio.pyt	   test_seek  s*    %"
c         C@ sä   |  j  d ƒ } |  j | ƒ } |  j | j t | ƒ d ƒ d ƒ |  j | j ƒ  |  j ƒ |  j | j ƒ  d ƒ |  j | j ƒ  | ƒ | j	 |  j ƒ |  j | j ƒ  | ƒ | j	 | ƒ |  j | j ƒ  | |  j  d ƒ | ƒ d  S(   Nu
   1234567890i   i   u    (
   R   R   R   R   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_memoryio.pyt   test_overseek$  s    #c         C@ s›   |  j  d ƒ } |  j | ƒ } |  j | j ƒ  d ƒ | j d ƒ |  j | j ƒ  d ƒ | j d ƒ |  j | j ƒ  d ƒ | j ƒ  |  j t | j ƒ d  S(   Nu
   1234567890i    i   i'  (   R   R   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_memoryio.pyt	   test_tell1  s    
c         C@ s8   |  j  d ƒ } |  j | ƒ } |  j | j ƒ  d  ƒ d  S(   Nu
   1234567890(   R   R   R   t   flushR"   (   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_memoryio.pyt
   test_flush=  s    c         C@ sä   |  j  ƒ  } |  j | j ƒ  t ƒ |  j | j ƒ  t ƒ |  j | j ƒ  t ƒ |  j | j ƒ  t ƒ |  j | j t ƒ | j	 ƒ  |  j
 t | j ƒ |  j
 t | j ƒ |  j
 t | j ƒ |  j
 t | j ƒ |  j | j t ƒ d  S(   N(   R   R   t   writablet   Truet   readablet   seekablet   isattyt   Falset   closedR#   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_memoryio.pyt
   test_flagsC  s    
c         @ s]   ˆ j  d ƒ ‰  ‡  ‡ f d †  } ‡  ‡ f d †  } ˆ j | ƒ  ˆ  ƒ ˆ j | ƒ  ˆ  ƒ d  S(   Nu
   1234567890c          @ s/   d ˆ j  f d „  ƒ  Y}  |  ˆ  ƒ } | j ƒ  S(   Nt   MemIOc           B@ s   e  Z RS(    (   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_memoryio.pyRL   U  s   (   R   R!   (   RL   t   m(   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_memoryio.pyt   test1T  s    c          @ s8   d ˆ j  f ‡ f d †  ƒ  Y}  |  ˆ  d  ƒ } | j ƒ  S(   NRL   c           @ s   e  Z ‡  f d  †  Z RS(   c         @ s   ˆ  j  j |  | ƒ d  S(   N(   R   R.   (   t   met   at   b(   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_memoryio.pyR.   [  s    (   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_memoryio.pyRL   Z  s   (   R   R"   R!   (   RL   RM   (   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_memoryio.pyt   test2Y  s    (   R   R   (   R   RN   RR   (    (   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_memoryio.pyt   test_subclassingR  s
    c         C@ s0   x) t  d ƒ D] } |  j ƒ  } d | _ q Wd  S(   Nid   i   (   t   rangeR   t   foo(   R   t   _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_memoryio.pyt   test_instance_dict_leakb  s    c   	      @ s€  ˆ  j  d ƒ } ˆ  j | ƒ } d | _ | j d ƒ d ˆ  j f ‡  f d †  ƒ  Y} d d  l } d | _ | j | _ | | _ | | d ƒ } | j d ƒ xÚ t	 d t
 j d	 ƒ D]Â } x¹ | | f D]« } t
 j t
 j | d
 | ƒƒ } ˆ  j | j ƒ  | j ƒ  ƒ ˆ  j | j | j ƒ ˆ  j | j | j ƒ ˆ  j | j ƒ  | j ƒ  ƒ | j ƒ  ˆ  j t t
 j | | ƒ qÃ Wq° W| ` d  S(   Nu
   1234567890i*   i   t   PickleTestMemIOc           @ s   e  Z ‡  f d  †  Z RS(   c         @ s    ˆ  j  j |  | ƒ | |  _ d  S(   N(   R   R.   RU   (   RO   t	   initvalueRU   (   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_memoryio.pyR.   p  s    (   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_memoryio.pyRX   o  s   i    u   __main__iP   i   t   protocol(   R   R   RU   R   t   __main__R   R   t   __qualname__RX   RT   t   picklet   HIGHEST_PROTOCOLt   loadst   dumpsR   R!   t	   __class__R   R#   R   R$   (	   R   R   R%   RX   R[   t   submemiot   protot   objt   obj2(    (   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_memoryio.pyt   test_picklingi  s*    			
!(   R   R   R   R    R&   R(   R+   R-   R/   R1   R3   R5   R<   R=   R?   R@   RA   RC   RK   RS   RW   Rf   (    (    (    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_memoryio.pyR   >   s(   																			t   PyBytesIOTestc           B@ se   e  Z e j Z e d  „  ƒ Z e j Z d Z d „  Z	 d „  Z
 d „  Z d „  Z d „  Z d „  Z RS(   c         C@ s   |  j  d ƒ S(   Nu   ascii(   t   encode(   t   s(    (    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_memoryio.pyR   ”  s    t    c         C@ sK   |  j  d ƒ } |  j | ƒ } |  j t | j ƒ |  j | j ƒ  | ƒ d  S(   Nu
   1234567890(   R   R   R   R   t   read1R   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_memoryio.pyt
   test_read1š  s    c         C@ sõ  |  j  d ƒ } |  j | ƒ } t d ƒ } |  j | j | ƒ d ƒ |  j | d ƒ |  j | j | ƒ d ƒ |  j | d ƒ |  j | j | ƒ d ƒ |  j | d ƒ t d ƒ } | j d ƒ |  j | j | ƒ d ƒ |  j | d	 ƒ t d
 ƒ } | j d ƒ |  j | j | ƒ d ƒ |  j | d
 ƒ |  j t | j d ƒ d d  l } | j d d ƒ } |  j | ƒ } | j | ƒ |  j | j	 ƒ  d	 ƒ | j
 ƒ  |  j t | j | ƒ |  j d ƒ } t ƒ  } | j d ƒ | j | ƒ |  j | d
 ƒ d  S(   Nu
   1234567890t   helloi   t   12345t   67890i    s   hello worldi
   t   1234567890dRj   u    RQ   t   123i*   (   R   R   t	   bytearrayR   t   readintoR   R   R   t   arrayt   tostringR#   R$   (   R   R   R%   RQ   Rt   RP   (    (    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_memoryio.pyt   test_readinto¡  s<    
	c         C@ s+  |  j  d ƒ } |  j | ƒ } |  j | j d d ƒ d ƒ |  j | j d d ƒ d ƒ |  j | j d d ƒ d ƒ |  j | j d d ƒ d ƒ |  j | j d d ƒ d	 ƒ |  j | j d d ƒ d
 ƒ | j d d ƒ |  j | j ƒ  | d ƒ | j d ƒ | j d d ƒ |  j | j ƒ  | d ƒ d  S(   Nu
   1234567890iÿÿÿÿi   i    i   iüÿÿÿ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_memoryio.pyt   test_relative_seekÂ  s    c         C@ sU   |  j  ƒ  } |  j t |  j  d ƒ |  j t | j d ƒ |  j t | j d g ƒ d  S(   Nu
   1234567890(   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_memoryio.pyt   test_unicodeÒ  s    c         C@ s|   d } d d  l  } | j  d | ƒ } |  j | ƒ } |  j | j ƒ  | ƒ |  j | j | ƒ d ƒ |  j | j ƒ  | ƒ d  S(   Nt
   1234567890i    RQ   i
   (   Rt   R   R   R!   R   (   R   R   Rt   RP   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_memoryio.pyt   test_bytes_arrayÙ  s    c         C@ s?   |  j  d ƒ } |  j d | ƒ |  j t |  j | d d  ƒd  S(   Nu
   1234567890t   initial_bytesRU   (   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_memoryio.pyt   test_issue5449â  s    (   R   R   t   pyioR   t   staticmethodR   t   BytesIOR   R   Rl   Rv   Rw   Rx   Rz   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_memoryio.pyRg   �  s   				!				t   TextIOTestMixinc           B@ sb   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z RS(
   c         @ s­   |  j  d d  ƒ ‰  ‡  f d †  } |  j ˆ  j d  ƒ ˆ  j d ƒ | ƒ  |  j ˆ  j d ƒ ˆ  j d ƒ | ƒ  |  j ˆ  j d	 ƒ ˆ  j d ƒ | ƒ  |  j ˆ  j d
 ƒ d  S(   Nt   newlinec           @ s   ˆ  j  d ƒ ˆ  j ƒ  d  S(   Ni    (   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_memoryio.pyt   force_decodeï  s    u   a
u   
u   b
u   
u   cdu   (   u   
u   
(   u   u   
u   
(   R   R"   R   t   newlinesR   (   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_memoryio.pyt   test_newlines_propertyê  s    c         C@ s¦   |  j  ƒ  } |  j t | j d d ƒ |  j t | j d d ƒ |  j t | j d d ƒ |  j t | j d d ƒ |  j t | j d d ƒ |  j t | j d d ƒ d  S(   Niÿÿÿÿi   i   iýÿÿÿi   (   R   R   t   IOErrorR   (   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_memoryio.pyRw   ý  s    c         C@ s@   |  j  ƒ  } |  j | j ƒ |  j | j ƒ |  j | j ƒ d  S(   N(   R   t   assertIsNonet   encodingt   errorst   assertFalset   line_buffering(   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_memoryio.pyt   test_textio_properties  s    c         C@ s¯   |  j  d ƒ } |  j t | ƒ d d d g ƒ |  j | j ƒ  d ƒ |  j  ƒ  } |  j | j d ƒ d ƒ | j d ƒ |  j t | ƒ d d d g ƒ |  j | j ƒ  d ƒ d  S(   Nu   a
b
cdu   a
u   b
u   cdi   i    (   R   R   t   listR!   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_memoryio.pyt   test_newline_default  s    c         C@ s†  |  j  d d d  ƒ} |  j t | ƒ d d d d g ƒ | j d ƒ |  j | j d ƒ d	 ƒ |  j | j d
 ƒ d ƒ |  j | j d
 ƒ d ƒ |  j | j d ƒ d ƒ |  j | j ƒ  d ƒ |  j  d d  ƒ } |  j d
 | j d ƒ ƒ |  j d | j d ƒ ƒ |  j d | j d ƒ ƒ | j d ƒ |  j | j ƒ  d ƒ |  j | j ƒ  d ƒ |  j  d d d  ƒ} |  j | j d ƒ d ƒ d  S(   Nu   a
b
cdR�   u   a
u   b
u   c
u   di    i   u   ai   u   
bu   
cu   
u   a
b
c
di   u   b
u   cdu   a
bu   a
b(   R   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_memoryio.pyt   test_newline_none  s"    "c         C@ sd  |  j  d d d ƒ} |  j t | ƒ d d d d g ƒ | j d ƒ |  j | j d	 ƒ d
 ƒ |  j | j d ƒ d ƒ |  j | j d ƒ d ƒ |  j | j ƒ  d ƒ |  j  d d ƒ } |  j d | j d ƒ ƒ |  j d | j d ƒ ƒ |  j d | j d ƒ ƒ |  j d | j d ƒ ƒ | j d ƒ |  j t | ƒ d d d d g ƒ |  j | j ƒ  d ƒ d  S(   Nu   a
b
cdR�   u    u   a
u   b
u   cu   di    i   u   a
bi   u   
ci   u   u   bu   d(   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_memoryio.pyt   test_newline_empty1  s    ""c         C@ s»   |  j  d d d ƒ} |  j t | ƒ d d d g ƒ |  j | j ƒ  d ƒ |  j  d d ƒ } |  j | j d ƒ d ƒ | j d ƒ |  j t | ƒ d d d g ƒ |  j | j ƒ  d ƒ d  S(	   Nu   a
b
cdR�   u   
u   a
u   b
u   cdi   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_memoryio.pyt   test_newline_lfD  s    c         C@ s  |  j  d d d ƒ} |  j | j ƒ  d ƒ | j d ƒ |  j t | ƒ d d d d d	 g ƒ |  j | j ƒ  d ƒ |  j  d d ƒ } |  j | j d ƒ d
 ƒ | j d ƒ |  j t | ƒ d d d d d	 g ƒ | j d ƒ |  j | j ƒ  d d d d d	 g ƒ |  j | j ƒ  d ƒ d  S(   Nu   a
b
cdR�   u   u   abcdi    u   au   bu   cu   di   (   R   R   R   R   RŒ   R!   R   R4   (   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_memoryio.pyt   test_newline_crP  s    %%%c         C@ s
  |  j  d d d ƒ} |  j | j ƒ  d ƒ | j d ƒ |  j t | ƒ d d d g ƒ | j d ƒ |  j | j ƒ  d d d g ƒ |  j | j ƒ  d ƒ |  j  d d ƒ } |  j | j d ƒ d	 ƒ | j d ƒ |  j t | ƒ d d d g ƒ |  j | j ƒ  d ƒ d  S(
   Nu   a
b
cdR�   u   
u
   a
b
cdi    u   a
u   b
u   cdi   (   R   R   R   R   RŒ   R4   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_memoryio.pyt   test_newline_crlf`  s    c         C@ sH   |  j  d d d  ƒ} |  j | j d ƒ d ƒ |  j | j ƒ  d ƒ d  S(   Nu   a
b
R�   i   u   a
b
(   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_memoryio.pyt   test_issue5265p  s    (   R   R   R„   Rw   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_memoryio.pyR€   è  s   		
								t   PyStringIOTestc           B@ s/   e  Z e Z e j Z e j Z d  Z d „  Z	 RS(   u    c         C@ sd   t  d ƒ } |  j | ƒ } |  j | j ƒ  | ƒ |  j ƒ  } | j | ƒ |  j | j ƒ  | ƒ d  S(   Ni Ø  (   t   unichrR   R   R   R   R!   (   R   t	   surrogateR%   (    (    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_memoryio.pyt   test_lone_surrogates~  s    (
   R   R   t   unicodeR   R}   t   StringIOR   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_memoryio.pyR”   w  s
   		t   PyStringIOPickleTestc           B@ s<   e  Z d  Z e Z e j Z d Z d e j f d „  ƒ  YZ	 RS(   uE   Test if pickle restores properly the internal state of StringIO.
    u    R   c           B@ s   e  Z d  „  Z d „  Z RS(   c         O@ s"   t  j t  j t j | | Ž  ƒ ƒ S(   N(   R]   R_   R`   R}   R™   (   t   clst   argst   kwargs(    (    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_memoryio.pyt   __new__‘  s    c         O@ s   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_memoryio.pyR.   “  s    (   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_memoryio.pyR   �  s   	(
   R   R   t   __doc__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_memoryio.pyRš   ‰  s
   	t   CBytesIOTestc           B@ s_   e  Z e j Z e j Z e j d  ƒ e j	 ƒ Z	 d „  Z
 d „  Z e j Z e j d „  ƒ Z RS(   u.   array.array() does not have the new buffer APIc         C@ s˜   |  j  ƒ  } | j ƒ  } |  j t | ƒ d ƒ t | d ƒ |  j | d t ƒ | d d  k	 rw |  j | d t ƒ n  | j	 ƒ  |  j
 t | j ƒ d  S(   Ni   i    i   i   (   R   t   __getstate__R   R>   Rr   t   assertIsInstancet   intR"   t   dictR#   R   R$   (   R   R%   t   state(    (    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_memoryio.pyt   test_getstate   s    
c         C@ s  |  j  ƒ  } | j d ƒ | j t d ƒ d d  f ƒ | j d d i d d 6f ƒ |  j t | j d ƒ |  j t | j d ƒ |  j t | j d ƒ |  j t | j d ƒ |  j t | j d ƒ |  j t | j ƒ |  j t | j d ƒ | j ƒ  |  j t | j d ƒ d  S(   Ns   no errori    i   u   spamRj   iÿÿÿÿu   unicodeg        s   len-testRJ   (   s   no errori    N(   Rj   iÿÿÿÿN(   u   unicodei    N(   Rj   g        N(   Rj   i    i    (   s   len-testi    (   RJ   i    N(   R   t   __setstate__R"   Rr   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_memoryio.pyt   test_setstate«  s    
c         C@ sŽ   t  j d ƒ } |  j } |  j t j t j ƒ  ƒ | ƒ | t j ƒ  | ƒ | t j d ƒ | d d ƒ | t j d d ƒ | d d ƒ d  S(   Nt   P2PP2PRP   i   iè  (   t   supportt   calcobjsizet   check_sizeofR   t   objectt
   __sizeof__t   ioR   (   R   t   basesizet   check(    (    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_memoryio.pyt   test_sizeof½  s    	(   R   R   R¯   R   R   R   t   unittestt   skipRg   Rz   R¦   R¨   Rª   R¬   t   cpython_onlyR²   (    (    (    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_memoryio.pyR    —  s   					t   CStringIOTestc           B@ s5   e  Z e j Z e j Z d  „  Z d „  Z d „  Z RS(   c         C@ sâ   |  j  d ƒ } |  j | ƒ } |  j | j ƒ  | ƒ |  j | j | ƒ t | ƒ ƒ |  j | j ƒ  t | ƒ ƒ |  j | j ƒ  | ƒ |  j | j | ƒ t | ƒ ƒ |  j | j ƒ  t | ƒ d ƒ |  j | j ƒ  | | ƒ d  S(   Nu   ð ŒŠð �‡i   (   R   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_memoryio.pyt   test_widecharÌ  s     c         C@ s²   |  j  ƒ  } | j ƒ  } |  j t | ƒ d ƒ |  j | d t ƒ |  j | d t ƒ |  j | d t ƒ | d d  k	 r‘ |  j | d t	 ƒ n  | j
 ƒ  |  j t | j ƒ d  S(   Ni   i    i   i   i   (   R   R¡   R   R>   R¢   R˜   t   strR£   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_memoryio.pyR¦   Ø  s    
c         C@ s
  |  j  ƒ  } | j d ƒ | j d d d i d d 6f ƒ |  j t | j d ƒ |  j t | j d ƒ |  j t | j d ƒ |  j t | j d ƒ |  j t | j d ƒ |  j t | j d ƒ |  j t | j ƒ |  j t | j d ƒ | j ƒ  |  j t | j d ƒ d  S(   Nu   no erroru   
i    u    i   u   spamu   fiÿÿÿÿRj   g        u   len-testu   closed(   u   no erroru   
i    N(   u    u   fi    N(   u    u    iÿÿÿÿN(   Rj   u    i    N(   u    u    g        N(   u    u    i    i    (   u   len-testi    (   u   closedu    i    N(   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_memoryio.pyR¨   ä  s     
(	   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_memoryio.pyR¶   Æ  s
   				t   CStringIOPickleTestc           B@ s*   e  Z e j Z d  e j f d „  ƒ  YZ RS(   R   c           B@ s   e  Z d  „  Z d „  Z RS(   c         O@ s(   t  j t  j t j | | Ž  d d ƒƒ S(   NRZ   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_memoryio.pyRž   û  s    c         O@ s   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_memoryio.pyR.   þ  s    (   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_memoryio.pyR   ú  s   	(   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_memoryio.pyR¹   ÷  s   	c          C@ s)   t  t t t t t g }  t j |  Œ  d  S(   N(   Rg   R”   R    R¶   Rš   R¹   Rª   t   run_unittest(   t   tests(    (    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_memoryio.pyt	   test_main  s    u   __main__(   RŸ   t
   __future__R    R   R   R³   t   testR   Rª   R¯   t   _pyioR}   R]   R   R   t   TestCaseRg   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_memoryio.pyt   <module>   s,   -ÿ RY�	/1	