ó
wŰjc           @   sĚ   d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l m Z d  d l m Z d  d l Z d  d l Z d  d l	 Z	 d e j
 f d     YZ d e j
 f d     YZ d   Z e d	 k rČ e j   n  d S(
   i˙˙˙˙N(   t   test_support(   t   script_helpert   TestSpecificsc           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 d k rĚ d   Z n  d   Z d   Z d   Z d   Z d   Z e j d    Z d   Z  d   Z! d   Z" d   Z# d   Z$ RS(    c         C   s$   t  d d d  t  d d d  d  S(   Nt   his   <test>t   execs   hi(   t   compile(   t   self(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_no_ending_newline   s    c         C   s   t  d d d  d  S(   Nt    s   <test>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_compile.pyt
   test_empty   s    c         C   sD   t  d d d  t  d d d  t  d d d  t  d d d  d  S(   Ns   
s   <test>R   s   s   hi
stuff
def f():
    passs(   this_isreally_old_macdef f():
    pass(   R   (   R   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_other_newlines   s    c         C   sR   |  j  t t d d d  d d  l } | j } t | d d  t | d |  d  S(   Ns   __debug__ = 1t   ?t   singlei˙˙˙˙t	   __debug__t   sure(   t   assertRaisest   SyntaxErrorR   t   __builtin__R   t   setattr(   R   R   t   prev(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_debug_assignment   s
    	c         B   sÄ   |  j  e e d  |  j  e e d  |  j  e e d  y d d  U|  j d  Wn e k
 re n Xy d d  U|  j d  Wn e k
 r n Xy d d  U|  j d	  Wn e k
 rż n Xd  S(
   Ns   lambda a,a:0s   lambda a,a=1:0s   lambda a=1,a=1:0s   def f(a, a): passs   duplicate argumentss   def f(a = 0, a = 1): passs   duplicate keyword argumentss   def f(a): global a; a = 1s   variable is global and local(   R   R   t   evalt   fail(   R   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_argument_handling"   s$    c         C   s   |  j  t t d d d  d  S(   Ns   1+*3t   filenameR   (   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_compile.pyt   test_syntax_error7   s    c         C   s   |  j  t t d d d  d  S(   Ns	   f(None=1)s   <string>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_compile.pyt   test_none_keyword_arg:   s    c         B   s1   y d d  U|  j  d  Wn e k
 r, n Xd  S(   Ns   def f(a): global a; a = 1s   variable is global and local(   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_compile.pyt   test_duplicate_global_local=   s
    c      
   B   s+  i d d 6} d | U|  j  | d d  i d d 6} i d d 6d d 6} d	 | | U|  j d |  |  j  | d d
  |  j e   d d  UWd  QX|  j e   d i  i  i  f d  UWd  QXi d d 6d d 6} i  } |  j e   d | f | UWd  QX|  j e   d | | f | | UWd  QXd  S(   Ni   t   bs	   a = b + 1t   ai   i   i   t   cs	   a = b + ci
   i   (   s	   a = b + 1(   t   assertEqualt   assertNotInR   t	   TypeError(   R   t   gt   l(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_exec_functional_styleD   s$    
c         C   s4   d d d g } x | D] } t  | d d  q Wd  S(   NsN   
def g():
    def f():
        if True:
            exec "" in {}, {}
        sM   
def g():
    def f():
        if True:
            exec("", {}, {})
        sI   
def g():
    def f():
        if True:
            exec("", {})
        s   <code>R   (   R   (   R   t   codeR   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_nested_qualified_exec`   s
    	c         B   s  d d d     Y} |   } e    } d | | U|  j | j d  y d | | UWn e k
 rc n X|  j d  d | | U|  j | j d e d	  f  d
 | | U|  j | j d | f  d | | U|  j | j d | f  y d | UWn e k
 r˙ n X|  j d  d d d     Y} |   } y d | | UWn e k
 rJn X|  j d  d e f d     Y} |   } d | | U|  j | d d  d  S(   Nt   Mc           B   s)   e  Z d  Z d   Z d   Z d   Z RS(   s9   Test mapping interface versus possible calls from eval().c         S   s   | d k r d St   d  S(   NR   i   (   t   KeyError(   R   t   key(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   __getitem__y   s    c         S   s   | | f |  _  d  S(   N(   t   results(   R   R)   t   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_compile.pyt   __setitem__}   s    c         S   s
   t  d  S(   Nt   xyz(   t   list(   R   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   keys   s    (   t   __name__t
   __module__t   __doc__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_compile.pyR'   w   s   		s   z = at   zi   s   z = bs   Did not detect a KeyErrors	   z = dir()R.   s   z = globals()s   z = locals()s'   Did not validate globals as a real dictt   Ac           B   s   e  Z d  Z RS(   s   Non-mapping(   R1   R2   R3   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyR5      s   s$   Did not validate locals as a mappingt   Dc           B   s   e  Z d    Z RS(   c         S   s    | d k r d St  j |  |  S(   NR   i   (   t   dictR*   (   R   R)   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.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_compile.pyR6   Ľ   s   (    (   R4   i   (    (   t   globalsR   R+   t	   NameErrorR   R/   R!   R7   (   R   R'   t   mR"   R5   R6   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_compile.pyt)   test_exec_with_general_mapping_for_localsu   s@    		



		
c         B   sA   d d d } d | f d } | d  U|  j  e d  d  d  S(   Ns	   x = x or s   -xiÄ	  sŢ   
def f(x):
    %s
    %s
    %s
    %s
    %s
    %s
    %s
    %s
    %s
    %s
    # the expressions above have no effect, x == argument
    while x:
        x -= 1
        # EXTENDED_ARG/JUMP_ABSOLUTE here
    return x
i
   i   i    (   R   t   f(   R   t   longexprR%   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_extended_argŽ   s    c         B   s1   e  j d e f   e j d  d  UWd  QXd  S(   Ns*   tuple parameter unpacking has been removeds>  
        def comp_args((a, b)):
            return a,b
        self.assertEqual(comp_args((1, 2)), (1, 2))

        def comp_args((a, b)=(3, 4)):
            return a, b
        self.assertEqual(comp_args((1, 2)), (1, 2))
        self.assertEqual(comp_args(), (3, 4))

        def comp_args(a, (b, c)):
            return a, b, c
        self.assertEqual(comp_args(1, (2, 3)), (1, 2, 3))

        def comp_args(a=2, (b, c)=(3, 4)):
            return a, b, c
        self.assertEqual(comp_args(1, (2, 3)), (1, 2, 3))
        self.assertEqual(comp_args(), (2, 3, 4))
        (   R    t   check_py3k_warningst   SyntaxWarningt   textwrapt   dedent(   R   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_complex_argsĹ   s    c         B   s1   y d d  U|  j  d  Wn e k
 r, n Xd  S(   Ns   def f(a=1, (b, c)): passs   non-default args after default(   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_compile.pyt   test_argument_orderÝ   s
    c         C   sP   |  j  t t d  |  j  t t d  |  j  t t d  |  j  t t d  d  S(   Nt   2es   2.0e+s   1e-s   3-4e/21(   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_compile.pyt   test_float_literalsä   s    c         C   s   d } t  | d d  d  S(   Ns   
if 1:
    if 2:
        passs   <string>R   (   R   (   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_compile.pyt   test_indentationë   s    c         C   sY   d j  d g d d g  } t | d d  } |  j | j d  |  j | j d  d  S(   NR   s   
i   t   spamt   fnR   i  (   t   joinR   R   t   co_firstlinenot	   co_lnotab(   R   t   s256t   co(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_leading_newlines÷   s    c         C   s!  xZ d d d d d d d d d	 d
 d d d d d d d d d g D] } |  j  t t |  q@ W|  j t d  d  |  j t d  d  |  j t d  d  |  j t d  d  |  j t d  d  |  j t d  d  |  j t d  d  |  j t d  d  |  j t d  d  |  j t d   d!  |  j t d"  d#  |  j t d$  d#  |  j t d%  d&  |  j t d'  d(  |  j t d)  d*  |  j t d+  d#  |  j t d,  d#  |  j t d-  d.  |  j t d/  d.  |  j t d0  d.  |  j t d1  d.  |  j t d2  d3  |  j t d4  d5  |  j t d6  d7  |  j t d8  d9  |  j t d:  d;  |  j t d<  d=  |  j t d>  d  |  j t d?  d@  |  j t dA  dB  |  j t dC  dD  |  j t dE  dF  d  S(G   Nt   077787t   0xjs   0x.t   0et   090000000000000t   080000000000000t   000000000000009t   000000000000008t   0b42t   0BADCAFEt   0o123456789s   0b1.1s   0o4.2t   0b101j2t   0o153j2t   0b100e1t   0o777e1t   0o8t   0o78t   0777i˙  t   0777Lt   000777t   0xffi˙   t   0xffLt   0XfFs   0777.i	  s   0777.0t8   000000000000000000000000000000000000000000000000000777e0t   0777e1iZ  t   0e0i    s	   0000E-012s   09.5g      #@t   0777jy             H@t   00jy                s   00.0t   0e3s   090000000000000.g  č°vÔBs&   090000000000000.0000000000000000000000t   090000000000000e0s   090000000000000e-0t   090000000000000jy          č°vÔBt   000000000000007i   s   000000000000008.g       @s   000000000000009.g      "@t   0b101010i*   s   -0b000000000010iţ˙˙˙t   0o777s
   -0o0000010iř˙˙˙s   020000000000.0g    _ Bt   037777777777e0g  âHv!Bs   01000000000000000000000.0gPďâÖäKD(   R   R   R   R   (   R   t   arg(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt!   test_literals_with_leading_zeroesý   sL    	c         C   sĺ   t  j d k rH d } |  j t |  d  |  j t d |  d  nU t  j d k r d } |  j t |  d  |  j t d |  d	  n |  j d
  |  j t d t  j d  t  |  j t d t  j d  t  d  S(   Ni˙˙˙t
   0xffffffffl   ˙˙ t   -lý˙˙˙˙˙ I˙˙˙˙˙˙˙t   0xffffffffffffffffl   ˙˙˙˙ lű˙˙˙˙˙˙˙ s)   How many bits *does* this machine have???s   %si   i   (   t   syst   maxintR   R   R   t   assertIsInstancet   intt   long(   R   t   all_one_bits(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_unary_minus&  s    "I˙˙˙˙˙˙˙c   
      C   sq   d 
} d } d 
} d } d 
} d } d 
} d } x6 |  j  j j D]% }	 |	 d  k	 rD |  j |	 t  qD qD Wd  S(	   NI       I    ˙˙˙˙I       I      ˙˙I       @I       ŔI˙˙˙˙˙˙˙I      (   t   test_32_63_bit_valuest	   func_codet	   co_constst   NoneR{   R|   (
   R   R   R   R   R;   t   eR=   R"   t   ht   variable(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyR   :  s    c         C   s6   d p	 d \ } } |  j  | d  |  j  | d  d  S(   Ni   i˙˙˙˙(   i   i˙˙˙˙(   i˙˙˙˙i   (   R   (   R   t   it   j(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_sequence_unpacking_errorH  s    c         C   sŤ   d d d d d d d d d	 d
 d d g } xJ | D]B } | d 7} |  j  t t | d d  |  j  t t | d d  q1 Wt d d d  t d d d  t d d d  d  S(   Ns   None = 0s	   None += 0s   __builtins__.None = 0s   def None(): passs   class None: passs   (a, None) = 0, 0s   for None in range(10): passs   def f(None): passs   import Nones   import x as Nones   from x import Nones   from x import y as Nones   
t   tmpR   R   s   from None import xs   from x import None as ys   import None as x(   R   R   R   (   R   t   stmtst   stmt(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_none_assignmentN  s&    	
c         C   sĘ   d d d d d d d d d	 d
 d d d d d g } d d d d d d d d d d d d d d d d d  d! d" d# d$ d% g } x | D] } t  | d& d'  q Wx' | D] } |  j t t  | d& d'  qŁ Wd  S((   Ns
   import syss   import os, syss   import os as bars   import os.path as bars0   from __future__ import nested_scopes, generatorss2   from __future__ import (nested_scopes,
generators)s3   from __future__ import (nested_scopes,
generators,)s%   from sys import stdin, stderr, stdouts'   from sys import (stdin, stderr,
stdout)s(   from sys import (stdin, stderr,
stdout,)s(   from sys import (stdin
, stderr, stdout)s)   from sys import (stdin
, stderr, stdout,)s7   from sys import stdin as si, stdout as so, stderr as ses9   from sys import (stdin as si, stdout as so, stderr as se)s:   from sys import (stdin as si, stdout as so, stderr as se,)s   import (os, sys)s   import (os), (sys)s   import ((os), (sys))s   import (syss   import sys)s   import (os,)s   import os As bars   import os.path a bars   from sys import stdin As stdouts   from sys import stdin a stdouts   from (sys) import stdins%   from __future__ import (nested_scopess%   from __future__ import nested_scopes)s0   from __future__ import nested_scopes,
generatorss   from sys import (stdins   from sys import stdin)s%   from sys import stdin, stdout,
stderrs   from sys import stdin sis   from sys import stdin,s   from sys import (*)s(   from sys import (stdin,, stdout, stderr)s    from sys import (stdin, stdout),R   R   (   R   R   R   (   R   t   succeedR   R   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_importf  sR    		c         C   s>   d   } |   \ } } |  j  t | j  t | j   d  S(   Nc          S   s"   d d  }  d d  } |  | f S(   Ni   c         S   s   |  S(   N(    (   t   x(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   <lambda>  R   i   c         S   s   |  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_compile.pyR     R   (    (   t   f1t   f2(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyR=     s    (   t   assertNotEqualt   idR   (   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_compile.pyt   test_for_distinct_code_objects  s    	c         C   s   d   } |  j  | j  d  S(   Nc           S   s   d S(   Nt   foo(    (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyR     R   (   t   assertIsNoneR3   (   R   R#   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_lambda_doc  s    	c         C   só   d } |  j  t t | d d  d } |  j  t t | d d  d } |  j t |  d  d } |  j t |  d  d } |  j t |  d  d	 } |  j t |  d
  d } |  j t |  t j d   d } |  j t |  d  d  S(   Ns#   # -*- coding: badencoding -*-
pass
R   R   u   # -*- coding: utf-8 -*-
pass
s   u"Â¤"
u   ĂÂ¤u   u"ĂÂ¤"
s   # -*- coding: latin1 -*-
u"Â¤"
s   # -*- coding: utf-8 -*-
u"Â¤"
u   Â¤s#   # -*- coding: iso8859-15 -*-
u"Â¤"
s
   \xc2\u20acs$   u"""\
# -*- coding: utf-8 -*-
Â¤"""
u   # -*- coding: utf-8 -*-
ĂÂ¤(   R   R   R   R   R   R    t   u(   R   R%   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_encoding˘  s     c         C   sJ  d t  f d     Y} |   } d | d <|  j | d d  | d c d 7<|  j | d d  | d =|  j d |  d | d <|  j | d d  | d	 c d 7<|  j | d
 d  | d =|  j d |  d | d d +|  j | d d !d  | d d c !d 7+|  j | d d !d  | d d 5|  j t d d  |  d | d d  d d  f <|  j | d d  d d  f d  | d d  d d  f c d 7<|  j | d d  d d  f d  | d d  d d  f =|  j t d d  t d d  f |  d | d d d  <|  j | d d d  d  | d d d  c d 7<|  j | d d d  d  | d d d  =|  j t d d d  |  d | d d d  d d d  f <|  j | d d d  d d d  f d  | d d d  d d d  f c d 7<|  j | d d d  d d d  f d  | d d d  d d d  f =|  j t d d d  t d d d  f |  d | d <|  j | d d  | d c d 7<|  j | d d  | d =|  j t |  d | d <|  j | d d  | d c d 7<|  j | d d  | d =|  j t t f |  d  S(   Nt   str_mapc           B   s5   e  Z d    Z d   Z d   Z d   Z d   Z RS(   c         S   s   i  |  _  d  S(   N(   t   data(   R   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   __init__š  s    c         S   s   |  j  t |  S(   N(   R   t   str(   R   R)   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyR*   ť  s    c         S   s   | |  j  t |  <d  S(   N(   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_compile.pyR-   ˝  s    c         S   s   |  j  t |  =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_compile.pyt   __delitem__ż  s    c         S   s   t  |  |  j k 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_compile.pyt   __contains__Á  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_compile.pyR   ¸  s
   				i   i   i   .(   i   i   (   i   i   (   i   i   (   i   i   (   i   i   (   i   i   (   ..(   ..(   ..(   ..(   ..(   t   objectR   R    t   slicet   Ellipsis(   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_compile.pyt   test_subscriptsľ  sd    	


&"&(",(,.

c         C   s{   d d d     Y} |  j  d | j j j  |  j  d | j j j  |  j  d | j j j  |  j  d | j j j  d  S(   NR5   c           B   s   e  Z d    Z RS(   c          S   s(   d }  d } d d  l  } d d  l } d  S(   Ni   i   i˙˙˙˙(   t   _A__mangled_modt   __package__.module(   t   _A__mangledt   __not_mangled__RŚ   t   __package__(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.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_compile.pyR5   ţ  s   R¨   RŠ   RŚ   RŞ   (    (   t   assertInR=   R   t   co_varnames(   R   R5   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_manglingý  s
    c   	      C   sĐ  t  } | j   j d  r( | d  } n  t | d   } | j   } Wd  QXd d g d d g d	 d
 g d d g d d g d d g d d g d d g | | g g	 } x | D] \ } } t | d | d  } t | d | d t j  } |  j t	 |  t j
 k  t | d | d  } |  j | |  |  j | j d |  qŞ Wt d d d t j  } |  j t t | d d  |  j t t t j   d d  t j
   } t j   g | _ |  j t t | d d  d  S(   Nt   pyct   pyoi˙˙˙˙t   rs   <assign>s   x = 5s   <print1>s   print 1s   <printv>s   print vs   <printTrue>s
   print Trues   <printList>s   print []s	   <ifblock>s   if True:
    pass
s
   <forblock>s    for n in [1, 2, 3]:
    print n
s	   <deffunc>s   def foo():
    pass
foo()
s   %s1R   s   %s2s   %s3s   <string>s   <ast>R   (   RŽ   RŻ   (   t   __file__t   lowert   endswitht   opent   readR   t   _astt   PyCF_ONLY_ASTt
   assertTruet   typet   ModuleR   t   co_filenameR   R!   t   Ift   BoolOpt   body(	   R   t   fnameR=   t	   fcontentst   sample_codeR%   t   co1t   astt   co2(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   test_compile_ast
  s6    								c         C   s   d } t  j   } zV t j j | d  } t | d   } | j |  Wd  QXt j |  \ } } } Wd  t	 j
 |  X|  j d |  d  S(   Ns   # 
#ý
s   bad.pyt   wbs	   Non-ASCII(   t   tempfilet   mkdtempt   ost   pathRL   R´   t   writeR   t   assert_python_failureR    t   rmtreeRŤ   (   R   t   srct   tmpdRK   t   fpt   rct   outt   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_compile.pyt$   test_yet_more_evil_still_undecodable1  s    c         C   s  |  j  t d   t d d d  Wd  QXt j   Đ |  j  t d   t t d  d d  Wd  QXt t d d d  d d  } |  j t |  d  t t d	 d d  d d  } |  j t |  d  t t d
 d d  d d  } |  j t |  d  Wd  QXd  S(   Ns   without null bytesu   123 s   <dummy>R   s   123 i   i   i   t   1234s   $23$(   t   assertRaisesRegexpR!   R   R    R@   t   bufferR   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_compile.pyt   test_null_terminated>  s    (%   R1   R2   R   R	   R
   R   R   R   R   R   R$   R&   R<   R?   RD   RE   RG   RI   RQ   Ru   R   Ry   Rz   R   R   R   R   R   R   R    t   requires_unicodeR   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_compile.pyR      s@   											9							)				/				H		'	t   TestStackSizec           B   sz   e  Z d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z e j d
    Z d   Z RS(   id   c         C   s\   t  | t  r$ t | d d  } n  t j t j t | j    } |  j | j	 |  d  S(   Ns   <foo>R   (
   t
   isinstanceR   R   t   matht   ceilt   logt   lent   co_codet   assertLessEqualt   co_stacksize(   R   R%   t   max_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_compile.pyt   check_stack_sizeS  s    !c         C   s   |  j  d |  j d  d  S(   Ns   x and R   (   Rä   t   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_compile.pyt   test_and[  s    c         C   s   |  j  d |  j d  d  S(   Ns   x or 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_compile.pyt   test_or^  s    c         C   s   |  j  d |  j d  d  S(   Ns   x and x or 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_compile.pyt   test_and_ora  s    c         C   s   |  j  d |  j d  d  S(   Ns   x < 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_compile.pyt   test_chained_comparisond  s    c         C   s   |  j  d |  j d  d  S(   Ns   x if x else 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_compile.pyt   test_if_elseg  s    c         C   s   |  j  d |  j d  d  S(   Ns   x + 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_compile.pyt
   test_binopj  s    c         C   s(   d } | d |  j  7} |  j |  d  S(   Ns
   def f(x):
s      x and x
(   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_compile.pyt   test_func_andm  s    c         C   sT   xM | j  j D]" } t |  t |  k r Pq q W|  j d | | j  j f  d  S(   Ns    unable to find constant %r in %r(   t   __code__R   t   reprR   (   R   t   funct   expectedt   const(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   check_constantr  s
    	c            sE     f d   } | d   | d  | d  | d  | d  d  S(   Nc            s{   i  } d |  |  f } | | U| d } | d }   j  | j | j    j | |     j e |    e |    d  S(   Ns   f1, f2 = lambda: %r, lambda: %rR   R   (   t   assertIsRí   Rň   R   Rî   (   Rń   t   nsR%   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_compile.pyt   check_same_constant  s    

i    g        t   abc(   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_compile.pyt   test_merge_constants|  s    




c            sÄ     f d   } | d d  | d 
d  | d	 d
  d   d   } }   j  | j | j    j | d 
   j | d    j t |    t d 
    j t |    t d   d  S(   Nc            s¤   i  } d |  | f | U| d } | d }   j  | j | j    j | |     j | |    j e |    e |      j e |    e |   d  S(   Ns   f1, f2 = lambda: %r, lambda: %rR   R   (   t   assertIsNotRí   Rň   R   Rî   (   t   const1t   const2Rô   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_compile.pyt   check_different_constants  s    

i    g        g       c           S   s   d 
S(   Ny                (    (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyR   Ś  R   c           S   s   d S(   Ny               (    (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyR   Ś  R   y                y               (   i    (   g        (   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_compile.pyt   test_dont_merge_constants  s     (   R1   R2   Rĺ   Rä   Rć   Rç   Rč   Ré   Rę   Rë   Rě   Rň   R    t   cpython_onlyR÷   Rü   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyRÚ   M  s   									
c           C   s   t  j t  d  S(   N(   R    t   run_unittestR1   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt	   test_mainŽ  s    t   __main__(   RÜ   t   unittestRy   Rś   t   testR    R   RÉ   RÇ   RB   t   TestCaseR   RÚ   R˙   R1   t   main(    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_compile.pyt   <module>   s   ˙ ˙ Da	