ó
ŠwÛjc           @   s&  d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z d „  Z d e j j d e j j d f Z	 d „  Z
 d e
 j j d e
 j j d e
 j j d	 f Z g  d
 „ Z d e j j d e j j d e j j d	 f Z d Z d e j f d „  ƒ  YZ d „  Z e d k r"e ƒ  n  d S(   iÿÿÿÿ(   t   run_unittestNc         C   s	   |  GHd S(   Ni   (    (   t   a(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyt   _f
   s    sµ   %3d           0 LOAD_FAST                0 (a)
              3 PRINT_ITEM
              4 PRINT_NEWLINE

%3d           5 LOAD_CONST               1 (1)
              8 RETURN_VALUE
i   i   c          C   s   x t  d d ƒ D] }  q Wd  S(   Ni   i
   (   t   range(   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_dis.pyt	   bug708901   s    	s  %3d           0 SETUP_LOOP              23 (to 26)
              3 LOAD_GLOBAL              0 (range)
              6 LOAD_CONST               1 (1)

%3d           9 LOAD_CONST               2 (10)
             12 CALL_FUNCTION            2
             15 GET_ITER
        >>   16 FOR_ITER                 6 (to 25)
             19 STORE_FAST               0 (res)

%3d          22 JUMP_ABSOLUTE           16
        >>   25 POP_BLOCK
        >>   26 LOAD_CONST               0 (None)
             29 RETURN_VALUE
i   c         C   s-   d s) t  g  |  D] } | ^ q d ƒ ‚ d  S(   Ni    i   (   t   AssertionError(   t   xt   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_dis.pyt
   bug13339822   s    
sá  %3d           0 LOAD_CONST               1 (0)
              3 POP_JUMP_IF_TRUE        41
              6 LOAD_GLOBAL              0 (AssertionError)
              9 BUILD_LIST               0
             12 LOAD_FAST                0 (x)
             15 GET_ITER
        >>   16 FOR_ITER                12 (to 31)
             19 STORE_FAST               1 (s)
             22 LOAD_FAST                1 (s)
             25 LIST_APPEND              2
             28 JUMP_ABSOLUTE           16

%3d     >>   31 LOAD_CONST               2 (1)
             34 BINARY_ADD
             35 CALL_FUNCTION            1
             38 RAISE_VARARGS            1

%3d     >>   41 LOAD_CONST               0 (None)
             44 RETURN_VALUE
s™   %3d           0 LOAD_GLOBAL              0 (spam)
              3 POP_TOP
              4 LOAD_CONST               0 (None)
              7 RETURN_VALUE
t   DisTestsc           B   sP   e  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 } | t _ t j | ƒ | t _ | j ƒ  } | j d ƒ } g  | D] } | j ƒ  ^ qV } | j d ƒ } d d  l } | | k r¾ |  j d d j	 | j
 | | ƒ ƒ ƒ n  d  S(   Ns   
iÿÿÿÿs"   events did not match expectation:
(   t   StringIOt   syst   stdoutt   dist   getvaluet   splitt   rstript   difflibt   failt   joint   ndiff(	   t   selft   funct   expectedR   t   save_stdoutt   gott   linest   lineR   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyt   do_disassembly_testW   s    			c         C   sO   |  j  t j d d ƒ |  j t j d t j ƒ |  j t j d t j ƒ d  S(   Nt	   STOP_CODEi    t
   LOAD_CONSTt
   STORE_NAME(   t   assertEqualR   t   opmapt   assertInt   hasconstt   hasname(   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyt
   test_opmapi   s    c         C   s"   |  j  t j t j d d ƒ d  S(   Nt	   LOAD_FAST(   R!   R   t   opnameR"   (   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyt   test_opnamen   s    c         C   s8   |  j  t j d t j ƒ |  j  t j d t j ƒ d  S(   Nt   EXTENDED_ARGR    (   R!   R   R"   R*   t   HAVE_ARGUMENT(   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyt   test_boundariesq   s    c         C   s   |  j  t t ƒ d  S(   N(   R   R   t   dis_f(   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyt   test_disu   s    c         C   s   |  j  t t ƒ d  S(   N(   R   R   t   dis_bug708901(   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyt   test_bug_708901x   s    c         C   s   |  j  t t ƒ d  S(   N(   R   R	   t   dis_bug1333982(   R   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyt   test_bug_1333982{   s    c         C   sŒ   d „  } x; t  d d ƒ D]* } t | d } |  j | | ƒ | ƒ q Wx> t  d d d ƒ D]* } t | d } |  j | | ƒ | ƒ qZ Wd  S(   Nc         R   s7   i  } d d j  d g |  d g ƒ } | | U| d S(   Ns   def foo():
 t    s   
 s   spam
t   foo(   R   (   t   countt	   namespaceR   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyR   „   s    !i   i,  i   iˆ  i
   (   t   xranget   _BIG_LINENO_FORMATR   (   R   R   t   iR   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyt   test_big_linenosƒ   s    	(
   t   __name__t
   __module__R   R&   R)   R,   R.   R0   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_dis.pyR
   V   s   							c           C   s   t  t ƒ 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_dis.pyt	   test_main”   s    t   __main__(   t   test.test_supportR    t   unittestR   R   R   R   t	   func_codet   co_firstlinenoR-   R   R/   R	   R1   R8   t   TestCaseR
   R=   R;   (    (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_dis.pyt   <module>   s(   		>	