ó
ŠwÛjc           @   sd   d  d l  Z  d  d l m Z d  d l Z d e  j f d „  ƒ  YZ d „  Z e d k r` e ƒ  n  d S(   iÿÿÿÿN(   t   test_supportt   ComplexArgsTestCasec           B   sk   e  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         G   s   |  j  | | Œ  | ƒ d  S(   N(   t   assertEqual(   t   selft   funct   expectedt   args(    (    sŒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_complex_args.pyt   check   s    c         B   s   e  j d ƒ d  Ud  S(   Ns¶   
        def f(((((x))))): return x
        self.check(f, 1, 1)
        # Inner parens are elided, same as: f(x,)
        def f(((x)),): return x
        self.check(f, 2, 2)
        (   t   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_complex_args.pyt   test_func_parens_no_unpacking   s    c         B   s   e  j d ƒ d  Ud  S(   Ns  
        def f(((((x),)))): return x
        self.check(f, 3, (3,))
        def f(((((x)),))): return x
        self.check(f, 4, (4,))
        def f(((((x))),)): return x
        self.check(f, 5, (5,))
        def f(((x),)): return x
        self.check(f, 6, (6,))
        (   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_complex_args.pyt   test_func_1   s    	c         B   s   e  j d ƒ d  Ud  S(   NsP   
        def f(((((x)),),)): return x
        self.check(f, 2, ((2,),))
        (   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_complex_args.pyt   test_func_2&   s    c         B   s   e  j d ƒ d  Ud  S(   NsV   
        def f((((((x)),),),)): return x
        self.check(f, 3, (((3,),),))
        (   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_complex_args.pyt   test_func_3,   s    c         B   s   e  j d ƒ d  Ud  S(   Nsh  
        def f((((((x)),),),), a, b, c): return x, a, b, c
        self.check(f, (3, 9, 8, 7), (((3,),),), 9, 8, 7)

        def f(((((((x)),)),),), a, b, c): return x, a, b, c
        self.check(f, (3, 9, 8, 7), (((3,),),), 9, 8, 7)

        def f(a, b, c, ((((((x)),)),),)): return a, b, c, x
        self.check(f, (9, 8, 7, 3), 9, 8, 7, (((3,),),))
        (   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_complex_args.pyt   test_func_complex2   s    	c         B   s   e  j d ƒ d  Ud  S(   Ns²   
        f = lambda (((((x))))): x
        self.check(f, 1, 1)
        # Inner parens are elided, same as: f(x,)
        f = lambda ((x)),: x
        self.check(f, 2, 2)
        (   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_complex_args.pyt   test_lambda_parens_no_unpackingA   s    c         B   s   e  j d ƒ d  Ud  S(   Ns  
        f = lambda (((((x),)))): x
        self.check(f, 3, (3,))
        f = lambda (((((x)),))): x
        self.check(f, 4, (4,))
        f = lambda (((((x))),)): x
        self.check(f, 5, (5,))
        f = lambda (((x),)): x
        self.check(f, 6, (6,))
        (   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_complex_args.pyt   test_lambda_1J   s    	c         B   s   e  j d ƒ d  Ud  S(   NsO   
        f = lambda (((((x)),),)): x
        self.check(f, 2, ((2,),))
        (   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_complex_args.pyt   test_lambda_2V   s    c         B   s   e  j d ƒ d  Ud  S(   NsU   
        f = lambda ((((((x)),),),)): x
        self.check(f, 3, (((3,),),))
        (   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_complex_args.pyt   test_lambda_3\   s    c         B   s   e  j d ƒ d  Ud  S(   Nse  
        f = lambda (((((x)),),),), a, b, c: (x, a, b, c)
        self.check(f, (3, 9, 8, 7), (((3,),),), 9, 8, 7)

        f = lambda ((((((x)),)),),), a, b, c: (x, a, b, c)
        self.check(f, (3, 9, 8, 7), (((3,),),), 9, 8, 7)

        f = lambda a, b, c, ((((((x)),)),),): (a, b, c, x)
        self.check(f, (9, 8, 7, 3), 9, 8, 7, (((3,),),))
        (   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_complex_args.pyt   test_lambda_complexb   s    	(   t   __name__t
   __module__R   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_complex_args.pyR      s   													c           C   s6   t  j d t f d t f ƒ � t  j t ƒ Wd  QXd  S(   Ns*   tuple parameter unpacking has been removeds(   parenthesized argument names are invalid(   R    t   check_py3k_warningst   SyntaxWarningt   run_unittestR   (    (    (    sŒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_complex_args.pyt	   test_maino   s    	t   __main__(   t   unittestt   testR    R   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_complex_args.pyt   <module>   s   i	