ó
wÛjc           @  s  d  Z  d d l m Z d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l	 Z	 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 d d l m Z d d l m Z d d l m Z d d l Z d d l Z d d l Z d d l Z y d d l Z Wn e k
 rIe Z n Xy d d l  Z  Wn e k
 rse Z  n Xe! Z" e j# Z$ d	   Z% d
   Z& d f  d     YZ' d e' e j( f d     YZ) d e' e j( f d     YZ* d e' f d     YZ+ d e+ e j( f d     YZ, d e+ e j( f d     YZ- d e+ f d     YZ. d e. e j( f d     YZ/ d e. e j( f d     YZ0 d e+ f d     YZ1 d e1 e j( f d      YZ2 d! e1 e j( f d"     YZ3 d# f  d$     YZ4 d% e4 e j5 f d&     YZ6 d' e4 e j5 f d(     YZ7 d) f  d*     YZ8 d+ e8 e j( f d,     YZ9 d- e8 e j( f d.     YZ: d/ e	 j; f d0     YZ< d1 e< f d2     YZ= d3 e< f d4     YZ> d5 f  d6     YZ? d7 f  d8     YZ@ d9 e	 j; e? f d:     YZA d; eA e@ f d<     YZB d= eA f d>     YZC d? e	 j; e? f d@     YZD dA eD e@ f dB     YZE dC eD f dD     YZF dE e	 j; f dF     YZG dG eG f dH     YZH dI eG f dJ     YZI dK eA eD f dL     YZJ dM eB eE eJ e@ f dN     YZK dO eJ f dP     YZL dQ e jM f dR     YZN e jO eN jP  dS e	 j; f dT     YZQ dU e	 j; f dV     YZR dW eR f dX     YZS dY eR f dZ     YZT d[ e	 j; f d\     YZU d] eU f d^     YZV d_ eU f d`     YZW da e	 j; f db     YZX dc eX f dd     YZY de eX f df     YZZ e	 j[ e j\ dg k dh  di e	 j; f dj     Y Z] dk e] f dl     YZ^ dm e] f dn     YZ_ do   Z` ea dp k re`   n  d S(q   u   Unit tests for the io module.iÿÿÿÿ(   t   print_function(   t   unicode_literalsN(   t   cyclet   count(   t   deque(   t   UserList(   t   test_supportc          O  s   t  t |  |    S(   N(   t
   memoryviewt	   bytearray(   t   post   kw(    (    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_io.pyt	   byteslike9   s    c          C  s,   t  j t d d d  }  |  j SWd QXd S(   u(   Get the default TextIOWrapper chunk sizeu   rt   encodingu   latin1N(   t   iot   opent   __file__t   _CHUNK_SIZE(   t   f(    (    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_io.pyt   _default_chunk_size<   s    t   MockRawIOWithoutReadc           B  sn   e  Z d  Z d d  Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d d
  Z RS(   um   A RawIO implementation without read(), so as to exercise the default
    RawIO.read() which calls readinto().c         C  s.   t  |  |  _ g  |  _ d |  _ d |  _ d  S(   Ni    (   t   listt   _read_stackt   _write_stackt   _readst   _extraneous_reads(   t   selft
   read_stack(    (    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_io.pyt   __init__F   s    		c         C  s    |  j  j t |   t |  S(   N(   R   t   appendt   bytest   len(   R   t   b(    (    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_io.pyt   writeL   s    c         C  s   t  S(   N(   t   True(   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_io.pyt   writableP   s    c         C  s   d S(   Ni*   (    (   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_io.pyt   filenoS   s    c         C  s   t  S(   N(   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_io.pyt   readableV   s    c         C  s   t  S(   N(   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_io.pyt   seekableY   s    c         C  s   d S(   Ni    (    (   R   R	   t   whence(    (    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_io.pyt   seek\   s    c         C  s   d S(   Ni    (    (   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_io.pyt   tell_   s    c         C  sÄ   |  j  d 7_  t |  } y |  j d } Wn! t k
 rO |  j d 7_ d SX| d  k rj |  j d =d  St |  } t |  | k r  |  j d =| | | *| S| |  | (| | |  j d <| Sd  S(   Ni   i    (   R   R   R   t
   IndexErrorR   t   None(   R   t   buft   max_lent   datat   n(    (    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_io.pyt   readintob   s$    


c         C  s   | S(   N(    (   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_io.pyt   truncatew   s    (    N(   t   __name__t
   __module__t   __doc__R   R    R"   R#   R$   R%   R'   R(   R/   R*   R0   (    (    (    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_io.pyR   B   s   								t   CMockRawIOWithoutReadc           B  s   e  Z RS(    (   R1   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_io.pyR4   z   s   t   PyMockRawIOWithoutReadc           B  s   e  Z RS(    (   R1   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_io.pyR5   }   s   t	   MockRawIOc           B  s   e  Z d d   Z RS(   c         C  sA   |  j  d 7_  y |  j j d  SWn |  j d 7_ d SXd  S(   Ni   i    t    (   R   R   t   popR   (   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_io.pyt   read   s    N(   R1   R2   R*   R9   (    (    (    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_io.pyR6      s   t
   CMockRawIOc           B  s   e  Z RS(    (   R1   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_io.pyR:      s   t   PyMockRawIOc           B  s   e  Z RS(    (   R1   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_io.pyR;      s   t   MisbehavedRawIOc           B  s8   e  Z d    Z d d  Z d   Z d   Z d   Z RS(   c         C  s   t  j |  |  d S(   Ni   (   R6   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_io.pyR       s    c         C  s   t  j |  |  d S(   Ni   (   R6   R9   (   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_io.pyR9      s    c         C  s   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_io.pyR'      s    c         C  s   d S(   Ni8þÿÿ(    (   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_io.pyR(      s    c         C  s   t  j |  |  t |  d S(   Ni   (   R6   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_io.pyR/      s    N(   R1   R2   R    R*   R9   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_io.pyR<      s
   			t   CMisbehavedRawIOc           B  s   e  Z RS(    (   R1   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_io.pyR=   £   s   t   PyMisbehavedRawIOc           B  s   e  Z RS(    (   R1   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_io.pyR>   Š   s   t   CloseFailureIOc           B  s   e  Z d  Z d   Z RS(   i    c         C  s   |  j  s d |  _  t  n  d  S(   Ni   (   t   closedt   IOError(   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_io.pyt   close­   s    		(   R1   R2   R@   RB   (    (    (    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_io.pyR?   ª   s   t   CCloseFailureIOc           B  s   e  Z RS(    (   R1   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_io.pyRC   ²   s   t   PyCloseFailureIOc           B  s   e  Z RS(    (   R1   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_io.pyRD   µ   s   t
   MockFileIOc           B  s&   e  Z d    Z d d  Z d   Z RS(   c         C  s#   g  |  _  t t |   j |  d  S(   N(   t   read_historyt   superRE   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_io.pyR   »   s    	c         C  sD   t  t |   j |  } |  j j | d  k r3 d  n	 t |   | S(   N(   RG   RE   R9   RF   R   R*   R   (   R   R.   t   res(    (    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_io.pyR9   ¿   s    (c         C  s,   t  t |   j |  } |  j j |  | S(   N(   RG   RE   R/   RF   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_io.pyR/   Ä   s    N(   R1   R2   R   R*   R9   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_io.pyRE   ¹   s   	t   CMockFileIOc           B  s   e  Z RS(    (   R1   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_io.pyRI   É   s   t   PyMockFileIOc           B  s   e  Z RS(    (   R1   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_io.pyRJ   Ì   s   t   MockNonBlockWriterIOc           B  sG   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c         C  s   g  |  _  d  |  _ d  S(   N(   R   R*   t   _blocker_char(   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_io.pyR   Ò   s    	c         C  s    d j  |  j  } g  |  j (| S(   NR7   (   t   joinR   (   R   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_io.pyt   pop_writtenÖ   s    
c         C  s   | |  _  d S(   u'   Block when a given char is encountered.N(   RL   (   R   t   char(    (    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_io.pyt   block_onÛ   s    c         C  s   t  S(   N(   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_io.pyR$   ß   s    c         C  s   t  S(   N(   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_io.pyR%   â   s    c         C  s   t  S(   N(   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_io.pyR"   å   s    c         C  s   t  |  } d } |  j ry y | j |  j  } Wn t k
 rD qy X| d k ri |  j j | |   | Sd  |  _ d  Sn  |  j j |  t |  S(   Niÿÿÿÿi    (   R   RL   t   indext
   ValueErrorR   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_io.pyR    è   s    		(	   R1   R2   R   RO   RQ   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_io.pyRK   Ð   s   						t   CMockNonBlockWriterIOc           B  s   e  Z e j Z RS(    (   R1   R2   R   t   BlockingIOError(    (    (    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_io.pyRT   ü   s   t   PyMockNonBlockWriterIOc           B  s   e  Z e j Z RS(    (   R1   R2   t   pyioRU   (    (    (    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_io.pyRV   ÿ   s   t   IOTestc           B  sp  e  Z d    Z d   Z d   Z e 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 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   t  j t  j  d  S(   N(   t   supportt   unlinkt   TESTFN(   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_io.pyt   setUp  s    c         C  s   t  j t  j  d  S(   N(   RY   RZ   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_io.pyt   tearDown  s    c         C  sµ  |  j  | j d  d  | j d  |  j  | j   d  | j d  |  j  | j d  d  |  j  | j d  d  |  j  | j d  d  |  j  | j   d  |  j  | j d d  d  |  j  | j   d  t d  } |  j  | j |  d	  d | (|  j  | j d  d  |  j  | j d  d  |  j  | j d d  d  |  j  | j   d  |  j  | j d  d  |  j  | j   d  |  j t | j d  d  S(   Ns   blah.i   i    s   Hello.i   iÿÿÿÿi   s	    world


i	   t   *t   hi   i   i   g        s	   *********(   t   assertEqualR    R0   R(   R'   R   t   assertRaisest	   TypeError(   R   R   t   buffer(    (    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_io.pyt	   write_ops  s(    c         C  sG  | j  d  } |  j | d  t |  } |  j | j |  d  |  j | j   d  t d  } |  j | j |  d  |  j t |  d  |  j | d  d  |  j | j d  d  |  j | j  d  d  |  j | j  d	  d
  |  j | j t d   d  |  j | j d d  d  |  j | j  d  d  |  j | j  d  d
  |  j | j t    d  |  j | j d d	  d  |  j | j  d  d  |  j | j   d  |  j	 t
 | j d  | rC| j d  |  j | j    d  | j d  |  j | j    d  |  j | j    d
  n  d  S(   Ni   t   hellos    worli   s   d
i    i   s   hello world
i   R7   t   xiúÿÿÿi   t   worldi
   g        s   world
(   R9   R`   R   R/   t   tobytesR   R   R'   R(   Ra   Rb   (   R   R   t   bufferedR-   (    (    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_io.pyt   read_ops#  s6    i   i   c         C  s  |  j  | j |  j  |  j  |  j  | j   |  j  |  j  | j d  d  |  j  | j   |  j d  |  j  | j d d  |  j d  |  j  | j   |  j d  |  j  | j   |  j d  |  j  | j d d  |  j d  |  j  | j |  j d  |  j d  |  j  | j   |  j d  |  j  | j d d  |  j d  |  j  | j d d  |  j  |  j  | j d  d  d  S(   Nt   xxxi   iÿÿÿÿi   i   i    Rf   (   R`   R'   t   LARGER(   R    R0   R9   (   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_io.pyt   large_file_opsB  s    ##'#c      	   C  só   xR d	 D]J } |  j  t j |  - } |  j t | j  |  j t | j  Wd  QXq W|  j  t j d  6 } |  j t | j d  |  j t | j d g  Wd  QX|  j  t j d  6 } |  j t | j d  |  j t | j d g  Wd  QXd  S(
   Nu   wu   wbu   rbt   blahs   blah
u   ru   blahu   blah
(   u   wu   wb(	   R   RY   R[   Ra   RA   R9   t   readlineR    t
   writelines(   R   t   modet   fp(    (    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_io.pyt   test_invalid_operationsS  s    c      	   C  sn   d } |  j  t |  j | d  | j d  } t j   . t j d t  |  j  t |  j | d  Wd  QXd  S(   Nu   foo baru   wu   asciiu   ignore(   Ra   Rb   R   t   encodet   warningst   catch_warningst   simplefiltert   DeprecationWarning(   R   t   fn_with_NULt   bytes_fn(    (    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_io.pyt   test_open_handles_NUL_chars`  s    c         C  sê   |  j  t j d d d V } |  j | j   t  |  j | j   t  |  j | j   t  |  j	 |  Wd  QX|  j  t j d d d V } |  j | j   t  |  j | j   t  |  j | j   t  |  j
 |  Wd  QXd  S(   Nu   wbt	   bufferingi    u   rb(   R   RY   R[   R`   R$   t   FalseR"   R!   R%   Rd   Rj   (   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_io.pyt   test_raw_file_ioi  s    c         C  sá   |  j  t j d  V } |  j | j   t  |  j | j   t  |  j | j   t  |  j	 |  Wd  QX|  j  t j d  Y } |  j | j   t  |  j | j   t  |  j | j   t  |  j
 | t  Wd  QXd  S(   Nu   wbu   rb(   R   RY   R[   R`   R$   R}   R"   R!   R%   Rd   Rj   (   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_io.pyt   test_buffered_file_iou  s    c      
   C  s'  |  j  t j d   } | j d  Wd  QX|  j  t j d  ­ } |  j | j   d  |  j | j d  d  |  j | j d  d  |  j | j d	  d
  |  j | j   d  |  j | j d   d  |  j t | j d  Wd  QX|  j  t j d   } |  j t | j d  Wd  QXd  S(   Nu   wbs"   abc
def
xyzzy
foo bar
another lineu   rbs   abc
i
   s   def
i   t   xyi   s   zzy
s   foo bar
s   another lineg333333@u   r(	   R   RY   R[   R    R`   Ro   R*   Ra   Rb   (   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_io.pyt   test_readline  s    c         C  s9   d |  j  f d     Y} |  j t t f t |    d  S(   Nt   Rc           B  s   e  Z d    Z RS(   c         S  s   d  S(   N(   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_io.pyRo     s    (   R1   R2   Ro   (    (    (    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_io.pyR     s   (   t   IOBaseRa   Rb   t   StopIterationt   next(   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_io.pyt   test_readline_nonsizeable  s    c         C  s6   d |  j  f d     Y} |  j t |   j d  d  S(   NR   c           B  s   e  Z d    Z RS(   c         S  s   d  S(   N(   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_io.pyR     s    (   R1   R2   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_io.pyR     s   i   (   R   Ra   Rb   t	   readlines(   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_io.pyt   test_next_nonsizeable  s    c         C  sX   |  j    } |  j |  | j   } |  j | d  |  j  |  } |  j | t  d  S(   Ns   hello world
(   t   BytesIORd   t   getvalueR`   Rj   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_io.pyt   test_raw_bytes_io  s    c         C  s   t  j d  d k s" t  j d k r< t j d d |  j  n  |  j t j d d   } |  j |  Wd  QX|  j t j d   } |  j |  Wd  QXd  S(   Ni   u   winu   darwinu	   largefileu-   test requires %s bytes and a long time to runu   w+bi    (   t   syst   platformRY   t   requiresRl   R   R[   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_io.pyt   test_large_file_ops§  s    "c         C  sÃ   xŒ d D]Ž } d  } |  j t j d |   } | j d  Wd  QX|  j | j t  d  } y- |  j t j d |   } d d Wd  QXWn$ t k
 r­ |  j | j t  q X|  j	 d  q Wd  S(   Ni    i   id   u   wbRk   u    1 // 0 didn't raise an exception(   i    i   id   (
   R*   R   RY   R[   R    R`   R@   R!   t   ZeroDivisionErrort   fail(   R   t   bufsizeR   (    (    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_io.pyt   test_with_openŽ  s    c      
   C  sÑ   |  j  t j d   } | j d  Wd  QX|  j  t j d d d  } |  j | j   d  Wd  QX|  j  t j d   } |  j | j   d  Wd  QX|  j  t j d   } |  j | j   d  Wd  QXd  S(   Nu   wbRk   u   abR|   i    i   u   a(   R   RY   R[   R    R`   R(   t   assertGreater(   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_io.pyt   test_append_mode_tellÄ  s    c           s¥   g   d |  j  f    f d     Y    t j d  } | j d  ~ t j   |  j  d d d g  |  j t j d   } |  j | j   d  Wd  QXd  S(	   Nt   MyFileIOc             s>   e  Z    f d    Z    f d   Z    f d   Z RS(   c           sB    j  d  y t   |   j } Wn t k
 r6 n X|   d  S(   Ni   (   R   RG   t   __del__t   AttributeError(   R   R   (   R   t   record(    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_io.pyR   Ñ  s    c           s$    j  d  t   |   j   d  S(   Ni   (   R   RG   RB   (   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_io.pyRB   Ù  s    c           s$    j  d  t   |   j   d  S(   Ni   (   R   RG   t   flush(   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_io.pyR   Ü  s    (   R1   R2   R   RB   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_io.pyR   Ð  s   u   wbRk   i   i   i   u   rb(   t   FileIORY   R[   R    t
   gc_collectR`   R   R9   (   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_io.pyt   test_destructorÎ  s    "
c           sX   g   d | f    f d     Y      } ~ t  j   |  j  d d d g  d  S(   Nt   MyIOc             sG   e  Z d    Z    f d   Z    f d   Z    f d   Z RS(   c         S  s   d |  _  d |  _ d |  _ d  S(   Ni   i   i   (   t   on_delt   on_closet   on_flush(   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_io.pyR   ê  s    		c           sE    j  |  j  y t   |   j } Wn t k
 r9 n X|   d  S(   N(   R   R   RG   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_io.pyR   ò  s    c           s'    j  |  j  t   |   j   d  S(   N(   R   R    RG   RB   (   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_io.pyRB   ú  s    c           s'    j  |  j  t   |   j   d  S(   N(   R   R¡   RG   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_io.pyR   ý  s    (   R1   R2   R   R   RB   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_io.pyR   é  s   	i   i   i   (   RY   R   R`   (   R   t   baseR   (    (   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_io.pyt   _check_base_destructorç  s    	
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_io.pyt   test_IOBase_destructor  s    c         C  s   |  j  |  j  d  S(   N(   R£   t	   RawIOBase(   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_io.pyt   test_RawIOBase_destructor  s    c         C  s   |  j  |  j  d  S(   N(   R£   t   BufferedIOBase(   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_io.pyt   test_BufferedIOBase_destructor  s    c         C  s   |  j  |  j  d  S(   N(   R£   t
   TextIOBase(   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_io.pyt   test_TextIOBase_destructor  s    c         C  sc   |  j  t j d   } | j d  Wd  QX|  j  t j d   } |  j | j   d  Wd  QXd  S(   Nu   wbRk   u   rb(   R   RY   R[   R    R`   R9   (   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_io.pyt   test_close_flushes  s    c         C  s   t  j  d t d   } t | j    } |  j t j d d    } |  j | j |  |  Wd  QX|  j t j d    } |  j | j |  |  Wd  QXd  S(   Nt   ii
   u   wbi    (	   t   arrayt   rangeR   t   tostringR   RY   R[   R`   R    (   R   t   aR.   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_io.pyt   test_array_writes  s    c         C  s&   |  j  t |  j t j d d t d  S(   Nu   wt   closefd(   Ra   RS   R   RY   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_io.pyt   test_closefd  s    c      
   C  s«   |  j  t j d   } | j d  Wd  QX|  j  t j d  e } |  j  | j   d d t } |  j | j   d  | j d  | j	   |  j
 t | j  Wd  QXd  S(   Nu   wu   egg
u   rR²   i    (   R   RY   R[   R    R#   R}   R`   R9   R'   RB   Ra   RS   (   R   R   t   file(    (    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_io.pyt   test_read_closed#  s    
c         C  s&   |  j  t |  j t j d d t d  S(   Nu   rR²   (   Ra   RS   R   RY   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_io.pyt   test_no_closefd_with_filename-  s    c      
   C  s   |  j  t j d   } | j d  Wd  QX|  j  t j d  W } |  j | j j j t  |  j  | j	   d d t
 } |  j | j j j t
  Wd  QXd  S(   Nu   wbs   egg
u   rR²   (   R   RY   R[   R    R`   Rc   t   rawR²   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_io.pyt   test_closefd_attr1  s    c         C  s   |  j  t j d  } | j d  | | _ t j |  } ~ t j   |  j |   |  |  j	 t j d   } |  j
 | j   d  Wd  QXd  S(   Nu   wbt   abcxxxu   rb(   R   RY   R[   R    R   t   weakreft   refR   t   assertIsNoneR   R`   R9   (   R   R   t   wr(    (    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_io.pyt   test_garbage_collection9  s    	
c      	   C  s  d } t  j j |  s1 |  j d j |   n  t j d k rP |  j d  n  t j t j	 k  rr |  j d  n  |  j
 | d d d  } |  j t | j  Wd  QX|  j
 | d   } |  j t | j  Wd  QX|  j
 | d	   } |  j t | j  Wd  QXd  S(
   Nu	   /dev/zerou   {0} does not existiÿÿÿu+   test can only run in a 32-bit address spaceu$   test requires at least 2GB of memoryu   rbR|   i    u   r(   t   ost   patht   existst   skipTestt   formatR   t   maxsizeRY   t   real_max_memuset   _2GR   Ra   t   OverflowErrorR9   (   R   t   zeroR   (    (    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_io.pyt   test_unbounded_fileF  s    c           s   |  j  | |    g       f d   } |  _ |  j t  j  |  j  j  |  j    |  j   d  d    _ d  S(   Nc             s    j  g   (t    d  S(   N(   R@   RA   (    (   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_io.pyt	   bad_flush[  s    i    c           S  s   d  S(   N(   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_io.pyt   <lambda>c  R7   (   R   R   Ra   RA   RB   t
   assertTrueR@   t   assertFalse(   R   t   argst   kwargsRÊ   (    (   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_io.pyt   check_flush_error_on_closeV  s    	c         C  s¢  |  j  t j d d d t j t j t j t j B } |  j  | d d d t j t j t j t j B } |  j  | d d d d t t j |  |  j  t j d  t j t j t j t j B } |  j  | d  t j t j t j t j B } |  j  | d d t t j |  |  j  t j d  t j t j t j t j B } |  j  | d  t j t j t j t j B } |  j  | d d t t j |  d  S(   Nu   wbR|   i    R²   u   w(	   RÐ   RY   R[   R¿   R   t   O_WRONLYt   O_CREATR}   RB   (   R   t   fd(    (    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_io.pyt   test_flush_error_on_closee  s$    c         C  sP   |  j  t j d d d } | j   | j   | j   |  j t | j  d  S(   Nu   wbR|   i    (   R   RY   R[   RB   Ra   RS   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_io.pyt   test_multi_close}  s
    


c         C  sÛ   |  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	  d  S(   Nt   abct   dt   efgi   t   abt   ct   eft   gR7   (   RÖ   R×   NRØ   N(   R   R*   R`   R9   (   R   t   rawio(    (    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_io.pyt   test_RawIOBase_read  s    c         C  s   |  j  t d  t } |  j  t d  Y } |  j | j   d t } | j | j   d t | j   | j   | j   Wd  QXWd  QXd  S(   Nu   rbR²   (   R   R   R   R#   R}   R   Ro   RB   (   R   t   f1t   f2t   fileio(    (    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_io.pyt   test_fileio_closefd  s    

c         C  sh   t  j d t  @ } |  j t   |  j t j d d d Wd  QXt j   Wd  QX|  j	 | g   d  S(   NR   u   wR|   i    (
   Ru   Rv   R!   Ra   RS   R   RY   R[   R   R`   (   R   t   recorded(    (    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_io.pyt   test_nonbuffered_textio  s
    c         C  sh   t  j d t  @ } |  j t   |  j t j d d d Wd  QXt j   Wd  QX|  j	 | g   d  S(   NR   u   wt   newlineu   invalid(
   Ru   Rv   R!   Ra   RS   R   RY   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_io.pyt   test_invalid_newline€  s
    c         C  sa   d |  j  f d     Y} |   } t d  } |  j | j |  d  |  j | j   d  d  S(   Nt   Streamc           B  s   e  Z d    Z RS(   c         S  s   d S(   Nt   12345(    (   R   t   size(    (    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_io.pyR9   ®  s    (   R1   R2   R9   (    (    (    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_io.pyRç   ­  s   i   Rè   (   R§   R   R`   R/   Rh   (   R   Rç   t   streamRc   (    (    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_io.pyt   test_buffered_readinto_mixin«  s
    	c         C  s9   d |  j  f d     Y} |   } |  j t | j  d  S(   NR   c           B  s   e  Z d    Z d   Z RS(   c         S  s   d  S(   N(    (   R   t   namet   value(    (    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_io.pyt   __setattr__·  s    c         S  s   t     d  S(   N(   t   OSError(   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_io.pyR   ¹  s    (   R1   R2   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_io.pyR   ¶  s   	(   R   Ra   Rï   RB   (   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_io.pyt   test_close_assertµ  s    	I       (+   R1   R2   R\   R]   Rd   R}   Rj   Rl   Rm   Rs   R{   R~   R   R   R   R   R   R   R   R   R   R£   R€   RŠ   Rš   Rª   R«   R±   R³   Rµ   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_io.pyRX     sP   																
										
												
t   CIOTestc           B  s   e  Z d    Z RS(   c         C  sh   d |  j  f d     Y} |   |   } | | _ t j |  } ~ ~ t j   |  j |   |  d  S(   NR   c           B  s   e  Z d    Z RS(   c         S  s   d  S(   N(    (   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_io.pyRB   Ç  s    (   R1   R2   RB   (    (    (    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_io.pyR   Æ  s   (   R   t   objRº   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_io.pyt   test_IOBase_finalizeÂ  s    		
(   R1   R2   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_io.pyRñ   À  s   t   PyIOTestc           B  s    e  Z e j d   e j  Z RS(   uB   len(array.array) returns number of elements rather than bytelength(   R1   R2   t   unittestt   skipRX   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_io.pyRô   Ô  s   t   CommonBufferedTestsc           B  sk   e  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  sR   |  j    } |  j |  } |  j | j   |  |  j t | j  t |  d  S(   N(   R6   t   tpt   assertIst   detachRa   RS   t   repr(   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_io.pyt   test_detachÝ  s
    c         C  s5   |  j    } |  j |  } |  j d | j    d  S(   Ni*   (   R6   Rø   R`   R#   (   R   RÝ   t   bufio(    (    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_io.pyt   test_filenoå  s    c         C  sQ   |  j    } |  j |  } |  j t | j d d  |  j t | j d d  d  S(   Ni    iÿÿÿÿi   (   R6   Rø   Ra   RS   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_io.pyt   test_invalid_argsë  s    c           s   |  j  } g   d | f    f d     Y  |  j   }   |  } | j   } ~ t j   | r |  j  d d d g  n |  j  d d g  d  S(   Nt   MyBufferedIOc             s>   e  Z    f d    Z    f d   Z    f d   Z RS(   c           sB    j  d  y t   |   j } Wn t k
 r6 n X|   d  S(   Ni   (   R   RG   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_io.pyR   ö  s    c           s$    j  d  t   |   j   d  S(   Ni   (   R   RG   RB   (   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_io.pyRB   þ  s    c           s$    j  d  t   |   j   d  S(   Ni   (   R   RG   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_io.pyR     s    (   R1   R2   R   RB   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_io.pyR   õ  s   i   i   i   (   Rø   R6   R"   RY   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_io.pyt   test_override_destructorò  s    	
c           sE   |  j    } |  j |      f d   } |   |  j t |  d  S(   Nc             s      Wd  QXd  S(   N(    (    (   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_io.pyt   _with  s    (   R6   Rø   Ra   RS   (   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_io.pyt   test_context_manager  s
    c           s³    j         f d   } t j d   }  j t |  Wd  QX| j   j   } | r¯  j t | j	    d   j
 | j d  |   j
 | j d  |  n  d  S(   Nc             s    j     j d  S(   N(   Rø   t   xyzzy(    (   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_io.pyR     s    u   stderri   u   Exception IOError: u    ignored(   R?   RY   t   captured_outputRa   R   R   t   stripR`   R   t
   splitlinesRÌ   t
   startswitht   endswith(   R   R   RN   (    (   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_io.pyt   test_error_through_destructor  s    c         C  s   |  j    } |  j |  } d |  j j |  j j f } |  j t |  d |  d | _ |  j t |  d |  d | _ |  j t |  d |  d  S(   Nu   %s.%su   <%s>u   dummyu   <%s name=u'dummy'>t   dummyu   <%s name='dummy'>(   R6   Rø   R2   R1   R`   Rû   Rì   (   R   R·   R   t   clsname(    (    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_io.pyt	   test_repr)  s    		c           s±   |  j     g       f d   } |  _ |  j     |  j t   j  |  j   j  |  j  j  |  j   |  j  d  |  j  d  d    _ d  S(   Nc             s      j   j  g  (t    d  S(   N(   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_io.pyRÊ   8  s    i    i   c           S  s   d  S(   N(   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_io.pyRË   C  R7   (	   R6   R   Rø   Ra   RA   RB   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_io.pyRÔ   3  s    	c         C  s   |  j    } d   } d   } | | _ |  j |  } | | _ |  j t   } | j   Wd  QX|  j | j j d  |  j	 | j
  d  S(   Nc           S  s   t  d   d  S(   Nu   flush(   RA   (    (    (    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_io.pyRÊ   G  s    c           S  s   t  d   d  S(   Nu   close(   RA   (    (    (    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_io.pyt	   bad_closeI  s    u   close(   u   close(   R6   RB   Rø   R   Ra   RA   R`   t	   exceptionRÎ   RÍ   R@   (   R   R·   RÊ   R  R   t   err(    (    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_io.pyt   test_close_error_on_closeE  s    				c         C  sP   |  j    } |  j |  } | j   | j   | j   |  j t | j  d  S(   N(   R6   Rø   RB   Ra   RS   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_io.pyRÕ   S  s    


c         C  sP   |  j    } |  j |  } |  j    } |  j t t f   | | _ Wd  QXd  S(   N(   R6   Rø   Ra   R   Rb   R·   (   R   R·   R+   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_io.pyt   test_readonly_attributes[  s
    (   R1   R2   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_io.pyR÷   Ú  s   							
			t
   SizeofTestc           B  s   e  Z e j d     Z RS(   c         C  s   d } d } |  j    } |  j | d | } t j |  | } |  j    } |  j | d | } |  j t j |  | |  d  S(   Ni   i    t   buffer_size(   R6   Rø   R   t	   getsizeofR`   (   R   t   bufsize1t   bufsize2RÝ   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_io.pyt   test_sizeofe  s    (   R1   R2   RY   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_io.pyR  c  s   t   BufferedReaderTestc           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 e j e d  e j d  d     Z d   Z d   Z RS(   u   rbc         C  s÷   |  j  d g  } |  j |  } | j |  | j | d d | j | d d |  j d | j    |  j t | j | d d |  j t | j | d d |  j t | j | d d |  j  d g  } | j |  |  j d | j    d  S(   NRÖ   R  i   i   i    iðÿÿÿiÿÿÿÿ(   R6   Rø   R   R`   R9   Ra   RS   (   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_io.pyt   test_constructort  s    c         C  s|   |  j  j |  j   } ~ |  j  j |  j   } |  j t t f d | j d  | j |  j    |  j | j d  d  d  S(   Nu   uninitialized|has no attributei    R7   (	   Rø   t   __new__t   assertRaisesRegexpRS   R   R9   R   R6   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_io.pyt   test_uninitialized  s    c         C  sb   xE d D]= } |  j d  } |  j |  } |  j d | j |   q W|  j t | j d  d  S(	   Ni   RÖ   R×   RØ   t   abcdefgiþÿÿÿ(   Ni   (   RÖ   R×   RØ   (   R*   R6   Rø   R`   R9   Ra   RS   (   R   t   argRÝ   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_io.pyt	   test_read  s
    c         C  s-  |  j  d  } |  j |  } |  j d | j d   |  j d | j d   |  j | j d  |  j d | j d   |  j | j d  |  j d | j d   |  j | j d	  |  j d | j d   |  j | j d
  |  j d | j d   |  j | j d  |  j t | j d  d  S(   NRÖ   R×   RØ   R°   i   R   RÚ   id   i   i   R7   i   iÿÿÿÿ(   RÖ   R×   RØ   (   R6   Rø   R`   R9   t   read1R   Ra   RS   (   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_io.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  |  j | j |  d  |  j | d	  |  j | j |  d
  |  j | d	  d  S(   NRÖ   R×   RØ   i   RÙ   t   cdRÛ   i   t   gfi    (   RÖ   R×   RØ   (   R6   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_io.pyt   test_readinto¥  s    c           s|     f d   }   j  |   j   d d d g    j  |   j d  d d g    j  |   j d   d d d g  d  S(   Nc            s     j  d  }    j |   S(   Ns   abc
s   d
RÛ   (   s   abc
s   d
RÛ   (   R6   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_io.pyRý   µ  s    s   abc
s   d
RÛ   i   (   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_io.pyt   test_readlinesŽ  s    ""c         C  s	  d } t  |  } d d d d d g | d g g d d d d g | g g d d d d d g d d d g g g } x | D] \ } } } |  j |  } |  j | d	 | } d }	 x< | D]4 }
 |  j | j |
  | |	 |	 |
 ! |	 |
 7}	 q¶ W|  j | j |  qv Wd  S(
   Nt	   abcdefghiid   i   i   i   i   i    i   R  (   R   RE   Rø   R`   R9   RF   (   R   R-   t   dlent   testsR   t   buf_read_sizest   raw_read_sizesRÝ   Rý   R	   t   nbytes(    (    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_io.pyt   test_bufferingŒ  s    '$c         C  sä   |  j  d  } |  j |  } |  j d | j d   |  j d | j d   |  j d | j    |  j d	 | j d   |  j | j    |  j d	 | j    |  j  d  } |  j d
 | j    |  j | j    d  S(   NRÖ   R×   RØ   t   abcdi   t   ei   t   fgR7   R°   (   RÖ   R×   NRØ   NNN(   R°   NN(   R6   R*   Rø   R`   R9   t   peekRŒ   t   readall(   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_io.pyt   test_read_non_blockingÐ  s    c         C  s;   |  j  d  } |  j |  } |  j d | j d   d  S(   NRÖ   R×   RØ   R  i(#  (   RÖ   R×   RØ   (   R6   Rø   R`   R9   (   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_io.pyt   test_read_past_eofß  s    c         C  s8   |  j  d  } |  j |  } |  j d | j    d  S(   NRÖ   R×   RØ   R  (   RÖ   R×   RØ   (   R6   Rø   R`   R9   (   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_io.pyt   test_read_allå  s    u!   Threading required for this test.u   cpuc   
        s  zzd } t  t d   | } t j |  t t |   } |  j t j d   } | j	 |  Wd  QX|  j t j |  j
 d d ð } |  j | d    g   g       f d   } g  t d  D] } t j d	 |  ^ qÊ } t j |   t j d
  Wd  QX|  j  d   d j   } xB t d  D]4 } t t | g   }	 |  j | j |	  |  q;WWd  QXWd  t j t j  Xd  S(   Niè  i   u   wbR|   i    i   c            sq   yG x@ t  d d g  D], }    j |   } | s5 Pn   j |  q WWn# t k
 rl }  j |    n Xd  S(   Ni   i   (   R   R9   R   t	   Exception(   R.   RN   R0  (   Rý   t   errorst   results(    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_io.pyR   ü  s    i   t   targetg{®Gáz?u(   the following exceptions were caught: %rR7   (   R   R®   t   randomt   shuffleR   R   R   RY   R[   R    t	   read_modeRø   t	   threadingt   Threadt   start_threadst   timet   sleepRÍ   RM   R`   R   RZ   (
   R   t   Nt   lRN   R   R·   Rf   t   threadsR¬   RÚ   (    (   Rý   R8  R9  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_io.pyt   test_threadsë  s,    !+	'c         C  sK   |  j  d  } |  j |  } |  j t | j d  |  j t | j  d  S(   NRÖ   R×   RØ   i    (   RÖ   R×   RØ   (   R<   Rø   Ra   RA   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_io.pyt   test_misbehaved_io  s    c         C  s  d } xd | d | | d | d f D]á } |  j  d | g  } |  j | |  } |  j | j |  d |  |  j | j d d j | | j   |  j  d | d d g  } |  j | |  } |  j | j |  d |  |  j | j d d j | | j   q( Wd  S(   Ni   i   i   Rf   i    u   failed for {}: {} != 0(   R6   Rø   R`   R9   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_io.pyt   test_no_extraneous_read  s    ((   R1   R2   R=  R  R  R!  R#  R&  R'  R.  R4  R5  R6  Rõ   t
   skipUnlessR>  RY   t   requires_resourceRF  RG  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_io.pyR  q  s   		
								(	t   CBufferedReaderTestc           B  s>   e  Z e j Z d    Z d   Z d   Z d   Z d   Z	 RS(   c         C  sc   t  j |   t j d k r_ |  j   } |  j |  } |  j t t t	 f | j
 | t j  n  d  S(   Niÿÿÿ(   R  R  R   RÄ   R6   Rø   Ra   RÇ   t   MemoryErrorRS   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_io.pyR  2  s    c         C  s²   |  j  d g  } |  j |  } |  j t | j | d d |  j t | j  |  j t | j | d d |  j t | j  |  j t | j | d d |  j t | j  d  S(   NRÖ   R  i    iðÿÿÿiÿÿÿÿ(   R6   Rø   Ra   RS   R   R9   (   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_io.pyt   test_initialization<  s    c         C  s8   |  j  d  } |  j |  } |  j t | j d  d  S(   NRÖ   R×   RØ   i
   (   RÖ   R×   RØ   (   R<   Rø   Ra   RA   R9   (   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_io.pyt   test_misbehaved_io_readF  s    c         C  sv   |  j  t j t j  |  j t j d  } |  j |  } | | _ t j |  } ~ t j	   |  j
 |   |  d  S(   Nu   w+b(   t
   addCleanupRY   RZ   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_io.pyRŸ   M  s    	
c      	   C  s9   |  j  t d  ! |  j t j   d d d  Wd  QXd  S(   Nu   BufferedReaderi   (   R  Rb   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_io.pyt   test_args_errorY  s    (
   R1   R2   R   t   BufferedReaderRø   R  RM  RN  RŸ   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_io.pyRK  /  s   		
	
		t   PyBufferedReaderTestc           B  s   e  Z e j Z RS(    (   R1   R2   RW   RQ  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_io.pyRR  _  s   t   BufferedWriterTestc           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 e j e d  e j d  d     Z d   Z d   Z d   Z RS(   u   wbc         C  s  |  j    } |  j |  } | j |  | j | d d | j | d d |  j d | j d   | j   |  j t | j | d d |  j t | j | d d |  j t | j | d d | j |  |  j d | j d	   | j   |  j d
 j | j	  d  d  S(   NR  i   i   i   RÖ   i    iðÿÿÿiÿÿÿÿt   ghiR7   t   abcghi(
   R6   Rø   R   R`   R    R   Ra   RS   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_io.pyR  f  s    

c         C  s|   |  j  j |  j   } ~ |  j  j |  j   } |  j t t f d | j d  | j |  j    |  j | j d  d  d  S(   Nu   uninitialized|has no attributeR7   i    (	   Rø   R  R  RS   R   R    R   R6   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_io.pyR  v  s    c         C  s\   |  j    } |  j |  } | j d  |  j | j  | j   |  j | j d g  d  S(   Ns   howdy!(   R6   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_io.pyt   test_detach_flush  s    
c         C  s   |  j    } |  j | d  } | j d  |  j | j  t d  } | j |  d | (| j   |  j d j | j  d  d  S(   Ni   RÖ   t   defs   ***R7   t   abcdef(	   R6   Rø   R    RÍ   R   R   R   R`   RM   (   R   t   writerRý   Rc   (    (    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_io.pyt
   test_write  s    
c         C  s   |  j    } |  j | d  } d } x8 t d t |  d  D] } | j | | | d ! q= Wd j | j  } |  j | j | d   |  d  S(   Ni   t   abcdefghijklmnopi    i   R7   iøÿÿÿ(	   R6   Rø   R®   R   R    RM   R   RÌ   R  (   R   RY  Rý   t   contentsR.   t   flushed(    (    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_io.pyt   test_write_overflow  s    c   	      C  sæ   t  t d   d } d } |  j   } |  j | d  } d   } |   } xm | t |  k  r» t t |  t |  |  } |  j | j | | | | ! |  | |  | | 7} qO W| j	   |  j | d j
 | j   d  S(   Ni   iè  i    i   c          s  s7   x0 t  d  D]" }  x t d  D] } |  Vq  Wq Wd  S(   Ni   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_io.pyt	   gen_sizesŠ  s    R7   (   R   R®   R6   Rø   R   t   minR   R`   R    R   RM   R   (	   R   t   intermediate_funcR\  R.   RY  Rý   R_  t   sizesRé   (    (    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_io.pyt   check_writes  s    		$

	c         C  s   |  j  d    d  S(   Nc         S  s   d  S(   N(   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_io.pyRË   µ  R7   (   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_io.pyt   test_writesŽ  s    c         C  s   |  j  d    d  S(   Nc         S  s
   |  j    S(   N(   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_io.pyRË   ž  R7   (   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_io.pyt   test_writes_and_flushes·  s    c         C  s0   d   } |  j  |  d   } |  j  |  d  S(   Nc         S  sH   |  j    } |  j | d d  |  j | d d  |  j | d  d  S(   Ni   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_io.pyt   _seekabs»  s    c         S  sG   |  j  d d  } |  j  d 
d  |  j  d d  |  j  | d  d  S(   Ni    i   iÿÿÿÿ(   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_io.pyt   _seekrelÁ  s    (   Rc  (   R   Rf  Rg  (    (    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_io.pyt   test_writes_and_seeksº  s    		c         C  s   |  j  d    d  S(   Nc         S  s   |  j  |  j    S(   N(   R0   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_io.pyRË   É  R7   (   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_io.pyt   test_writes_and_truncatesÈ  s    c         C  s+  |  j    } |  j | d  } |  j | j d  d  |  j | j d  d  | j d  |  j | j d  d  | j d  y | j d	  Wn |  j k
 rµ } | j } n X|  j d
  |  j | d  |  j | j   d  |  j | j d  d  | j   } |  j	 | j
 d  |  d  S(   Ni   R/  i   t   efghii   t   kt   jklmnt   0t   opqrwxyz0123456789u'   BlockingIOError should have been raisedi   t   abcdefghijklmnopqrwxyzt	   ABCDEFGHIi	   t	   01234567A(   RK   Rø   R`   R    RQ   RU   t   characters_writtenR   RO   RÌ   R  (   R   R·   Rý   R0  t   writtenRN   (    (    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_io.pyt   test_write_non_blockingË  s$    c         C  sÙ   t  j   } |  j | d  } |  j | j d  d  |  j | j   d  | j d d  |  j | j d  d  | j d d  |  j | j   d  |  j | j d  d  | j   |  j | j   d	  d  S(
   Ni   RX  i   i    t   XYi   t   XYcdeft   123456t   XYcdef123456(	   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_io.pyt   test_write_and_rewindæ  s    
c         C  sP   |  j    } |  j | d  } | j d  | j   |  j d | j d  d  S(   Ni   RÖ   i    (   R6   Rø   R    R   R`   R   (   R   RY  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_io.pyt
   test_flushó  s
    
c         C  sd   d d d g } |  j    } |  j | d  } | j |  | j   |  j d j | j  d  d  S(   NRÙ   R$  RÛ   i   R7   RX  (   R6   Rø   Rp   R   R`   RM   R   (   R   RD  RY  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_io.pyt   test_writelinesú  s    
c         C  sj   t  d d d g  } |  j   } |  j | d  } | j |  | j   |  j d j | j  d  d  S(   NRÙ   R$  RÛ   i   R7   RX  (   R   R6   Rø   Rp   R   R`   RM   R   (   R   RD  RY  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_io.pyt   test_writelines_userlist  s    
c         C  sW   |  j    } |  j | d  } |  j t | j d d d g  |  j t | j d   d  S(   Ni   i   i   i   (   R6   Rø   Ra   Rb   Rp   R*   (   R   RY  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_io.pyt   test_writelines_error
  s    c         C  sS   |  j    } |  j | d  } | j d  ~ t j   |  j d | j d  d  S(   Ni   RÖ   i    (   R6   Rø   R    RY   R   R`   R   (   R   RY  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_io.pyR     s    
c         C  sÉ   |  j  t j t j  |  j t j |  j d d U } |  j | d  } | j d  |  j | j	 d  d  |  j | j
   d  Wd  QX|  j t j d d d  } |  j | j   d  Wd  QXd  S(	   NR|   i    i   RX  i   i   u   rbRÖ   (   RO  RY   RZ   R[   R   t
   write_modeRø   R    R`   R0   R(   R9   (   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_io.pyt   test_truncate  s    !u!   Threading required for this test.u   cpuc      
     sÆ  z®d } t  t d   | } t d d g  } d } t    xD | t |  k  r t |  }  j | | | | ! | | 7} qC W~ |  j t j	 |  j
 d d   } |  j | d    g       f d   } g  t d	  D] } t j d
 |  ^ qå }	 t j |	   t j d  Wd  QX|  j  d     j   Wd  QX|  j t j	 d   } | j   }
 Wd  QXx6 t d  D]( } |  j |
 j t  | g   |  qWWd  t j t j	  Xd  S(   Niè  i   i   i   i    R|   i   c            sm   yC x< t  rA y  j   }  Wn t k
 r0 d  SX  j |   q WWn# t k
 rh }  j |    n Xd  S(   N(   R!   t   popleftR)   R    R7  R   (   RN   R0  (   Rý   R8  t   queue(    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_io.pyR   ;  s    	i   R:  g{®Gáz?u(   the following exceptions were caught: %ru   rb(   R   R®   R   R   R   R   R   R   RY   R[   R~  Rø   R>  R?  R@  RA  RB  RÍ   RB   R9   R`   R   RZ   (   R   RC  R\  Rb  R.   Ré   R·   R   Rf   RE  RN   R¬   (    (   Rý   R8  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_io.pyRF  #  s4    	!+	*c         C  sa   |  j    } |  j | d  } |  j t | j d  |  j t | j  |  j t | j d  d  S(   Ni   i    RX  (   R<   Rø   Ra   RA   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_io.pyRG  S  s
    c         C  s9   t  j d t f   |  j |  j   d d  Wd  QXd  S(   Nu   max_buffer_size is deprecatedi   i   (   RY   t   check_warningsRx   Rø   R6   (   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_io.pyt    test_max_buffer_size_deprecationZ  s    	c         C  sa   |  j    } d   } | | _ |  j |  } | j d  |  j t | j  |  j | j  d  S(   Nc         S  s   t     d  S(   N(   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_io.pyt	   bad_writea  s    t   spam(   R6   R    Rø   Ra   RA   RB   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_io.pyt   test_write_error_on_close_  s    		(   R1   R2   R~  R  R  RV  RZ  R^  Rc  Rd  Re  Rh  Ri  Rt  Ry  Rz  R{  R|  R}  R   R  Rõ   RI  R>  RY   RJ  RF  RG  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_io.pyRS  c  s0   		
																/		t   CBufferedWriterTestc           B  s5   e  Z e j Z d    Z d   Z d   Z d   Z RS(   c         C  sc   t  j |   t j d k r_ |  j   } |  j |  } |  j t t t	 f | j
 | t j  n  d  S(   Niÿÿÿ(   RS  R  R   RÄ   R6   Rø   Ra   RÇ   RL  RS   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_io.pyR  m  s    c         C  sµ   |  j    } |  j |  } |  j t | j | d d |  j t | j d  |  j t | j | d d |  j t | j d  |  j t | j | d d |  j t | j d  d  S(   NR  i    RW  iðÿÿÿiÿÿÿÿ(   R6   Rø   Ra   RS   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_io.pyRM  w  s    c         C  s·   |  j  t j t j  |  j t j d  } |  j |  } | j d  | | _ t j	 |  } ~ t j
   |  j |   |  |  j t j d   } |  j | j   d  Wd  QXd  S(   Nu   w+bt   123xxxu   rb(   RO  RY   RZ   R[   R   Rø   R    Rf   Rº   R»   R   RŒ   R   R`   R9   (   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_io.pyRŸ     s    	
c      	   C  s9   |  j  t d  ! |  j t j   d d d  Wd  QXd  S(   Nu   BufferedWriteri   (   R  Rb   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_io.pyRP    s    (	   R1   R2   R   t   BufferedWriterRø   R  RM  RŸ   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_io.pyR  j  s
   		
	
	t   PyBufferedWriterTestc           B  s   e  Z e j Z RS(    (   R1   R2   RW   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_io.pyR    s   t   BufferedRWPairTestc           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 d   Z RS(   c         C  s2   |  j  |  j   |  j    } |  j | j  d  S(   N(   Rø   R6   RÍ   R@   (   R   t   pair(    (    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_io.pyR    s    c         C  sœ   |  j  j |  j   } ~ |  j  j |  j   } |  j t t f d | j d  |  j t t f d | j d  | j |  j   |  j    |  j	 | j d  d  |  j	 | j d  d  d  S(   Nu   uninitialized|has no attributei    R7   (
   Rø   R  R  RS   R   R9   R    R   R6   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_io.pyR     s    c         C  s8   |  j  |  j   |  j    } |  j |  j | j  d  S(   N(   Rø   R6   Ra   t   UnsupportedOperationRú   (   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_io.pyRü   ®  s    c      	   C  sB   t  j d t f  ' |  j |  j   |  j   d d  Wd  QXd  S(   Nu   max_buffer_size is deprecatedi   i   (   RY   R  Rx   Rø   R6   (   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_io.pyt,   test_constructor_max_buffer_size_deprecation²  s    	c         C  s<   d t  f d     Y} |  j t |  j |   |  j     d  S(   Nt   NotReadablec           B  s   e  Z d    Z RS(   c         S  s   t  S(   N(   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_io.pyR$   ¹  s    (   R1   R2   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_io.pyR  ž  s   (   R6   Ra   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_io.pyt"   test_constructor_with_not_readable·  s    c         C  s<   d t  f d     Y} |  j t |  j |  j    |    d  S(   Nt   NotWriteablec           B  s   e  Z d    Z RS(   c         S  s   t  S(   N(   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_io.pyR"   À  s    (   R1   R2   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_io.pyR  ¿  s   (   R6   Ra   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_io.pyt#   test_constructor_with_not_writeableŸ  s    c         C  s§   |  j  |  j d  |  j    } |  j | j d  d  |  j | j d  d  |  j | j   d  |  j  |  j d  |  j    } |  j | j d   d  d  S(   NRX  i   RÖ   i   R×   RÛ   (   Rø   R   R6   R`   R9   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_io.pyR!  Å  s    !!c           sy     f d   }   j  |   j   d d d g    j  |   j   d d d g    j  |   j d  d d g  d  S(   Nc             s     j    j d    j    S(   Ns	   abc
def
h(   Rø   R   R6   (    (   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_io.pyRË   Ï  R7   s   abc
s   def
R_   i   (   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_io.pyR'  Î  s    ""c         C  s>   |  j  |  j d  |  j    } |  j | j d  d  d  S(   NRX  i   RÖ   (   Rø   R   R6   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_io.pyR#  Ô  s    !c         C  s`   |  j  |  j d  |  j    } t d  } |  j | j |  d  |  j | j   d  d  S(   NRX  i   t   abcde(   Rø   R   R6   R   R`   R/   Rh   (   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_io.pyR&  Û  s    !c         C  s   |  j    } |  j |  j    |  } | j d  | j   t d  } | j |  d | (| j   |  j | j d d g  d  S(   NRÖ   RW  s   ***(   R6   Rø   R    R   R   R`   R   (   R   t   wR  Rc   (    (    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_io.pyRZ  â  s    

c         C  s]   |  j  |  j d  |  j    } |  j | j d  j d   |  j | j d  d  d  S(   NRX  i   RÖ   (   Rø   R   R6   RÌ   R2  R  R`   R9   (   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_io.pyt	   test_peekî  s    !c         C  s5   |  j  |  j   |  j    } |  j | j    d  S(   N(   Rø   R6   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_io.pyt   test_readableô  s    c         C  s5   |  j  |  j   |  j    } |  j | j    d  S(   N(   Rø   R6   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_io.pyt   test_writeableø  s    c         C  s5   |  j  |  j   |  j    } |  j | j    d  S(   N(   Rø   R6   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_io.pyt   test_seekableü  s    c         C  sL   |  j  |  j   |  j    } |  j | j  | j   |  j | j  d  S(   N(   Rø   R6   RÍ   R@   RB   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_io.pyt   test_close_and_closed  s    
c         C  s«   d   } |  j    } | | _ |  j    } |  j | |  } |  j t   } | j   Wd  QX|  j d t | j   |  j | j	  |  j
 | j	  |  j | j	  d  S(   Nc           S  s   t  d  S(   N(   t   reader_non_existing(    (    (    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_io.pyt   reader_close  s    u   reader_non_existing(   R6   RB   Rø   Ra   t	   NameErrort   assertInt   strR  RÌ   R@   RÍ   (   R   R  t   readerRY  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_io.pyt    test_reader_close_error_on_close  s    		c         C  s«   d   } |  j    } |  j    } | | _ |  j | |  } |  j t   } | j   Wd  QX|  j d t | j   |  j | j	  |  j
 | j	  |  j | j	  d  S(   Nc           S  s   t  d  S(   N(   t   writer_non_existing(    (    (    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_io.pyt   writer_close  s    u   writer_non_existing(   R6   RB   Rø   Ra   R  R  R  R  RÍ   R@   RÌ   (   R   R¢  R  RY  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_io.pyt    test_writer_close_error_on_close  s    		c         C  sœ   d   } d   } |  j    } | | _ |  j    } | | _ |  j | |  } |  j t   } | j   Wd  QX|  j d t | j   |  j | j	  |  j | j	  |  j | j	  d  S(   Nc           S  s   t  d  S(   N(   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_io.pyR  (  s    c           S  s   t  d  S(   N(   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_io.pyR¢  *  s    u   reader_non_existing(
   R6   RB   Rø   Ra   R  R  R  R  RÍ   R@   (   R   R  R¢  R  RY  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_io.pyt'   test_reader_writer_close_error_on_close'  s    				c         C  sÞ   d t  f d     Y} |  j | t  | t   } |  j | j    |  j | t  | t   } |  j | j    |  j | t  | t   } |  j | j    |  j | t  | t   } |  j | j    d  S(   Nt   SelectableIsAttyc           B  s   e  Z d    Z d   Z RS(   c         S  s   t  j |   | |  _ d  S(   N(   R6   R   t   _isatty(   R   t   isatty(    (    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_io.pyR   :  s    c         S  s   |  j  S(   N(   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_io.pyR§  >  s    (   R1   R2   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_io.pyR¥  9  s   	(   R6   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_io.pyt   test_isatty8  s    c         C  s=   |  j  |  j   |  j    } t j |  } d  } d  } d  S(   N(   Rø   R6   Rº   R»   R*   (   R   t   brwR»   (    (    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_io.pyt   test_weakref_clearingM  s    (   R1   R2   R  R  Rü   R  R  R  R!  R'  R#  R&  RZ  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_io.pyR    s*   																						t   CBufferedRWPairTestc           B  s   e  Z e j Z RS(    (   R1   R2   R   t   BufferedRWPairRø   (    (    (    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_io.pyR«  S  s   t   PyBufferedRWPairTestc           B  s   e  Z e j Z RS(    (   R1   R2   RW   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_io.pyR­  V  s   t   BufferedRandomTestc           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 d   Z d   Z RS(   u   rb+u   wb+c         C  s   t  j |   t j |   d  S(   N(   R  R  RS  (   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_io.pyR  ^  s    c         C  s   t  j |   t j |   d  S(   N(   R  R  RS  (   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_io.pyR  b  s    c         C  s   |  j  d
  } |  j | d  } |  j d | j d   | j d  | j d  |  j | j  |  j d | j    |  j d | j d	  d  S(   Nt   asdft   ghjki   t   asi   t   dddt   eeet   dddeeei    (   R¯  R°  (   R6   Rø   R`   R9   R    RÍ   R   (   R   R·   t   rw(    (    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_io.pyt   test_read_and_writef  s    c         C  s^  |  j  d  } |  j |  } |  j d | j d   |  j d | j    | j d d  |  j d | j d   | j d  | j d d  |  j d | j    |  j d	 | j    | j d
 d  |  j d | j    | j d d  |  j d | j    |  j d | j d   | j   |  j d | j    |  j	 t
 | j d  d  S(   Nt	   asdfghjklR±  i   i    R¯  i   t   123ft	   asdf123fli	   iüÿÿÿi   i   i   t   fli   g        (   R   Rø   R`   R9   R(   R'   R    R   R   Ra   Rb   (   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_io.pyt   test_seek_and_tellq  s$    
c         C  sý   |  j  d  } |  j |  } |  j d | | d   | j d  |  j d | | d   |  j d | j    | j   |  j d | j    |  j d | |   | j d d  | j d	  | j   | j d d  |  j d	 | | d
   d  S(   NR(  RÙ   i   t   12RÛ   i   RT  i    t   XYZi   (   R   Rø   R`   R    R(   R   R'   (   R   t	   read_funcR·   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_io.pyt   check_flush_and_read  s    

c         C  s   |  j  d    d  S(   Nc         W  s   |  j  |   S(   N(   R9   (   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_io.pyRË     R7   (   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_io.pyt   test_flush_and_read  s    c         C  s   d d  } |  j  |  d  S(   Niÿÿÿÿc         S  s;   t  | d k r | n d  } |  j |  } t | |   S(   Ni    i'  (   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_io.pyt	   _readinto  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_io.pyt   test_flush_and_readinto  s    c         C  s   d d  } |  j  |  d  S(   Niÿÿÿÿc         S  sB   |  j  |  } | d k r( | |  } n  |  j t |  d  | S(   Niÿÿÿÿi   (   R2  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_io.pyt   _peek¥  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_io.pyt   test_flush_and_peek€  s    c         C  s   |  j  d  } |  j |  } | j d  | j   | j d  | j   | j d d  |  j d | j    |  j d | j    d  S(   NR(  t   123t   45i    t	   12345fghi(   R   Rø   R    R   R'   R`   R   R9   (   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_io.pyt   test_flush_and_write¯  s    

c         C  s   t  j |   t j |   d  S(   N(   R  RF  RS  (   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_io.pyRF  »  s    c         C  s0   d   } |  j  |  d   } |  j  |  d  S(   Nc         S  s   |  j  d  d  S(   Ni   (   R2  (   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_io.pyRÃ  À  s    c         S  s=   |  j    } |  j d d  |  j d  |  j | d  d  S(   Niÿÿÿÿi   i    (   R(   R'   R2  (   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_io.pyRÃ  Ã  s    (   Rc  (   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_io.pyt   test_writes_and_peek¿  s    		c         C  s   d   } |  j  |  d  S(   Nc         S  s!   |  j  d d  |  j d  d  S(   Niÿÿÿÿi   (   R'   R9   (   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_io.pyt   _readË  s    (   Rc  (   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_io.pyt   test_writes_and_readsÊ  s    	c         C  s   d   } |  j  |  d  S(   Nc         S  s!   |  j  d d  |  j d  d  S(   Niÿÿÿÿi   (   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_io.pyt   _read1Ñ  s    (   Rc  (   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_io.pyt   test_writes_and_read1sÐ  s    	c         C  s   d   } |  j  |  d  S(   Nc         S  s'   |  j  d d  |  j t d   d  S(   Niÿÿÿÿ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_io.pyRÊ  ×  s    (   Rc  (   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_io.pyt   test_writes_and_readintosÖ  s    	c         C  sê   xã d d g D]Õ } |  j  d  } |  j | d  } |  j | j d  d  |  j | j   d  | j d |  |  j | j   | d  | j   |  j | j   | d  | j   } |  j | d d | d d |  q Wd  S(	   Ni   i   t   Ai
   i   t   Bi	   t
   AAAAAAAAAA(   R   Rø   R`   R9   R(   R    R   R   (   R   t   overwrite_sizeR·   Rý   RN   (    (    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_io.pyt   test_write_after_readaheadÜ  s    
	c         C  sÑ   d   } d } x» t  d t |   D]€ } x t  | t |   D] } |  j |  } |  j | d  } | | | |  | j   t |  } d | | <d | | <|  j | j   | d | | f  qA Wq% Wd  S(   Nc         S  sI   |  j  |  |  j | |  |  j d  |  j  |  |  j d  d  S(   Ns   s   (   R'   R9   R    (   Rý   t   pos1t   pos2(    (    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_io.pyt   mutateò  s
    s   i    id   i   i   u   failed result for i=%d, j=%d(   R®   R   R   Rø   R   R   R`   R   (   R   RÖ  R   R¬   t   jR·   Rý   t   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_io.pyt   test_write_rewind_writeð  s    	


c         C  s   |  j  d  } |  j | d  } |  j | j d  d  |  j | j   d  |  j | j d  d  |  j | j   d  d  S(	   NRÏ  i
   id   i   t   AAt   BBi   RÑ  (   R   Rø   R`   R9   R0   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_io.pyt!   test_truncate_after_read_or_write
  s    c         C  s   t  j |   t j |   d  S(   N(   R  RG  RS  (   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_io.pyRG    s    c         C  s  |  j  d  ê } |  j | d  Ï } | j d  |  j | j d  d  | j d  |  j | j d  d  | j d  t d  } | j |  |  j | d	  | j d
  |  j | j d  d  | j	   |  j | j
   d  Wd  QXWd  QX|  j  d   } |  j | d  f } |  j | j d  d  | j d  |  j | j d  d  | j	   |  j | j
   d  Wd  QXWd  QXd  S(   Nt   abcdefghid   t   1i   R   t   2R×   t   3R   t   4R_   t   1b2d3f4hRÖ   R°   RÚ   t   a2c(   R   Rø   R    R`   R9   R"  R   R/   R2  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_io.pyt   test_interleaved_read_write  s*    
"
c         C  sœ   |  j  d  š } |  j |   } | j d  |  j | j   d  | j d  |  j | j   d  | j d  |  j | j   d  | j   |  j | j   d  Wd  QXWd  QXd  S(	   Ns
   ab
cdef
g
RÞ  s   b
Rß  s   def
Rà  s   
s
   1b
2def
3
(   R   Rø   R    R`   Ro   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_io.pyt   test_interleaved_readline_write/  s    
(   R1   R2   R=  R~  R  R  R¶  R»  R¿  RÀ  RÂ  RÄ  RÈ  RF  RÉ  RË  RÍ  RÎ  RÓ  RÙ  RÜ  RG  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_io.pyR®  Z  s,   																			t   CBufferedRandomTestc           B  s,   e  Z e j Z d    Z d   Z d   Z RS(   c         C  sc   t  j |   t j d k r_ |  j   } |  j |  } |  j t t t	 f | j
 | t j  n  d  S(   Niÿÿÿ(   R®  R  R   RÄ   R6   Rø   Ra   RÇ   RL  RS   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_io.pyR  @  s    c         C  s   t  j |   t j |   d  S(   N(   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_io.pyRŸ   J  s    c      	   C  s9   |  j  t d  ! |  j t j   d d d  Wd  QXd  S(   Nu   BufferedRandomi   (   R  Rb   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_io.pyRP  N  s    (   R1   R2   R   t   BufferedRandomRø   R  RŸ   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_io.pyRæ  <  s   		
	t   PyBufferedRandomTestc           B  s   e  Z e j Z RS(    (   R1   R2   RW   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_io.pyRè  T  s   t   StatefulIncrementalDecoderc           B  sh   e  Z d  Z d d  Z d   Z d   Z d   Z d   Z e d  Z	 d   Z
 e Z e d	    Z RS(
   u  
    For testing seek/tell behavior with a stateful, buffering decoder.

    Input is a sequence of words.  Words may be fixed-length (length set
    by input) or variable-length (period-terminated).  In variable-length
    mode, extra periods are ignored.  Possible words are:
      - 'i' followed by a number sets the input length, I (maximum 99).
        When I is set to 0, words are space-terminated.
      - 'o' followed by a number sets the output length, O (maximum 99).
      - Any other word is converted into a word followed by a period on
        the output.  The output word consists of the input word truncated
        or padded out with hyphens to make its length equal to O.  If O
        is 0, the word is output verbatim without truncating or padding.
    I and O are initially set to 1.  When I changes, any buffered input is
    re-scanned according to the new I.  EOF also terminates the last word.
    u   strictc         C  s!   t  j j |  |  |  j   d  S(   N(   t   codecst   IncrementalDecoderR   t   reset(   R   R8  (    (    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_io.pyR   u  s    c         C  s   d t  |   S(   Nu   <SID %x>(   t   id(   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_io.pyt   __repr__y  s    c         C  s"   d |  _  d |  _ t   |  _ d  S(   Ni   (   R¬   t   oR   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_io.pyRì  |  s    		c         C  s6   |  j  d A|  j d A} } t |  j  | d | f S(   Ni   id   (   R¬   Rï  R   Rc   (   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_io.pyt   getstate  s    c         C  sO   | \ } } t  |  |  _ t | d  \ } } | d A| d A|  _ |  _ d  S(   Nid   i   (   R   Rc   t   divmodR¬   Rï  (   R   t   stateRc   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_io.pyt   setstate  s    c         C  sÅ   d } x | D] } |  j  d k r` | d k rM |  j r] | |  j   7} q] q |  j j |  q |  j j |  t |  j  |  j  k r | |  j   7} q q W| rÁ |  j rÁ | |  j   7} n  | S(   Nu    i    u   .(   R¬   Rc   t   process_wordR   R   (   R   t   inputt   finalt   outputR   (    (    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_io.pyt   decode  s    	c         C  sö   d } |  j  d t d  k rG t d t |  j  d p8 d   |  _ n |  j  d t d  k r t d t |  j  d py d   |  _ n^ |  j  j d  } t |  |  j k  rÃ | d |  j 7} n  |  j rÜ | |  j  } n  | d	 7} t   |  _  | S(
   Nu    i    u   iic   i   u   ou   asciiu   -u   .(	   Rc   t   ordR`  t   intR¬   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_io.pyRô    s    ((	
c         C  s_   |  j  r[ | d k r[ t j d  } t j d d d | j d d  d d  d d  d d  d	 |   Sd  S(
   Nu   test_decoderu   latin-1Rì   Rt   Rø  t   incrementalencodert   streamreadert   streamwritert   incrementaldecoder(   t   codecEnabledRê  t   lookupt	   CodecInfoRt   R*   (   t   clsRì   t   latin1(    (    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_io.pyt   lookupTestDecoder®  s    	(   R1   R2   R3   R   Rî  Rì  Rð  Ró  R}   Rø  Rô  Rÿ  t   classmethodR  (    (    (    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_io.pyRé  c  s   					t   StatefulIncrementalDecoderTestc        
   B  s   e  Z d  Z d e d f d e d f d e d f d e d f d e d	 f d
 e d f d e d d d d d d d d d d f g Z d   Z RS(   uB   
    Make sure the StatefulIncrementalDecoder actually works.
    R/  u   a.b.c.d.t   oiabcdu   abcd.s   oi...abcd...s   i.o6.x.xyz.toolongtofit.u   x-----.xyz---.toolon.s
   i.i2.o6xyzu   xy----.z-----.s   i.o3.i6.abcdefghijklmnopu   abc.ghi.mno.s;   i.o29.a.b.cde.o15.abcdefghijabcdefghij.i3.a.b.c.d.ei00k.l.mu   a----------------------------.u   b----------------------------.u   cde--------------------------.u   abcdefghijabcde.u   a.b------------.u   .c.------------.u   d.e------------.u   k--------------.u   l--------------.u   m--------------.c         C  s   x? |  j  D]4 \ } } } t   } |  j | j | |  |  q
 Wt   } |  j | j d  d  |  j | j d d  d  d  S(   NR  u    R7   i   u   abcd.(   t
   test_casesRé  R`   Rø  (   R   Rõ  t   eofR÷  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_io.pyt   test_decoderÝ  s    	 	(   R1   R2   R3   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_io.pyR  œ  s   	#t   TextIOWrapperTestc           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 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) e* j+ e, d(  d)    Z- d*   Z. d+   Z/ d,   Z0 d-   Z1 d.   Z2 d/   Z3 d0   Z4 RS(1   c         C  s/   d |  _  d j d  |  _ t j t j  d  S(   Ns   AAA
BBBCCC
DDD
EEE
s   AAA
BBB
CCC
DDD
EEE
u   ascii(   t   testdataRø  t
   normalizedRY   RZ   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_io.pyR\   ê  s    	c         C  s   t  j t  j  d  S(   N(   RY   RZ   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_io.pyR]   ï  s    c         C  s   |  j  d  } |  j | d  } |  j |  } | j | d d d d |  j | j d  |  j | j t  | j | d d d t |  j | j d  |  j | j t  |  j d	 | j	    |  j
 t | j | d d
 |  j
 t | j | d d d  S(   Ns   Ã©

iè  R   u   latin1Rå   u   
u   utf8t   line_bufferingu   Ã©
i*   u   xyzzy(   R   RQ  t   TextIOWrapperR   R`   R   R  R}   R!   Ro   Ra   Rb   RS   (   R   t   rR   t   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_io.pyR  ò  s    c         C  s   |  j  j |  j   } ~ |  j  j |  j   } |  j t t |  |  j t t f d | j d  | j	 |  j
    |  j | j d  d  d  S(   Nu   uninitialized|has no attributei    u    (   R  R  Ra   R7  Rû   R  RS   R   R9   R   R6   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_io.pyR     s    c         C  sE   |  j    } |  j |  } t j    |  j | d d Wd  QXd  S(   NR   u	   hex_codec(   R   R  RY   t   check_py3k_warningsR  (   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_io.pyt*   test_non_text_encoding_codecs_are_rejected  s    c         C  sì   |  j    } |  j |  } |  j |  } |  j | j   |  |  j | d d } | j d  |  j | j    | j   |  j | j   d  |  j	 t
 | j  t |  |  j | j d  |  j | j d  |  j | j  d  S(   NR   u   asciiu   howdyt   howdyu   strict(   R   R  R  Rù   Rú   R    RÍ   R   R`   Ra   RS   Rû   R   R8  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_io.pyRü     s    

c         C  sÃ   |  j  d j d   } |  j |  } |  j | d d } |  j j } |  j t |  d |  d | _ |  j t |  d |  d | _ |  j t |  d |  | j j	   t |  d  S(	   Nu   hellou   utf-8R   u#   <%s.TextIOWrapper encoding='utf-8'>u   dummyu1   <%s.TextIOWrapper name=u'dummy' encoding='utf-8'>R  u0   <%s.TextIOWrapper name='dummy' encoding='utf-8'>(
   R   Rt   RQ  R  R2   R`   Rû   Rì   Rc   Rú   (   R   R·   R   R  t   modname(    (    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_io.pyR  '  s    		c         C  sŠ   |  j    } |  j | d  } |  j | d d d t } | j d  |  j | j   d  | j d  |  j | j   d  | j d	  |  j | j   d
  d  S(   Niè  Rå   u   
R  u   XR7   u   Y
Zs   XY
Zu   ABs   XY
ZAB(   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_io.pyt   test_line_buffering8  s    c         C  sg   |  j    } |  j | d d } |  j | j d  |  j |  } |  j | j  t j | j  d  S(   NR   u   utf8(   R   R  R`   R   t   assertIsNotNoneRê  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_io.pyt   test_encodingC  s    c         C  sø   |  j  d  } |  j | d d } |  j t | j  |  j  d  } |  j | d d d d } |  j t | j  |  j  d  } |  j | d d d d } |  j | j   d  |  j  d  } |  j | d d d d } |  j | j   d	  d  S(
   Ns   abc
ÿ
R   u   asciiR8  u   strictu   ignoreu   abc

u   replaceu   abc
ï¿œ
(   R   R  Ra   t   UnicodeErrorR9   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_io.pyt   test_encoding_errors_readingL  s    c         C  s,  |  j    } |  j | d d } |  j t | j d  |  j    } |  j | d d d d } |  j t | j d  |  j    } |  j | d d d d d d } | j d	  | j   |  j | j   d
  |  j    } |  j | d d d d d d } | j d	  | j   |  j | j   d  d  S(   NR   u   asciiu   Ã¿R8  u   strictu   ignoreRå   u   
u	   abcÃ¿def
s   abcdef
u   replaces   abc?def
(   R   R  Ra   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_io.pyt   test_encoding_errors_writing^  s$    	
	
c      
   C  sé  d d d d d g } d  d d d d d g g d | g d	 d d d
 d g g d d d g g d d d d g g g } d } xj| D]b} t d j |  j |   } x;t t f D]-} x$t d d  D]} x
| D]\ } }	 |  j |  j |  |  }
 |  j	 |
 d | d | } | r}g  } xe t ry| j
 d  } | d k rIPn  |  j t |  d  | j | | j    q$Wn t |  } x- t | |	  D] \ } } |  j | |  qW|  j t |  t |	   qÓ WqÆ Wq° Wq Wd  S(    Nu   unix
u	   windows
u   os9u   last
u   nonlu   windows
u   os9
u    u   
u	   os9last
u   
u   unix
windows
u   os9last
nonlu   u   unix
windowsu   
os9u	   last
nonlu   utf-8u   latin-1u   utf-16u	   utf-16-leu	   utf-16-beu   utf-32u	   utf-32-leu	   utf-32-bei   i
   Rå   R   i   (   u   utf-8u   latin-1u   utf-16u	   utf-16-leu	   utf-16-beu   utf-32u	   utf-32-leu	   utf-32-be(   R*   R   RM   Rt   R}   R!   R®   RQ  R   R  R9   R`   R   R   Ro   R   t   zip(   R   t   input_linesR*  t	   encodingsR   R-   t   do_readsR   Rå   t	   exp_linesRý   t   textiot	   got_linest   c2t   got_linet   exp_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_io.pyt   test_newlinesv  s:    	  		c      
   C  s#  d } | j  d d  j  d d  } xø d  | j d  j t  f d | j d  j t  f d d d	 d
 d d g f d d d d g f d d d d d d g f g D]x \ } } |  j |  } |  j | d d d | } |  j | j   |  | j	 d  |  j | j
   d j |   q£ Wd  S(   Ns   AAA
BB B
CCCDDDEEE
FFF
GGGs   
s   
s   u   asciiu    u   
u   AAA
u   BB B
u   CCCDDDEEE
u   FFF
u   GGGu   
u   AAA
BB B
CCCDDDEEE
u   u   AAA
BB B
CCCu   DDDu   EEEu   
FFFu   
GGGR   Rå   i    (   t   replaceR*   Rø  R  R!   R   R  R`   R   R'   R9   RM   (   R   R  R  Rå   RØ  R+   t   txt(    (    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_io.pyt   test_newlines_input   s    (c         C  sä   i d d 6d d 6d d 6d d 6} d  | t j f g t | j    } x | D] \ } } |  j   } |  j | d d	 d
 | } | j d  | j d  | j d  | j   |  j	 | j
 t  |  j	 | j   |  qO Wd  S(   Ns   AAA
BBB
CCC
XY
Zu    u   
s   AAABBBCCCXYZu   s   AAA
BBB
CCC
XY
Zu   
R   u   asciiRå   u   AAA
Bu   BB
CCC
u   XY
Z(   R*   R¿   t   linesept   sortedt   itemsR   R  R    R   R`   R@   R}   R   (   R   t   testdictR*  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_io.pyt   test_newlines_output°  s    
&
c           s}   g   |  j    d   f    f d     Y} |   } |  j | d d } | j d  ~ t j   |  j d g   d  S(   Nt	   MyBytesIOc             s   e  Z    f d    Z RS(   c           s$    j  |  j      j |   d  S(   N(   R   R   RB   (   R   (   R¢   RD  (    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_io.pyRB   Æ  s    (   R1   R2   RB   (    (   R¢   RD  (    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_io.pyR/  Å  s   R   u   asciiu   abcRÖ   (   R   R  R    RY   R   R`   (   R   R/  R   R  (    (   R¢   RD  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_io.pyR   Â  s    		
c           sp   g   d |  j  f    f d     Y  |  j   }   | d d } ~ t j   |  j  d d d g  d  S(   Nt   MyTextIOc             s>   e  Z    f d    Z    f d   Z    f d   Z RS(   c           sB    j  d  y t   |   j } Wn t k
 r6 n X|   d  S(   Ni   (   R   RG   R   R   (   R   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_io.pyR   Ó  s    c           s$    j  d  t   |   j   d  S(   Ni   (   R   RG   RB   (   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_io.pyRB   Û  s    c           s$    j  d  t   |   j   d  S(   Ni   (   R   RG   R   (   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_io.pyR   Þ  s    (   R1   R2   R   RB   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_io.pyR0  Ò  s   R   u   asciii   i   i   (   R  R   RY   R   R`   (   R   R   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_io.pyR  Ð  s    "
c           s³    j         f d   } t j d   }  j t |  Wd  QX| j   j   } | r¯  j t | j	    d   j
 | j d  |   j
 | j d  |  n  d  S(   Nc             s    j     j d  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_io.pyR   ë  s    u   stderri   u   Exception IOError: u    ignored(   R?   RY   R  Ra   R   R   R  R`   R   R  RÌ   R  R	  (   R   R   RN   (    (   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_io.pyR
  ç  s    c         C  s(  x!d D]} xd D]} |  j  t j d d | } | | _ |  j | j d  d  | j   |  j  t j d d | } | | _ |  j | j   d  |  j | j   d  | j   } |  j | j	 d  d  |  j | j d   d  | j	 d  |  j | j d  d  |  j | j d  d  |  j | j d  d  |  j | j   d  |  j | j   |  |  j | j	 d  d  |  j | j	 d d  |  |  j | j d  d  |  j | j	 |  |  |  j | j   d  | j d  r|  j | |  n  | j   q Wq Wd  S(   Ni   i   i   i   i   i   i   i   i   i    i!   i?   i@   iA   u   asciiu   latin1u   utf8u   w+R   u   abcu   r+i    u   abu   cu    u   defu   utf(   i   i   i   i   i   i   i   i   i   i    i!   i?   i@   iA   (   u   asciiu   latin1u   utf8(   R   RY   R[   R   R`   R    RB   R(   R9   R'   R*   R  t   multi_line_test(   R   t	   chunksizet   encR   t   cookie(    (    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_io.pyt   test_basic_ioø  s6    	
	c         C  s  | j  d  | j   d } g  } x d D]w } g  } x/ t |  D]! } | j | | t |   qC Wd j |  d } | j | j   | f  | j |  q* W| j  d  g  }	 x? t rù | j   }
 | j	   } | sã Pn  |	 j |
 | f  q» W|  j
 |	 |  d  S(   Ni    u	   sÃ¿à¿¿ï¿¿i   i   i   i   i   i   i   i    i!   i>   i?   i@   iA   iè  u    u   
(   i    i   i   i   i   i   i   i   i    i!   i>   i?   i@   iA   iè  (   R'   R0   R®   R   R   RM   R(   R    R!   Ro   R`   (   R   R   R3  t   samplet   wlinesRé   t   charsR¬   t   linet   rlinesR	   (    (    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_io.pyR1  	  s(    
	c         C  s9  |  j  t j d d d } | j   } | j d  | j   } | j d  | j   } | j d  |  j | j   |  |  j | j   d  |  j | j   |  |  j | j   d  |  j | j   |  | j d  x1 | D]) } |  j | d  |  j t	 | j  qè W|  j | j   |  | j
   d  S(   Nu   w+R   u   utf8u   Ã¿
i    (   R   RY   R[   R(   R    R'   R`   Ro   Ra   RA   RB   (   R   R   t   p0t   p1t   p2R9  (    (    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_io.pyt   test_telling+	  s$    c   
      C  s  t    } | d } d | } t | j d   } |  j t |  t |   d } t | j d   } | | } |  j t j d  } | j | d  | j	   |  j t j d d d } | j
 |  }	 |  j |	 | j d   |  j | j   |  |  j | j   |  d  S(	   Ni   u   au   utf-8u   è¢
u   wbu   rR   u   ascii(   R   R   Rt   R`   R   R   RY   R[   R    RB   R9   Rø  R(   Ro   (
   R   t
   chunk_sizet   prefix_sizet   u_prefixt   prefixt   u_suffixt   suffixR9  R   RN   (    (    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_io.pyt   test_seeking?	  s     	



c         C  su   d } |  j  t j d  } | j |  | j   |  j  t j d d d } | j d | _ | j   | j   d  S(   Ns   à¿¿
u   wbu   rR   u   utf-8i   (   R   RY   R[   R    RB   R   Ro   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_io.pyt   test_seeking_tooQ	  s    
	
c           s¶   d   d    f d  } d t  _ z x$ t j D] \ } } } | |  q1 WxS t j D]H \ } } }   t |  d } d | } | d } | | | |  qX WWd  d t  _ Xd  S(   Ni   i    c           sE   j  t j d  } | j |   | j    j  t j d d }   | _ | j   } | j   xÛ t | t |  d  D]À } x· d d t |  | g D] }  j  t j d d }  j	 | j |  | |   | j
   }  j	 | j |  | | | | ! | j |   j	 | j   | |  | j   q Wq} Wd S(   u   Tell/seek to various points within a data stream and ensure
            that the decoded data returned by read() is consistent.u   wbR   u   test_decoderi   i   N(   R   RY   R[   R    RB   R   R9   R®   R   R`   R(   R'   (   R-   t   min_posR   t   decodedR¬   R×  R4  (   t
   CHUNK_SIZER   (    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_io.pyt   test_seek_and_tell_with_datab	  s     
	
  $i   i   t   .(   Ré  Rÿ  R  R  R   (   R   RJ  Rõ  t   _t   offsetRB  RG  (    (   RI  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_io.pyR»  ]	  s    	

c         C  sÍ   d } d } xº | D]² } |  j    } |  j | d | } | j |  | j |  | j d	  |  j | j   | d
  | j d	  |  j | j   | d
  |  j | j   | d
 j |   q Wd  S(   Nu
   1234567890u   utf-16u	   utf-16-leu	   utf-16-beu   utf-32u	   utf-32-leu	   utf-32-beR   i    i   (   u   utf-16u	   utf-16-leu	   utf-16-beu   utf-32u	   utf-32-leu	   utf-32-be(   R   R  R    R'   R`   R9   R   Rt   (   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_io.pyt   test_encoded_writes	  s"         c         C  sB   d |  j  f d     Y} |  j |    } |  j t | j  d  S(   Nt
   UnReadablec           B  s   e  Z d    Z RS(   c         S  s   t  S(   N(   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_io.pyR$   ¢	  s    (   R1   R2   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_io.pyRO  ¡	  s   (   R   R  Ra   RA   R9   (   R   RO  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_io.pyt   test_unreadable 	  s    c         C  sb   |  j  |  j d   } d } x- t rM | j d  } | s@ Pn  | | 7} q! W|  j | d  d  S(   Ns   AA
BBu    i   u   AA
BB(   R  R   R!   R9   R`   (   R   R(  t   readsRÚ   (    (    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_io.pyt   test_read_one_by_one§	  s    	c         C  s   |  j  |  j d   } |  j | j   d d d g  | j d  |  j | j d   d d d g  | j d  |  j | j d  d d g  d  S(   Ns   AA
BB
CCu   AA
u   BB
u   CCi    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_io.pyR'  ±	  s    "c         C  sr   |  j  |  j d d d   } d } x- t rU | j d  } | sH Pn  | | 7} q) W|  j | d d d  d  S(   NRÏ  i   s   
Bu    i   u   Au   
B(   R  R   R!   R9   R`   (   R   R(  RQ  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_io.pyt   test_read_by_chunkº	  s     	c         C  s[   d d d g } |  j    } |  j |  } | j |  | j   |  j | j   d  d  S(   Nu   abu   cdu   efRX  (   R   R  Rp   R   R`   R   (   R   RD  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_io.pyR{  Å	  s    
c         C  sa   t  d d d g  } |  j   } |  j |  } | j |  | j   |  j | j   d  d  S(   Nu   abu   cdu   efRX  (   R   R   R  Rp   R   R`   R   (   R   RD  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_io.pyR|  Í	  s    
c         C  sd   |  j  |  j    } |  j t | j d d d g  |  j t | j d   |  j t | j d  d  S(   Ni   i   i   RÖ   (   R  R   Ra   Rb   Rp   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_io.pyR}  Õ	  s    c         C  sn   |  j  |  j |  j  d d } d } x- t rV | j d  } | sI Pn  | | 7} q* W|  j | |  j  d  S(   NR   u   asciiu    i   (   R  R   R  R!   R9   R`   R  (   R   R(  RQ  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_io.pyt   test_issue1395_1Û	  s    !	c         C  sw   |  j  |  j |  j  d d } d | _ d } x- t r_ | j d  } | sR Pn  | | 7} q3 W|  j | |  j  d  S(   NR   u   asciii   u    (   R  R   R  R   R!   R9   R`   R  (   R   R(  RQ  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_io.pyt   test_issue1395_2ç	  s    !		c         C  s   |  j  |  j |  j  d d } d | _ | j d  } | | j d  7} | | j   7} | | j   7} | | j   7} |  j | |  j  d  S(   NR   u   asciii   (   R  R   R  R   R9   Ro   R`   R  (   R   R(  RQ  (    (    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_io.pyt   test_issue1395_3ó	  s    !	c         C  s`   |  j  |  j |  j  d d } d | _ | j d  } | | j   7} |  j | |  j  d  S(   NR   u   asciii   (   R  R   R  R   R9   R`   R  (   R   R(  RQ  (    (    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_io.pyt   test_issue1395_4þ	  s
    !	c         C  s|   |  j  |  j |  j  d d } d | _ | j d  } | j   } | j d  | j |  |  j | j d  d  d  S(   NR   u   asciii   i    u   BBB
(   R  R   R  R   R9   R(   R'   R`   (   R   R(  RQ  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_io.pyt   test_issue1395_5
  s    !	c         C  sG   |  j  |  j  } |  j | d d } |  j | j   | j    d  S(   NR   u   ascii(   R   R  R  R`   R%   (   R   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_io.pyt   test_issue2282
  s    c         C  sú   t  j } xê d D]â } |  j | d d |   } | j d  | j   } Wd  QX|  j | d  & } |  j | j   d j |   Wd  QX|  j | d d |  } | j d	  Wd  QX|  j | d  & } |  j | j   d
 j |   Wd  QXq Wd  S(   Nu	   utf-8-sigu   utf-16u   utf-32u   wR   u   aaau   rbu   au   xxxu   aaaxxx(   u	   utf-8-sigu   utf-16u   utf-32(   RY   R[   R   R    R(   R`   R9   Rt   (   R   t   filenamet   charsetR   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_io.pyt   test_append_bom
  s    	%c         C  sç   t  j } x× d D]Ï } |  j | d d |   } | j d  | j   } Wd  QX|  j | d d | ; } | j |  | j d  | j d	  | j d
  Wd  QX|  j | d  & } |  j | j   d j |   Wd  QXq Wd  S(   Nu	   utf-8-sigu   utf-16u   utf-32u   wR   u   aaau   r+u   zzzi    u   bbbu   rbu   bbbzzz(   u	   utf-8-sigu   utf-16u   utf-32(	   RY   R[   R   R    R(   R'   R`   R9   Rt   (   R   RZ  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_io.pyt   test_seek_bom%
  s    	c         C  sl   |  j  t j d   } |  j | j d  Wd  QX|  j  t j d d d  } |  j | j d  Wd  QXd  S(   Nu   wu   strictR8  u   replace(   R   RY   R[   R`   R8  (   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_io.pyt   test_errors_property4
  s    u!   Threading required for this test.c           sþ   t  j     |  j t j d d d v     f d   } g  t d  D]! } t  j d | d | f  ^ qI } t j |   j   t	 j
 d  Wd  QXWd  QX|  j t j  G   j   } x1 t d  D]# } |  j | j d	 |  d  qÍ WWd  QXd  S(
   Nu   wR|   i   c           s%   d |  }   j     j |  d  S(   Nu   Thread%03d
(   t   waitR    (   R.   t   text(   t   eventR   (    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_io.pyt   run?
  s    

i   R:  RÎ   g{®Gáz?u   Thread%03d
(   R>  t   EventR   RY   R[   R®   R?  R@  t   setRA  RB  R9   R`   R   (   R   Rb  Rf   RE  t   contentR.   (    (   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_io.pyt   test_threads_write:
  s    1c           s·   |  j  |  j |  j  d d  g       f d   } |  _ |  j t  j  |  j  j  |  j  j	 j  |  j    |  j
   d  |  j
   d  d    _ d  S(   NR   u   asciic             s#    j   j j  g   (t    d  S(   N(   R@   Rc   RA   (    (   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_io.pyRÊ   Q
  s    i    i   c           S  s   d  S(   N(   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_io.pyRË   [
  R7   (   R  R   R  R   Ra   RA   RB   RÌ   R@   Rc   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_io.pyRÔ   L
  s    !	c         C  sV   |  j  |  j |  j  d d } | j   | j   | j   |  j t | j  d  S(   NR   u   ascii(   R  R   R  RB   Ra   RS   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_io.pyRÕ   ]
  s
    !


c         C  s\   |  j  |  j |  j  d d } |  j |  j  } |  j t t f   | | _ Wd  QXd  S(   NR   u   ascii(   R  R   R  Ra   R   Rb   Rc   (   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_io.pyR  d
  s    !c           sÚ   d   j  f   f d     Y} d   j  f   f d     Y}   j | d   }   j t   | j d  Wd  QX  j | d   }   j t   | j   Wd  QX  j | d   }   j | j   d  d  S(   Nt   NonbytesStreamc             s   e  Z   j j Z RS(    (   R1   R2   t   StringIOR9   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_io.pyRg  m
  s   c             s   e  Z   j j Z RS(    (   R1   R2   Rh  R9   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_io.pyRg  o
  s   u   ai   (   Rh  R  t   maybeRaisesRb   R9   Ro   R`   (   R   Rg  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_io.pyt   test_read_nonbytesj
  s    c           sž   d d
 d     Y    f d   } t  j d  } t j | d t  ? t j | d |  # t j t j d  d d } Wd  QXWd  QX|  j t	   | j
 d	  | j   Wd  QXd  S(   Nt
   BadEncoderc           B  s   e  Z d    Z RS(   c         S  s   d S(   Nu   spam(    (   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_io.pyRt   ~
  s    (   R1   R2   Rt   (    (    (    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_io.pyRk  }
  s   c           s       S(   N(    (   R  (   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_io.pyt   get_bad_encoder
  s    u   rot13u   _is_text_encodingu   incrementalencodert   fooR   u   bar(    (   Rê  R   RY   t	   swap_attrR!   R   R  R   Ra   Rb   R    R   (   R   Rl  t   rot13R  (    (   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_io.pyt   test_illegal_encoderz
  s    *c           s   f d     t  j   )  j  j d  d d d d } Wd  QX j t   | j d  Wd  QXt  j   )  j  j d  d d d d } Wd  QX j t   | j   Wd  QXt  j   )  j  j d  d d d d } Wd  QX j t   | j   Wd  QX  f d   } | d	  }  j t   | j d	  Wd  QX| d
  }  j t   | j d	  Wd  QXd  S(   Nc            sQ   t  j d  }  t |  _ z(   j   j d  d d d d } Wd  t |  _ X| S(   Nu   quopri_codect   aaaaaaRå   u   
R   (   Rê  R   R!   t   _is_text_encodingR  R   R}   (   t   quopriR  (   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_io.pyt   _make_illegal_wrapper
  s    	
Rq  Rå   u   
R   u   quopri_codeci   c           s^   d d  f d     Y    f d   } t  j d  } t j | d |      SWd  QXd  S(   Nt
   BadDecoderc             s   e  Z   f d    Z RS(   c           s     S(   N(    (   R   (   t   getstate_ret_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_io.pyRð  ³
  s    (   R1   R2   Rð  (    (   Rv  (    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_io.pyRu  ²
  s   c           s       S(   N(    (   R  (   Ru  (    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_io.pyt   _get_bad_decoderµ
  s    u   quopri_codecu   incrementaldecoder(    (   Rê  R   RY   Rn  (   Rv  Rw  Rs  (   Rt  (   Ru  Rv  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_io.pyt   _make_very_illegal_wrapper±
  s    
i*   (    (   RY   R  R  R   Ri  Rb   R9   Ro   (   R   R  Rx  (    (   Rt  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_io.pyt   test_illegal_decoder
  s.    

c         C  s   |  j  |  j d  d d } | j d  | j   | j   |  j  |  j d  d d } | j d  | j d  | j   d  S(   Nt   testR   u   asciii   u   x(   R  R   R9   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_io.pyt   test_issue25862Â
  s    

(5   R1   R2   R\   R]   R  R  R  Rü   R  R  R  R  R  R&  R)  R.  R   R  R
  R5  R1  R>  RE  RF  R»  RN  RP  RR  R'  RS  R{  R|  R}  RT  RU  RV  RW  RX  RY  R\  R]  R^  Rõ   RI  R>  Rf  RÔ   RÕ   R  Rj  Rp  Ry  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_io.pyR  è  s`   														*											/			
											
										8t   CTextIOWrapperTestc           B  s8   e  Z d    Z d   Z d   Z d   Z e j j Z	 RS(   c         C  sº   |  j  d  } |  j | d  } |  j |  } |  j t | j | d d |  j t | j  |  j t | j | d d |  j t | j  |  j j |  j  } |  j t	 t
 |  d  S(   Ns   Ã©

iè  Rå   i*   u   xyzzy(   R   RQ  R  Ra   Rb   R   RS   R9   R  R7  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_io.pyRM  Ð
  s    c         C  s¶   t  j t j d  } |  j |  } |  j | d d } | j d  | | _ t j	 |  } ~ t j
   |  j |   |  |  j t j d   } |  j | j   d  Wd  QXd  S(   Nu   wbR   u   asciiu   456defu   rbt   456def(   R   R   RY   R[   R  R  R    Rf   Rº   R»   R   RŒ   R   R`   R9   (   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_io.pyRŸ   Ü
  s    	
c         C  s   x t  d  D]~ } |  j |  j   |  j    } |  j | d d } |  j |  j   |  j    } |  j | d d } | | _ | | _ q Wt j   d  S(   Niè  R   u   ascii(   R®   R¬  R6   R  t   buddyRY   R   (   R   R¬   t   b1t   t1t   b2t   t2(    (    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_io.pyt!   test_rwpair_cleared_before_textioì
  s    	c         C  s;   |  j  |  j   d d } |  j t   | ` Wd  QXd  S(   NR   u   ascii(   R  R   Ra   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_io.pyt    test_del__CHUNK_SIZE_SystemErrorú
  s    (
   R1   R2   RM  RŸ   R  R  Rõ   t   TestCaseRa   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_io.pyR|  Î
  s
   				t   PyTextIOWrapperTestc           B  s   e  Z e j d     Z RS(   c         o  s	   d  Vd  S(   N(    (   R   RÎ   t   kwds(    (    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_io.pyRi    s    (   R1   R2   t
   contextlibt   contextmanagerRi  (    (    (    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_io.pyR    s   t   IncrementalNewlineDecoderTestc           B  s5   e  Z d    Z d   Z d   Z d   Z d   Z RS(   c           ss     f d   } | d d  | d d  | d d  | d d  | d d  | d d  | d d  | d d   j  t   j d d	 t   j   | d
 d  | d d  | d d d	 t | d d d	 t | d d  | d d  | d d  | d d  | d d  | d d  | d d  | d d  | d
 d  | d d  | d
 d  d  S(   Nc           sU     j    }  j   j |  |  |    j |   j   j |  |  |  d  S(   N(   Rð  R`   Rø  Ró  (   R   RN   RÏ   Rò  (   t   decoderR   (    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_io.pyt   _check_decode  s    s   è¢u   è¢s   èu    s   ¢s   R7   Rö  s   
u   
s   R°   u   
as   
u   

s   
as   è¢
u   è¢
s   è¢(   Ra   t   UnicodeDecodeErrorRø  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_io.pyt   check_newline_decoding_utf8
  s4    
c           sf  g   | d  k	 r< t j |         f d   } n d      f d   } |  j   j d   | d  |  j   j d  | d  |  j   j d  | d  |  j   j d  | d  |  j   j d  | d  |  j d
 j   d    j   d }  d  k	 r6 j    j |  } n  |  j   j |  d  |  j   j d   d  S(   Nc           s4   x-  j  |   D] }  j   j |   q Wd  S(   N(   Rt   R   Rø  (   RN   R   (   R  t   encodert   result(    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_io.pyt   _decode_bytewise8  s    c           s+   x$ |  D] }  j    j |   q Wd  S(   N(   R   Rø  (   RN   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_io.pyR  >  s    u   abc
u   
u   
abcu   
u   abcu   abcu   u    u   abc

abcabc
abcabc(   u   
u   
(   u   
u   
(   u   u   
u   
(	   R*   Rê  t   getincrementalencoderR`   t   newlinesRM   Rì  Rt   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_io.pyt   check_newline_decoding4  s0    






c      	   C  s   d
 } xK | D]C } | o( t j |    } |  j | d	 t } |  j | |  q Wt j d    } |  j | d	 t } |  j |  d  S(   Nu   utf-8u   latin-1u   utf-16u	   utf-16-leu	   utf-16-beu   utf-32u	   utf-32-leu	   utf-32-bet	   translate(	   Nu   utf-8u   latin-1u   utf-16u	   utf-16-leu	   utf-16-beu   utf-32u	   utf-32-leu	   utf-32-be(   R*   Rê  t   getincrementaldecodert   IncrementalNewlineDecoderR!   R  R  (   R   R  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_io.pyt   test_newline_decoderU  s      c           sQ     f d   }   j  d  d t } | |    j  d  d t } | |  d  S(   Nc           so     j  |  j d     j  |  j d  d    j  |  j d     j  |  j d  d    j  |  j d   d  S(   Nu   àŽu   àš(   R`   R  R*   Rø  (   t   dec(   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_io.pyt   _checkg  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_io.pyt   test_newline_bytese  s
    
c         C  s   x? d
 D]7 } t  j d    } |  j | |  } |  j |  q Wt  j d    } |  j | d d } |  j | j d  d	  d  S(   Niþÿÿÿiÿÿÿÿi   i   u   utf-8R  i    s   
u   
(   iþÿÿÿiÿÿÿÿ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_io.pyt   test_translater  s    (   R1   R2   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_io.pyR    s
   	*	!		t   CIncrementalNewlineDecoderTestc           B  s   e  Z RS(    (   R1   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_io.pyR  |  s   t   PyIncrementalNewlineDecoderTestc           B  s   e  Z RS(    (   R1   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_io.pyR    s   t
   MiscIOTestc           B  s¡   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 e j e d	  d
    Z e j e d	  d    Z d   Z d   Z RS(   c         C  s   t  j t  j  d  S(   N(   RY   RZ   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_io.pyR]     s    c         C  s·   x° |  j  j D]¢ } t |  j  | d   } |  j | |  | d k rJ q q d | j   k sh | d k r |  j t | t  |  q | j	 d  s |  j t | |  j
   q q Wd  S(   Nu   openu   erroru   UnsupportedOperationu   SEEK_(   R   t   __all__t   getattrR*   R  t   lowerRÌ   t
   issubclassR7  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_io.pyt   test___all__  s    c         C  sÏ  |  j  t j d d d } |  j | j d  | j   |  j  t j d  } |  j | j t j  |  j | j j t j  |  j | j j j t j  |  j | j d  |  j | j j d  |  j | j j j d  | j   |  j  t j d  } |  j | j d  |  j | j j d  |  j | j j j d  |  j  | j	   d d t
 } |  j | j d  |  j | j j d  |  j | j | j	    |  j | j j | j	    | j   | j   d  S(	   Nu   wbR|   i    u   Uu   rbu   w+u   rb+R²   (   R   RY   R[   R`   Rq   RB   Rì   Rc   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_io.pyt   test_attributes  s,    


c         C  sØ  xÑi d d 6i d d 6i d d 6d d 6i d d 6d d 6i d d 6d d 6i d d 6i d	 d 6i d d 6d d 6i d d 6d d 6i d	 d 6d d 6i d
 d 6i d d 6i d
 d 6d d 6i d
 d 6d d 6i d d 6d d 6g D]ô} |  j  t j |  } | j   |  j t | j  |  j t | j  |  j t | j  |  j t | j	  t
 | d  ru|  j t | j d  n  |  j t | j  t
 | d  r°|  j t | j d  n  t
 | d  rÕ|  j t | j  n  t
 | d  r|  j t | j t d   n  |  j t | j  |  j t | j  |  j t | j d  |  j t | j d  |  j t | j  |  j t | j  |  j t | j d | d k r d n d  |  j t | j g   |  j t t |  qÜ Wd  S(   Nu   wu   modeu   wbi   u	   bufferingi   i    u   ru   rbu   w+u   w+bu   peeku   read1i   u   readallu   readintou   bR7   u    (   R   RY   R[   RB   Ra   RS   R   R#   R§  t   __iter__t   hasattrR2  R9   R"  R3  R/   R   Ro   R   R'   R(   R0   R    Rp   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_io.pyt   test_io_after_close°  sR    






c         C  s  |  j  t |  j  |  j  t |  j d  |  j  t |  j d d d d  |  j  t |  j d d d   |  j d d  } |  j | j d  d t f d     Y} | d  } |  j d |  } | | _ | | _ t	 j
 |  } ~ ~ t j   |  j |   |  d  S(	   Ni   i   i   i   u    i    t   Cc           B  s   e  Z RS(    (   R1   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_io.pyR©  ä  s   (   Ra   Rb   RU   R*   R`   Rr  t   unicodeR   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_io.pyt   test_blockingioerrorÜ  s    		
c         C  s\   |  j  |  j t j  |  j  |  j t j  |  j  |  j t j  |  j  |  j t j  d  S(   N(   t   assertIsInstanceR   RÖ   t   ABCMetaR¥   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_io.pyt	   test_abcsï  s    c      	   C  sH  |  j  t j d d d S } |  j | | j  |  j | | j  |  j | | j  |  j | | j  Wd  QX|  j  t j d  S } |  j | | j  |  j | | j  |  j | | j  |  j | | j  Wd  QX|  j  t j d  S } |  j | | j  |  j | | j  |  j | | j  |  j | | j  Wd  QXd  S(   Nu   wbR|   i    u   w(	   R   RY   R[   R¬  R   R¥   t   assertNotIsInstanceR§   R©   (   R   t	   abcmoduleR   (    (    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_io.pyt   _check_abc_inheritanceö  s    c         C  s   |  j  |   d  S(   N(   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_io.pyt   test_abc_inheritance  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_io.pyt   test_abc_inheritance_official  s    u   fcntl required for this testc         C  s   |  j  d  d  S(   Ni   i   i @  (   t   _test_nonblock_pipe_write(   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_io.pyt   test_nonblock_pipe_write_bigbuf  s    c         C  s   |  j  d  d  S(   Ni   (   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_io.pyt!   test_nonblock_pipe_write_smallbuf  s    c         C  sX   t  j  | t  j  } |  j | d  t  j  | t  j | t j B } |  j | d  d  S(   Niÿÿÿÿi    (   t   fcntlt   F_GETFLt   assertNotEqualt   F_SETFLR¿   t
   O_NONBLOCKR`   (   R   RÓ   t   flagsRH   (    (    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_io.pyt   _set_non_blocking  s    c         C  sT  g  } g  } t  j   \ } } |  j |  |  j |  |  j | d d d t d | } |  j | d d d t d | } | | rxß d D]× } yV d	 }	 xI t ré t |	 d
 d g  | }
 | j |
  | j |
  |	 d 7}	 q¡ WWq |  j k
 re} |  j	 | j
 d	 t j  | d | j  | d <| j | j    d }
 | j |
  | j |
  q Xq Wxr t rÞy | j   PWqm|  j k
 rÚ} |  j	 | j
 d	 t j  |  j	 | j d	  | j | j    qmXqmW| t | j d   7} Wd  QXWd  QXd j |  d j |  } } |  j	 | |  |  j | j  |  j | j  d  S(   NRq   u   rbR²   R|   u   wbi'  iI   i  i    i   ia   i   iÿÿÿÿt   BLOCKEDR7   (   i'  iI   i  (   R¿   t   pipeRœ  R   R!   R   R   R    RU   R`   RÎ   t   errnot   EAGAINRr  R9   R   t   iterR*   RM   RÌ   R@   (   R   R   t   sentt   receivedR  R  t   rft   wfRC  R¬   t   msgR0  (    (    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_io.pyRŽ    sJ    !! 		
"(   R1   R2   R]   R€  R¥  Rš  R«  R®  R±  R²  R³  Rõ   RI  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_io.pyR    s   				,						t   CMiscIOTestc           B  s   e  Z e Z d  Z RS(   u,   RuntimeError: could not find io module state(   R1   R2   R   t   shutdown_error(    (    (    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_io.pyRÈ  N  s   t   PyMiscIOTestc           B  s   e  Z e Z d  Z RS(   u$   LookupError: unknown encoding: ascii(   R1   R2   RW   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_io.pyRÊ  R  s   u   ntu%   POSIX signals required for this test.t   SignalsTestc           B  s×   e  Z d    Z d   Z d   Z e j e d  e j e	 j
 d k d  d     Z d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z e j e d  d    Z d   Z d   Z RS(   c         C  s   t  j  t  j |  j  |  _ d  S(   N(   t   signalt   SIGALRMt   alarm_interruptt   oldalrm(   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_io.pyR\   Z  s    c         C  s   t  j  t  j |  j  d  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_io.pyR]   ]  s    c         C  s   d d d  S(   Ni   i    (    (   R   t   sigt   frame(    (    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_io.pyRÎ  `  s    u!   Threading required for this test.u   freebsd5u   freebsd6u   freebsd7u'   issue #12429: skip test on FreeBSD <= 7c   	   	     sg  g      f d   } t  j d |  } t | _ t j   \   } zÄ |  j j | |  } | j   zI t	 j
 d  |  j t  ' | j | t j t |  d  Wd QXWd t	 j
 d  | j   X j t j   d   |  j  | d d !| d d !g  Wd t j |  t j    y | j   Wn+ t k
 ra} | j t j k rb  qbn XXd S(   u   Check that a partial write, when it gets interrupted, properly
        invokes the signal handler, and bubbles up the exception raised
        in the latter.c            s#   t  j   d  }   j |   d  S(   Ni   (   R¿   R9   R   (   RN   (   R  t   read_results(    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_io.pyRÊ  k  s    R:  i   Ni    i   (   R>  R?  R!   t   daemonR¿   R¿  R   R   t   startRÌ  t   alarmRa   R   R    RY   t   PIPE_MAX_SIZER   RM   R   R9   R`   RB   RA   RÀ  t   EBADF(	   R   t   itemR   t   fdopen_kwargsRÊ  R  R  t   wioR0  (    (   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_io.pyt   check_interrupted_writec  s.    	
,(c         C  s    |  j  d d d d d d d  S(   NR   Rq   u   wbR|   i    (   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_io.pyt!   test_interrupted_write_unbuffered  s    c         C  s   |  j  d d d d d  S(   NR   Rq   u   wb(   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_io.pyt   test_interrupted_write_buffered  s    c         C  s    |  j  d d d d d d d  S(   Nu   xyR   Rq   u   wR   u   ascii(   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_io.pyt   test_interrupted_write_text  s    c   	        s6     f d   } t  j  t  j |  t j   \ } } |  j j | |   zŸ t  j d  |  j t t	 f  V } xL x+ t
 d  D] }  j     j   q Wt j | t    d  qw WWd  QX| j } t | t	  r	|  j t |  j d  t |   n  Wd  t  j d   j   t j |  Xd  S(   Nc            s    j     d d d  S(   Ni   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_io.pyt   on_alarm  s    i   id   u   reentrant calli    (   RÌ  RÍ  R¿   R¿  R   R   RÕ  Ra   R   t   RuntimeErrorR®   R    R   R9   R   R  t
   isinstanceRÌ   R  R  RB   (	   R   R-   RÙ  Rß  R  R  t   cmR¬   t   exc(    (   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_io.pyt   check_reentrant_write  s$    $	,
c         C  s   |  j  d d d d  S(   NR   Rq   u   wb(   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_io.pyt   test_reentrant_write_buffered¶  s    c         C  s   |  j  d d d d d d  S(   Nu   xyRq   u   wR   u   ascii(   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_io.pyt   test_reentrant_write_text¹  s    c           sÌ   t  j   \ }   t | d <  f d   } t j t j |  zU |  j j | |  } t  j   d  t j d  |  j	 | | j
 d   d  Wd t j d  | j   t  j    t  j |  Xd S(	   uÇ   Check that a buffered read, when it gets interrupted (either
        returning a partial result or EINTR), properly invokes the signal
        handler and retries if the latter returned successfully.u   closefdc           s   t  j   d  d  S(   Nt   bar(   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_io.pyt   alarm_handlerÂ  s    Rm  i   i   u   foobarNi    (   R¿   R¿  R}   RÌ  RÍ  R   R   R    RÕ  R`   R9   RB   (   R   Rø  RÙ  R  Rè  t   rio(    (   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_io.pyt   check_interrupted_read_retryŒ  s    
#
c         C  s   |  j  d   d d d  S(   Nc         S  s   |  j  d  S(   Nu   latin1(   Rø  (   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_io.pyRË   Õ  R7   Rq   u   rb(   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_io.pyt%   test_interrupterd_read_retry_bufferedÔ  s    c         C  s   |  j  d   d d d  S(   Nc         S  s   |  S(   N(    (   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_io.pyRË   Ù  R7   Rq   u   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_io.pyt!   test_interrupterd_read_retry_textØ  s    c   	        s¯  t  j d   t  j } t j   \  } t | d <g   t  d
 g       f d   } t j d |   t	  _
   f d   }  f d     t j t j |  z |  j j | |  } t j d  |  j | | j | |   | j   t	   j   |  j  d  |  j | t d	    D   Wd
 t j d  t	  t j |  t j   y | j   Wn+ t k
 r©} | j t j k rª  qªn XXd
 S(   uÈ   Check that a buffered write, when it gets interrupted (either
        returning a partial result or EINTR), properly invokes the signal
        handler and retries if the latter returned successfully.u   selectu   closefdc            s   y\ xU  sZ xH   j   g g  g  d  d k rV t j  d  }   j |   q Wq WWn t k
 r{ } |   d <n Xd  S(   Ng      ð?i    i   (   t   selectR¿   R9   R   t   BaseException(   RN   Rã  (   t   errorR  RÒ  Rí  t   write_finished(    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_io.pyRÊ  í  s    	(R:  c           s$   t  j  t  j    t  j d  d  S(   Ni   (   RÌ  RÍ  RÕ  (   RÐ  RÑ  (   t   alarm2(    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_io.pyt   alarm1÷  s    c           s     j    d  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_io.pyRñ  ú  s    i   i    c         s  s   |  ] } t  |  Vq d  S(   N(   R   (   t   .0Rf   (    (    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_io.pys	   <genexpr>  s    N(   RY   t   import_moduleRÖ  R¿   R¿  R}   R*   R>  R?  R!   RÓ  RÌ  RÍ  R   R   RÕ  R`   R    R   RM   RŒ   t   sumRB   RA   RÀ  R×  (	   R   RØ  RÙ  RC  R  RÊ  Rò  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_io.pyt   check_interrupted_write_retryÜ  s>    	
		

$c         C  s   |  j  d d d d  S(   NRf   Rq   u   wb(   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_io.pyt&   test_interrupterd_write_retry_buffered  s    c         C  s   |  j  d d d d d d  S(   Nu   xRq   u   wR   u   latin1(   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_io.pyt"   test_interrupterd_write_retry_text  s    (   u   freebsd5u   freebsd6u   freebsd7(   R1   R2   R\   R]   RÎ  Rõ   RI  R>  t   skipIfR   R   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_io.pyRË  W  s$   			-									>	t   CSignalsTestc           B  s   e  Z e Z RS(    (   R1   R2   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_io.pyRú  !  s   t   PySignalsTestc           B  s   e  Z e Z d  Z d  Z RS(   N(   R1   R2   RW   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_io.pyRû  $  s   c            s  t  t t t t t t t t t	 t
 t t t t t t t t f }  t t t t t t f } t j d g } t d   | D  } t d   | D  } t     | j   f d   | D  | j   f d   | D  t j | d <x |  D] } | j  j! d  r2xo | j"   D] \ } } t# | | |  qWqê | j  j! d  rê x- | j"   D] \ } } t# | | |  qQWqê qê Wt$ j% |    d  S(	   Nu   IncrementalNewlineDecoderc         s  s$   |  ] } | t  t |  f Vq d  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_io.pys	   <genexpr>?  s    c         s  s$   |  ] } | t  t |  f Vq d  S(   N(   R¡  RW   (   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_io.pys	   <genexpr>@  s    c         3  s)   |  ] } | j    d  | j  f Vq d S(   u   CN(   R1   (   Ró  Rf   (   t   globs(    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_io.pys	   <genexpr>B  s    c         3  s)   |  ] } | j    d  | j  f Vq d S(   u   PyN(   R1   (   Ró  Rf   (   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_io.pys	   <genexpr>C  s    u   openu   Cu   Py(&   Rñ   Rô   RK  RR  R  R  R«  R­  Ræ  Rè  R  R  R  R|  R  RÈ  RÊ  Rú  Rû  R6   R<   RE   R?   RK   R   R   R   t   dictt   globalst   updateRW   t   OpenWrapperR1   R  R,  t   setattrRY   t   run_unittest(   R*  t   mockst   all_memberst   c_io_nst   py_io_nsRz  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_io.pyt	   test_main-  s6    	u   __main__(b   R3   t
   __future__R    R   R¿   R   RA  R­   R;  Rõ   Rº   Ru   RÖ   RÌ  RÀ  t	   itertoolsR   R   t   collectionsR   R   Rz  R   RY   R  Rê  R   t   _pyioRW   R>  t   ImportErrorR*   R·  t   typet   __metaclass__t
   py3k_bytesR   R   R   R   R¥   R4   R5   R6   R:   R;   R<   R=   R>   R?   RC   RD   RE   R   RI   RJ   RK   RT   RV   R  RX   Rñ   Rô   R÷   R  R  RK  RR  RS  R  R  R  R«  R­  R®  Ræ  Rè  Rë  Ré  t   registerR  R  R  R|  R  R  R  R  R  RÈ  RÊ  Rù  Rì   RË  Rú  Rû  R  R1   (    (    (    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_io.pyt   <module>   sž   

			8
,ÿ ŸŸ0ÿ -¹â	W+ÿ ÿ è4tÉÉ		#