ó
ŒwÛjc           @   sÚ  d  Z  d Z d Z d d l Z d d l Z d d l m Z d d l m Z m	 Z	 d d l
 m Z d e f d	 „  ƒ  YZ d
 „  Z d e f d „  ƒ  YZ e d „  ƒ Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e j f d „  ƒ  YZ d e f d „  ƒ  YZ d e j e f d „  ƒ  YZ d e j e f d „  ƒ  YZ d e j e f d „  ƒ  YZ d e j f d „  ƒ  YZ d e j f d „  ƒ  YZ d  e j f d! „  ƒ  YZ d" e j f d# „  ƒ  YZ d$ „  Z e d% k rÖe ƒ  n  d S(&   s7   Unit tests for the with statement specified in PEP 343.s
   Mike Blands   mbland at acm dot orgiÿÿÿÿN(   t   deque(   t   GeneratorContextManagert   contextmanager(   t   run_unittestt   MockContextManagerc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   s/   t  j |  | ƒ t |  _ t |  _ d  |  _ d  S(   N(   R   t   __init__t   Falset   enter_calledt   exit_calledt   Nonet	   exit_args(   t   selft   gen(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR      s    		c         C   s   t  |  _ t j |  ƒ S(   N(   t   TrueR   R   t	   __enter__(   R   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR      s    	c         C   s1   t  |  _ | | | f |  _ t j |  | | | ƒ S(   N(   R   R   R
   R   t   __exit__(   R   t   typet   valuet	   traceback(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR      s    	(   t   __name__t
   __module__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_with.pyR      s   		c            s   ‡  f d †  } | S(   Nc             s   t  ˆ  |  | Ž  ƒ S(   N(   R   (   t   argst   kwds(   t   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_with.pyt   helper!   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_with.pyt   mock_contextmanager    s    t   MockResourcec           B   s   e  Z d  „  Z RS(   c         C   s   t  |  _ t  |  _ d  S(   N(   R   t   yieldedt   stopped(   R   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR   '   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_with.pyR   &   s   c          c   s,   t  ƒ  }  z t |  _ |  VWd  t |  _ Xd  S(   N(   R   R   R   R   (   t   mock(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   mock_contextmanager_generator,   s
    			t   Nestedc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         G   s   | |  _  d  |  _ d  S(   N(   t   managersR	   t   entered(   R   R    (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR   8   s    	c         C   s”   |  j  d  k	 r t d ƒ ‚ n  t ƒ  |  _  g  } y; x4 |  j D]) } | j | j ƒ  ƒ |  j  j | ƒ q= WWn" |  j t	 j
 ƒ  Œ  s� ‚  q� n X| S(   Ns   Context is not reentrant(   R!   R	   t   RuntimeErrorR    R    t   appendR   t
   appendleftR   t   syst   exc_info(   R   t   varst   mgr(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR   <   s    
c         G   s€   | } xC |  j  D]8 } y | j | Œ  r1 d } n  Wq t j ƒ  } q Xq Wd  |  _  | | k	 r| | d | d | d ‚ n  d  S(   Ni    i   i   (   NNN(   R!   R   R	   R%   R&   (   R   R&   t   exR(   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR   J   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_with.pyR   6   s   		t
   MockNestedc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         G   s/   t  j |  | Œ t |  _ t |  _ d  |  _ d  S(   N(   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_with.pyR   [   s    		c         C   s   t  |  _ t j |  ƒ 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_with.pyR   a   s    	c         G   s"   t  |  _ | |  _ t j |  | Œ S(   N(   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_with.pyR   e   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_with.pyR*   Z   s   		t   FailureTestCasec           B   sb   e  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   d „  } |  j  t | ƒ d  S(   Nc           S   s   t  � Wd  QXd  S(   N(   t   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_with.pyt   fooNotDeclaredm   s     (   t   assertRaisest	   NameError(   R   R-   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testNameErrorl   s    	c            s9   d t  f d „  ƒ  Y‰  ‡  f d †  } |  j t | ƒ d  S(   Nt
   LacksEnterc           B   s   e  Z d  „  Z RS(   c         S   s   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_with.pyR   s   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_with.pyR1   r   s   c             s   ˆ  ƒ  }  |  � Wd  QXd  S(   N(    (   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_with.pyt   fooLacksEnterv   s    	 (   t   objectR.   t   AttributeError(   R   R2   (    (   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_with.pyt   testEnterAttributeErrorq   s    c            s9   d t  f d „  ƒ  Y‰  ‡  f d †  } |  j t | ƒ d  S(   Nt	   LacksExitc           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_with.pyR   }   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_with.pyR6   |   s   c             s   ˆ  ƒ  }  |  � Wd  QXd  S(   N(    (   R,   (   R6   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   fooLacksExit€   s    	 (   R3   R.   R4   (   R   R7   (    (   R6   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testExitAttributeError{   s    c         C   s    d „  } |  j  t | | ƒ d  S(   Nc         S   s   t  |  d d ƒ d  S(   Nt    t   single(   t   compile(   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_with.pyt   shouldRaiseSyntaxError†   s    (   R.   t   SyntaxError(   R   t   codestrR=   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   assertRaisesSyntaxError…   s    	c         C   s   |  j  d ƒ |  j  d ƒ d  S(   Ns   with mock as None:
  passs   with mock as (None):
  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_with.pyt   testAssignmentToNoneErrorŠ   s    c         C   s   |  j  d ƒ d  S(   Ns   with mock as ():
  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_with.pyt   testAssignmentToEmptyTupleError�   s    c         C   s   |  j  d ƒ |  j  d ƒ d  S(   Ns   with mock as None,:
  passs   with mock as (None,):
  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_with.pyt,   testAssignmentToTupleOnlyContainingNoneError•   s    c         C   s   |  j  d ƒ d  S(   Ns%   with mock as (foo, None, bar):
  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_with.pyt(   testAssignmentToTupleContainingNoneError›   s    c            sO   d t  f d „  ƒ  Y‰  ‡  ‡ f d †  } ˆ j t | ƒ ˆ j ˆ j d  ƒ d  S(   Nt   EnterThrowsc           B   s   e  Z d  „  Z d „  Z RS(   c         S   s   t  d ƒ ‚ d  S(   Ns   Enter threw(   R"   (   R   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR   ¢   s    c         W   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_with.pyR   ¤   s    (   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_with.pyRE   ¡   s   	c             s(   ˆ  ƒ  }  d  ˆ _ |  �
 ˆ _ Wd  QXd  S(   N(   R	   R,   (   t   ct(   RE   R   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   shouldThrow§   s    		(   R3   R.   R"   t   assertEqualR,   R	   (   R   RG   (    (   RE   R   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testEnterThrows    s    c            s9   d t  f d „  ƒ  Y‰  ‡  f d †  } |  j t | ƒ d  S(   Nt
   ExitThrowsc           B   s   e  Z d  „  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_with.pyR   ±   s    c         W   s   t  d ƒ ‚ 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_with.pyR   ³   s    (   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_with.pyRJ   °   s   	c              s   ˆ  ƒ  � Wd  QXd  S(   N(    (    (   RJ   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   µ   s    
(   R3   R.   R"   (   R   RG   (    (   RJ   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testExitThrows¯   s    (   R   R   R0   R5   R8   R@   RA   RB   RC   RD   RI   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_with.pyR+   k   s   		
	
						t   ContextmanagerAssertionMixinc           B   s_   e  Z e d  ƒ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d	 d „ Z d „  Z RS(
   s   test exceptionc         C   s7   |  j  | j ƒ |  j | j ƒ |  j | j d  ƒ d  S(   N(   t
   assertTrueR   t   assertFalseR   RH   R
   R	   (   R   t   mock_manager(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   assertInWithManagerInvariants½   s    c         C   s7   |  j  | j ƒ |  j  | j ƒ |  j | j | ƒ d  S(   N(   RM   R   R   RH   R
   (   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_with.pyt    assertAfterWithManagerInvariantsÂ   s    c         C   s   |  j  | d ƒ d  S(   N(   NNN(   RQ   R	   (   R   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_with.pyt'   assertAfterWithManagerInvariantsNoErrorÇ   s    	c         C   s$   |  j  | j ƒ |  j | j ƒ d  S(   N(   RM   R   RN   R   (   R   t   mock_generator(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   assertInWithGeneratorInvariantsË   s    c         C   s$   |  j  | j ƒ |  j  | j ƒ d  S(   N(   RM   R   R   (   R   RS   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt)   assertAfterWithGeneratorInvariantsNoErrorÏ   s    c         C   s   |  j  ‚ d  S(   N(   t   TEST_EXCEPTION(   R   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   raiseTestExceptionÓ   s    c         C   s¡   |  j  | j ƒ |  j  | j ƒ | d  k rX |  j | j d |  j ƒ t |  j ƒ } n  |  j | j d | ƒ |  j | j d | ƒ |  j	 | j d d  ƒ d  S(   Ni   i    i   (
   RM   R   R   R	   RH   R
   RV   R   t   assertIsInstancet   assertIsNot(   R   RO   t   exc_type(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt)   assertAfterWithManagerInvariantsWithErrorÖ   s    c         C   s$   |  j  | j ƒ |  j  | j ƒ d  S(   N(   RM   R   R   (   R   RS   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt+   assertAfterWithGeneratorInvariantsWithErrorâ   s    N(   R   R   R"   RV   RP   RQ   RR   RT   RU   RW   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_with.pyRL   º   s   						t   NonexceptionalTestCasec           B   sG   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s   t  ƒ  � Wd  QXd  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_with.pyt   testInlineGeneratorSyntaxè   s    
c         C   s'   t  ƒ  } | � Wd  QX|  j | ƒ d  S(   N(   R   RR   (   R   R   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testUnboundGeneratorì   s    	c         C   s0   t  ƒ  � } |  j | ƒ Wd  QX|  j | ƒ d  S(   N(   R   RT   RU   (   R   R,   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testInlineGeneratorBoundSyntaxò   s    c         C   s6   d  } t ƒ  � } |  j | ƒ Wd  QX|  j | ƒ d  S(   N(   R	   R   RT   RU   (   R   R,   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt*   testInlineGeneratorBoundToExistingVariableø   s    c         C   s9   t  ƒ  � |  _ |  j |  j ƒ Wd  QX|  j |  j ƒ d  S(   N(   R   R,   RT   RU   (   R   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt(   testInlineGeneratorBoundToDottedVariableþ   s    c         C   sP   t  ƒ  } | �! } |  j | ƒ |  j | ƒ Wd  QX|  j | ƒ |  j | ƒ d  S(   N(   R   RT   RP   RU   RR   (   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_with.pyt   testBoundGenerator  s    		c      
   C   s¶   t  ƒ  } | �‡ } t  ƒ  } | �; } |  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ Wd  QX|  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ Wd  QX|  j | ƒ |  j | ƒ d  S(   N(   R   RP   RT   RR   RU   (   R   t   mock_aR,   t   mock_bt   bar(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testNestedSingleStatements  s    				(	   R   R   R^   R_   R`   Ra   Rb   Rc   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_with.pyR]   ç   s   						t   NestedNonexceptionalTestCasec           B   sG   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s   t  t ƒ  ƒ � Wd  QXd  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_with.pyt"   testSingleArgInlineGeneratorSyntax  s    c         C   s<   t  ƒ  } t | ƒ � } |  j | ƒ Wd  QX|  j | ƒ d  S(   N(   R   R   RP   RR   (   R   t   mR,   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testSingleArgBoundToNonTuple"  s    	c         C   s<   t  ƒ  } t | ƒ � } |  j | ƒ Wd  QX|  j | ƒ d  S(   N(   R   R   RP   RR   (   R   Rj   R,   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt2   testSingleArgBoundToSingleElementParenthesizedList*  s    	c         C   s   d „  } |  j  t | ƒ d  S(   Nc          S   s"   t  t ƒ  ƒ � \ }  } Wd  QXd  S(   N(   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_with.pyt   shouldThrowValueError3  s    (   R.   t
   ValueError(   R   Rm   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt-   testSingleArgBoundToMultipleElementTupleError2  s    	c         C   sZ   t  ƒ  } t | ƒ } | � |  j | ƒ |  j | ƒ Wd  QX|  j | ƒ |  j | ƒ d  S(   N(   R   R*   RP   RR   (   R   R   t   mock_nested(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testSingleArgUnbound8  s    	c         C   s¦   t  ƒ  } t  ƒ  } t  ƒ  } t | | | ƒ } | �9 |  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ Wd  QX|  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ d  S(   N(   R   R*   RP   RR   (   R   Rj   t   nt   oRp   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testMultipleArgUnboundA  s    			c         C   sŸ   t  t ƒ  t ƒ  t ƒ  ƒ } | �D \ } } } |  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ Wd  QX|  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ d  S(   N(   R*   R   RT   RP   RU   RR   (   R   Rp   Rj   Rr   Rs   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testMultipleArgBoundP  s    	(	   R   R   Ri   Rk   Rl   Ro   Rq   Rt   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_with.pyRh     s   							t   ExceptionalTestCasec           B   st   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 RS(   c            sL   t  ƒ  ‰  ‡  ‡ f d †  } ˆ j t | ƒ ˆ j ˆ  ƒ ˆ j ˆ j ƒ d  S(   Nc              s=   ˆ  �1 ˆ _  ˆ j ˆ  ƒ ˆ j ˆ j  ƒ ˆ j ƒ  Wd  QXd  S(   N(   t   resourceRP   RT   RW   (    (   t   cmR   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   a  s    (   R   R.   R"   R[   R\   Rw   (   R   RG   (    (   Rx   R   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testSingleResource_  s
    	c            s?   t  ƒ  ‰  ‡  ‡ f d †  } ˆ j t | ƒ ˆ j ˆ  t ƒ d  S(   Nc              s   ˆ  � ˆ _  d d Wd  QXd  S(   Ni   i    (   Rw   (    (   Rx   R   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   l  s    (   R   R.   t   ZeroDivisionErrorR[   (   R   RG   (    (   Rx   R   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testExceptionNormalizedj  s    	c            su   t  ƒ  ‰  t  ƒ  ‰ ‡  ‡ ‡ f d †  } ˆ j t | ƒ ˆ j ˆ  ƒ ˆ j ˆ ƒ ˆ j ˆ j ƒ ˆ j ˆ j ƒ d  S(   Nc        
      sl   ˆ  �` ˆ _  ˆ �N ˆ _ ˆ j ˆ  ƒ ˆ j ˆ ƒ ˆ j ˆ j  ƒ ˆ j ˆ j ƒ ˆ j ƒ  Wd  QXWd  QXd  S(   N(   R,   Rf   RP   RT   RW   (    (   Rd   Re   R   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   w  s    (   R   R.   R"   R[   R\   R,   Rf   (   R   RG   (    (   Rd   Re   R   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRg   t  s    		c            s”   t  ƒ  ‰  t  ƒ  ‰ t ˆ  ˆ ƒ ‰ ‡  ‡ ‡ ‡ f d †  } ˆ j t | ƒ ˆ j ˆ  ƒ ˆ j ˆ ƒ ˆ j ˆ ƒ ˆ j ˆ j ƒ ˆ j ˆ j ƒ d  S(   Nc              sp   ˆ �d \ ˆ _  ˆ _ ˆ j ˆ  ƒ ˆ j ˆ ƒ ˆ j ˆ ƒ ˆ j ˆ j  ƒ ˆ j ˆ j ƒ ˆ j ƒ  Wd  QXd  S(   N(   t
   resource_at
   resource_bRP   RT   RW   (    (   t   cm_at   cm_bRp   R   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   ‰  s    (   R   R*   R.   R"   R[   R\   R|   R}   (   R   RG   (    (   R~   R   Rp   R   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt&   testMultipleResourcesInSingleStatement…  s    		c            s§   t  ƒ  ‰  t  ƒ  ‰ d  ˆ _ ‡  ‡ ‡ f d †  } ˆ j t | ƒ ˆ j ˆ  ƒ ˆ j ˆ j ƒ ˆ j ˆ j d  ƒ ˆ j	 ˆ j
 ƒ ˆ j	 ˆ j ƒ ˆ j ˆ j d  ƒ d  S(   Nc        
      sO   ˆ  �C ˆ _  ˆ j ˆ  ƒ ˆ j ˆ j  ƒ ˆ j ƒ  ˆ �
 ˆ _ Wd  QXWd  QXd  S(   N(   R,   RP   RT   RW   Rf   (    (   Rd   Re   R   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   œ  s    
(   R   R	   Rf   R.   R"   R[   R\   R,   RH   RN   R   R   R
   (   R   RG   (    (   Rd   Re   R   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt'   testNestedExceptionBeforeInnerStatement˜  s    			c            su   t  ƒ  ‰  t  ƒ  ‰ ‡  ‡ ‡ f d †  } ˆ j t | ƒ ˆ j ˆ  ƒ ˆ j ˆ ƒ ˆ j ˆ j ƒ ˆ j ˆ j ƒ d  S(   Nc        
      sl   ˆ  �` ˆ _  ˆ �D ˆ _ ˆ j ˆ  ƒ ˆ j ˆ ƒ ˆ j ˆ j  ƒ ˆ j ˆ j ƒ Wd  QXˆ j ƒ  Wd  QXd  S(   N(   R,   Rf   RP   RT   RW   (    (   Rd   Re   R   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   °  s    (	   R   R.   R"   R[   RR   R\   R,   RU   Rf   (   R   RG   (    (   Rd   Re   R   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt&   testNestedExceptionAfterInnerStatement­  s    		c            s2   t  d „  ƒ ‰  ‡  f d †  } |  j t | ƒ d  S(   Nc           s   s	   d  Vd  S(   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_with.pyRx   À  s    c              s    ˆ  ƒ  � t  d ƒ ‚ Wd  QXd  S(   Ns	   from with(   t   StopIteration(    (   Rx   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   Ä  s    
(   R   R.   Rƒ   (   R   RG   (    (   Rx   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testRaisedStopIteration1¾  s    c            s9   d t  f d „  ƒ  Y‰  ‡  f d †  } |  j t | ƒ d  S(   NRx   c           B   s   e  Z d  „  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_with.pyR   Í  s    c         S   s   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_with.pyR   Ï  s    (   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_with.pyRx   Ì  s   	c              s    ˆ  ƒ  � t  d ƒ ‚ Wd  QXd  S(   Ns	   from with(   Rƒ   (    (   Rx   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   Ò  s    
(   R3   R.   Rƒ   (   R   RG   (    (   Rx   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testRaisedStopIteration2Ê  s    c            s2   t  d „  ƒ ‰  ‡  f d †  } |  j t | ƒ d  S(   Nc           s   s	   d  Vd  S(   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_with.pyRx   Û  s    c              s&   ˆ  ƒ  � t  g  ƒ j ƒ  ‚ Wd  QXd  S(   N(   t   itert   next(    (   Rx   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   ß  s    
(   R   R.   Rƒ   (   R   RG   (    (   Rx   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testRaisedStopIteration3Ø  s    c            s2   t  d „  ƒ ‰  ‡  f d †  } |  j t | ƒ d  S(   Nc           s   s	   d  Vd  S(   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_with.pyRx   ç  s    c              s    ˆ  ƒ  � t  d ƒ ‚ Wd  QXd  S(   Ns	   from with(   t   GeneratorExit(    (   Rx   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   ë  s    
(   R   R.   R‰   (   R   RG   (    (   Rx   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testRaisedGeneratorExit1å  s    c            s9   d t  f d „  ƒ  Y‰  ‡  f d †  } |  j t | ƒ d  S(   NRx   c           B   s   e  Z d  „  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_with.pyR   ô  s    c         S   s   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_with.pyR   ö  s    (   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_with.pyRx   ó  s   	c              s    ˆ  ƒ  � t  d ƒ ‚ Wd  QXd  S(   Ns	   from with(   R‰   (    (   Rx   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyRG   ù  s    
(   R3   R.   R‰   (   R   RG   (    (   Rx   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testRaisedGeneratorExit2ñ  s    c            sw   d t  f d „  ƒ  Y‰  ‡  ‡ f d †  } | ƒ  ‡  ‡ f d †  } ˆ j t | ƒ ‡  ‡ f d †  } ˆ j t | ƒ d  S(   NRx   c           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c            s)   d d ‡  f d †  ƒ  Y} | ƒ  |  _  d  S(   Nt   Boolc              s   e  Z ‡  f d  †  Z RS(   c            s   ˆ  ƒ  S(   N(    (   R   (   t   bool_conversion(    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   __nonzero__  s    (   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_with.pyRŒ     s   (    (   t   exit_result(   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_with.pyR     s    c         S   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_with.pyR   	  s    c         S   s   |  j  S(   N(   R�   (   R   t   at   bt   c(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR     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_with.pyRx     s   		c              s'   ˆ  d „  ƒ � ˆ j  d ƒ Wd  QXd  S(   Nc           S   s   t  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_with.pyt   <lambda>  R9   s   Should NOT see this(   t   fail(    (   Rx   R   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt
   trueAsBool  s    c              s'   ˆ  d „  ƒ � ˆ j  d ƒ Wd  QXd  S(   Nc           S   s   t  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_with.pyR“     R9   s   Should raise(   R”   (    (   Rx   R   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   falseAsBool  s    c              s'   ˆ  d „  ƒ � ˆ j  d ƒ Wd  QXd  S(   Nc           S   s   d d S(   Ni   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_with.pyR“     R9   s   Should NOT see this(   R”   (    (   Rx   R   (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt
   failAsBool  s    (   R3   R.   t   AssertionErrorRz   (   R   R•   R–   R—   (    (   Rx   R   s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testErrorsInBoolÿ  s    (   R   R   Ry   R{   Rg   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_with.pyRv   ^  s   		
									t   NonLocalFlowControlTestCasec           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   sV   d } x9 t  rA | d 7} t ƒ  � | d 7} PWd  QX| d 7} q	 W|  j | d ƒ d  S(   Ni    i   i
   id   i   (   R   R   RH   (   R   t   counter(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testWithBreak   s    	


c         C   sh   d } xK t  rS | d 7} | d k r) Pn  t ƒ  � | d 7} w	 Wd  QX| d 7} q	 W|  j | d ƒ d  S(   Ni    i   i   i
   id   i   (   R   R   RH   (   R   R›   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testWithContinue*  s    	


	c         C   s    d „  } |  j  | ƒ  d ƒ d  S(   Nc          S   sI   d }  x< t  rD |  d 7}  t ƒ  � |  d 7}  |  SWd  QX|  d 7}  q	 Wd  S(   Ni    i   i
   id   (   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_with.pyR,   7  s    	



i   (   RH   (   R   R,   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testWithReturn6  s    	c         C   s2   d „  } t  | ƒ  ƒ } |  j | d d g ƒ d  S(   Nc           s   s   t  ƒ  � d Vd VWd  QXd  S(   Ni   i   (   R   (    (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR   B  s    
i   i   (   t   listRH   (   R   R   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_with.pyt   testWithYieldA  s    	c         C   ss   d } y8 | d 7} t  ƒ  � | d 7} t ‚ Wd  QX| d 7} Wn! t k
 ra |  j | d ƒ n X|  j d ƒ d  S(   Ni    i   i
   id   i   s   Didn't raise RuntimeError(   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_with.pyt   testWithRaiseI  s    


(   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_with.pyRš     s
   	
			t   AssignmentTargetTestCasec           B   s   e  Z d  „  Z d „  Z RS(   c         C   sH  i d d d g d 6} t  ƒ  �C | d d <|  j | j ƒ  d g ƒ |  j | d d j t ƒ Wd  QXt  ƒ  �I | j ƒ  d d <|  j | j ƒ  d g ƒ |  j | d d j t ƒ Wd  QXt  ƒ  �7 | d <| j ƒ  } | j ƒ  |  j | d d g ƒ Wd  QXd d d „  ƒ  Y} | ƒ  } t  ƒ  �# | _ |  j t | d ƒ t	 ƒ Wd  QXd  S(   Ni    i   i   t   Cc           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_with.pyR¤   e  s    R,   (    (
   R   RH   t   keyst	   __class__R   t   valuest   sortR,   t   hasattrR   (   R   t   targetsR¥   R¤   t   blah(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testSingleComplexTargetY  s    !!
	c         C   sª  d d	 d „  ƒ  Y} i d d d g d 6} | ƒ  �H \ | d d <| d d <| d d <|  j  | i d d d g d 6ƒ Wd  QX| ƒ  �Z \ | j ƒ  d d <| j ƒ  d d <| j ƒ  d d <|  j  | i d d d g d 6ƒ Wd  QX| ƒ  �A \ | d <| d <| d <|  j  | i d d 6d d 6d d 6ƒ Wd  QXd d
 d „  ƒ  Y} | ƒ  } | ƒ  �R \ | _ | _ | _ |  j  | j d ƒ |  j  | j d ƒ |  j  | j d ƒ Wd  QXd  S(   NR¤   c           B   s   e  Z d  „  Z d „  Z RS(   c         S   s   d S(   Ni   i   i   (   i   i   i   (    (   R   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR   l  R9   c         S   s   d  S(   N(    (   R   t   tt   vt   tb(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyR   m  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_with.pyR¤   k  s   	i    i   i   i   t   Bc           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_with.pyR°   u  s    (    (    (   RH   R§   t   onet   twot   three(   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_with.pyt   testMultipleComplexTargetsj  s    -&?&!+	(   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_with.pyR£   W  s   	t   ExitSwallowsExceptionTestCasec           B   s   e  Z d  „  Z d „  Z RS(   c         C   sT   d d d „  ƒ  Y} y | ƒ  � d d Wd  QXWn t  k
 rO |  j d ƒ n Xd  S(   Nt   AfricanSwallowc           B   s   e  Z d  „  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_with.pyR   �  R9   c         S   s   t  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_with.pyR   ‚  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_with.pyR¶   €  s   	i   i    s,   ZeroDivisionError should have been swallowed(    (   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_with.pyt   testExitTrueSwallowsException  s    
c         C   sT   d d d „  ƒ  Y} y | ƒ  � d d Wd  QXWn t  k
 rB n X|  j d ƒ d  S(   Nt   EuropeanSwallowc           B   s   e  Z d  „  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_with.pyR   ‹  R9   c         S   s   t  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_with.pyR   Œ  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_with.pyR¸   Š  s   	i   i    s)   ZeroDivisionError should have been raised(    (   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_with.pyt#   testExitFalseDoesntSwallowException‰  s    
(   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_with.pyRµ   }  s   	
t
   NestedWithc           B   s�   e  Z d  e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d „  Z d	 „  Z d
 „  Z	 d „  Z
 d „  Z RS(   t   Dummyc           B   s)   e  Z d e d  „ Z d „  Z d „  Z RS(   c         C   s=   | d  k r |  } n  | |  _ | |  _ t |  _ t |  _ d  S(   N(   R	   R   t   gobbleR   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_with.pyR   ™  s    				c         C   s   t  |  _ |  j 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_with.pyR   ¡  s    	c         G   s#   t  |  _ | |  _ |  j r t  Sd  S(   N(   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_with.pyR   ¥  s    			N(   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_with.pyR»   ˜  s   	t
   InitRaisesc           B   s   e  Z d  „  Z RS(   c         C   s   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_with.pyR   ¬  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_with.pyR½   «  s   t   EnterRaisesc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s   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_with.pyR   ¯  R9   c         G   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_with.pyR   °  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_with.pyR¾   ®  s   	t
   ExitRaisesc           B   s   e  Z d  „  Z d „  Z RS(   c         C   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_with.pyR   ³  R9   c         G   s   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_with.pyR   ´  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_with.pyR¿   ²  s   	c      
   C   sn   |  j  ƒ  �< } |  j  ƒ  �' } |  j | j ƒ |  j | j ƒ Wd  QXWd  QX|  j | j ƒ |  j | j ƒ d  S(   N(   R»   RM   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_with.pyt   testNoExceptions¶  s     c      	   C   sZ   y, |  j  ƒ  � } |  j ƒ  � Wd  QXWd  QXWn n X|  j | j ƒ |  j | j ƒ d  S(   N(   R»   R½   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_with.pyt   testExceptionInExprList½  s     c      
   C   s~   y9 |  j  ƒ  �' } |  j ƒ  � |  j d ƒ Wd  QXWd  QXWn t k
 rL n X|  j d ƒ |  j | j ƒ |  j | j ƒ d  S(   Ns   body of bad with executeds   RuntimeError not reraised(   R»   R¾   R”   R"   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_with.pyt   testExceptionInEnterÆ  s     c      	   C   s‚   t  } |  j d t ƒ �  } |  j ƒ  � t } Wd  QXWd  QX|  j | j ƒ |  j | j ƒ |  j | ƒ |  j | j d d  ƒ d  S(   NR¼   i    (
   R   R»   R   R¿   RM   R   R   t   assertNotEqualR&   R	   (   R   t   body_executedR�   (    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testExceptionInExitÑ  s     c         C   s†   |  j  d d ƒ �n \ } } |  j  d d ƒ �M \ } } |  j d | ƒ |  j d | ƒ |  j d | ƒ |  j d | ƒ Wd  QXWd  QXd  S(   NR   i   i   i
   i   (   i   i   (   i
   i   (   R»   RH   (   R   t   a1t   a2t   b1t   b2(    (    s„   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_with.pyt   testEnterReturnsTupleÚ  s    (   R   R   R3   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_with.pyRº   –  s   						c        	   C   s#   t  t t t t t t t t ƒ d  S(   N(	   R   R+   R]   Rh   Rv   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_with.pyt	   test_mainâ  s    	t   __main__(   t   __doc__t
   __author__t	   __email__R%   t   unittestt   collectionsR    t
   contextlibR   R   t   test.test_supportR   R   R   R3   R   R   R   R*   t   TestCaseR+   RL   R]   Rh   Rv   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_with.pyt   <module>   s4   	
$O-5	AÀ9&L		