ó
wŰjc           @   s  d  d l  Z  d  d l Z d  d l Z d  d l m Z e e j d  sU e  j d  n  d d  Z d d	 d
 d d d d e g Z	 d j
 e	  d Z d j
 e	  d Z d j
 e	  d Z d j
 e	  d Z g  e	 D] Z e d ^ qÔ Z [ d e  j f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d   Z e d k re   n  d S(!   i˙˙˙˙N(   t   test_supportt   newliness3   This Python does not have universal newline supportt   xi   i   s   line1=1s>   line2='this is a very long line designed to go past the magic s>   hundred character limit that is inside fileobject.c and which s?   is meant to speed up the common case, but we also want to test s   the uncommon case, naturally.'s   def line3():passs   line4 = '%s's   
s   s   
t   TestGenericUnivNewlinesc           B   sS   e  Z d  Z d Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 RS(	   t   Ut   wbc         C   s2   t  t j |  j   } | j |  j  Wd  QXd  S(   N(   t   openR    t   TESTFNt	   WRITEMODEt   writet   DATA(   t   selft   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_univnewlines2k.pyt   setUp'   s    c         C   s"   y t  j t j  Wn n Xd  S(   N(   t   ost   unlinkR    R   (   R   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_univnewlines2k.pyt   tearDown+   s    c         C   s`   t  t j |  j   } | j   } Wd  QX|  j | t  |  j t | j  t |  j	   d  S(   N(
   R   R    R   t   READMODEt   readt   assertEqualt   DATA_LFt   reprR   t   NEWLINE(   R   R   t   data(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_univnewlines2k.pyt	   test_read1   s    c         C   s`   t  t j |  j   } | j   } Wd  QX|  j | t  |  j t | j  t |  j	   d  S(   N(
   R   R    R   R   t	   readlinesR   t
   DATA_SPLITR   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_univnewlines2k.pyt   test_readlines7   s    c         C   s   t  t j |  j  ? } g  } | j   } x# | rO | j |  | j   } q- WWd  QX|  j | t  |  j t | j	  t |  j
   d  S(   N(   R   R    R   R   t   readlinet   appendR   R   R   R   R   (   R   R   R   t   d(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_univnewlines2k.pyt   test_readline=   s    	c         C   s   t  t j |  j  V } | j   | j   } | j   } |  j | t d  | j	 |  | j   } Wd  QX|  j | t d  d  S(   Ni   (
   R   R    R   R   R   t   tellR   R   R   t   seek(   R   R   t   posR   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_univnewlines2k.pyt	   test_seekG   s    
c         C   sa   i  } t  j    t t  j |  Wd  QX| d } |  j | j j d  |  j | d t  d  S(   Nt   line3i   t   line4(   R    t   check_py3k_warningst   execfileR   R   t	   func_codet   co_firstlinenot   FATX(   R   t	   namespacet   func(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_univnewlines2k.pyt   test_execfileQ   s    
(   t   __name__t
   __module__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_univnewlines2k.pyR   !   s   					
	
t   TestNativeNewlinesc           B   s    e  Z d Z e Z d  Z d Z RS(   t   rt   wN(   R.   R/   t   NoneR   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_univnewlines2k.pyR0   Z   s   t   TestCRNewlinesc           B   s   e  Z d  Z e Z RS(   s   (   R.   R/   R   t   DATA_CRR
   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_univnewlines2k.pyR4   `   s   t   TestLFNewlinesc           B   s   e  Z d  Z e Z RS(   s   
(   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_univnewlines2k.pyR6   d   s   t   TestCRLFNewlinesc           B   s   e  Z d  Z e Z d   Z RS(   s   
c         C   s{   t  t j |  j  > } |  j t | j  t d    | j   } | j	   } Wd  QX|  j t | j  t |  j
   d  S(   N(   R   R    R   R   R   R   R   R3   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_univnewlines2k.pyt	   test_telll   s
    (   R.   R/   R   t	   DATA_CRLFR
   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_univnewlines2k.pyR7   h   s   t   TestMixedNewlinesc           B   s   e  Z d Z e Z RS(   s   s   
(   s   s   
(   R.   R/   R   t
   DATA_MIXEDR
   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_univnewlines2k.pyR:   s   s   c           C   s   t  j t t t t t  d  S(   N(   R    t   run_unittestR0   R4   R6   R7   R:   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_univnewlines2k.pyt	   test_mainx   s    t   __main__i @  (   t   unittestR   t   syst   testR    t   hasattrt   stdint   SkipTestR*   t   DATA_TEMPLATEt   joinR   R5   R9   R;   R   R   t   TestCaseR   R0   R4   R6   R7   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_univnewlines2k.pyt   <module>   s6   	
9		