ó
wŰjc           @   s^   d  d l  m Z m Z d  d l Z d e j f d     YZ d   Z e d k rZ e   n  d S(   i˙˙˙˙(   t   run_unittestt   check_py3k_warningsNt
   OpcodeTestc           B   s,   e  Z d    Z d   Z d   Z d   Z RS(   c         C   s§   d } x~ t  d  D]p } | | } y d d Wn1 t k
 rB n! t k
 rR n t k
 rb n Xy Wn n Xz Wd  X| | } q W| d k rŁ |  j d  n  d  S(   Ni    i
   i   iZ   s   try inside for(   t   ranget	   NameErrort   ZeroDivisionErrort	   TypeErrort   fail(   t   selft   nt   i(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_opcodes.pyt   test_try_inside_for_loop   s*    
       c         C   sÝ  d d
 d     Y} d | f d     Y} d d d     Y} d | f d     Y} y |    Wn n Xy |    Wn | k
 r n Xy |    Wn | k
 rŞ n Xy |    Wn! | k
 rŐ |  j    n n X|   } |   } y | |  Wn# | k
 r } |  j | |  n X|  j  d	  y
 |  Wn# | k
 r]} |  j | |  n X|  j  d	  y | |  Wn t k
 rn X|  j  d	  y | |  Wn# | k
 rË} |  j | |  n X|  j  d	  d  S(   Nt   AClassc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_opcodes.pyR      s    t   BClassc           B   s   e  Z RS(    (   R   R   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_opcodes.pyR      s    t   CClassc           B   s   e  Z RS(    (   R   R   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_opcodes.pyR      s    t   DClassc           B   s   e  Z d    Z RS(   c         S   s   d  S(   N(    (   R   t   ignore(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_opcodes.pyt   __init__   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_opcodes.pyR      s   s   no exception(    (    (   R   t   assertEqualR   t   assertIsInstance(   R   R   R   R   R   t   at   bt   v(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_opcodes.pyt   test_raise_class_exceptions   sX             		  
   c         C   sD  t  d  } t  d  } |  j | |  t  d  } t  d  } |  j | |  t  d  } t  d  } |  j | |  t  d  } t  d  } |  j | |  t  d  } t  d  } |  j | |  t  d  } t  d  } |  j | |  t  d  } t  d  } |  j | |  t  d	  } t  d
  } |  j | |  d  S(   Ns   lambda: Nones   lambda a: as   lambda a=1: as	   lambda: 0s	   lambda: 1s   lambda a: Nones   lambda b: Nones   lambda a=None: Nones   lambda a=0: Nones   lambda a=1: None(   t   evalt   assertNotEqual(   R   t   ft   g(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_opcodes.pyt   test_compare_function_objectsG   s0    c         C   s1   d t  f d     Y} |  j |   d d  d  S(   Nt   MyStringc           B   s   e  Z d    Z RS(   c         S   s   d S(   Ni*   (    (   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_opcodes.pyt   __mod__k   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_opcodes.pyR   j   s   i   i*   (   t   strR   (   R   R   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_opcodes.pyt    test_modulo_of_string_subclassesi   s    (   R   R   R   R   R   R#   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_opcodes.pyR      s   		/	"c           C   s0   t  d t f d t f   t t  Wd  QXd  S(   Ns)   exceptions must derive from BaseExceptionsE   catching classes that don't inherit from BaseException is not allowed(   R   t   DeprecationWarningR    R   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_opcodes.pyt	   test_mainp   s
    t   __main__(   t   test.test_supportR    R   t   unittestt   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_opcodes.pyt   <module>   s
   j	