ó
Œ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 m Z e j	 d ƒ Z
 d  d l Z d  d l m Z d  d l
 m Z y d  d l m Z m Z Wn e k
 rË e j Z Z n Xe e e e
 j j d ƒ ƒ ƒ Z e a d	 „  Z d
 e  j f d „  ƒ  YZ d e  j f d „  ƒ  YZ e j  d k rCd n d Z! d e  j f d „  ƒ  YZ" d „  Z# d „  Z$ e% d k rŠe$ ƒ  n  d S(   iÿÿÿÿN(   t   test_support(   t   Popent   PIPEt   _tkinter(   t   Tcl(   t   TclError(   t   INT_MAXt   PY_SSIZE_T_MAXt   .c          C   sÖ   t  d  k rÒ t ƒ  }  |  j d d ƒ } t j d | ƒ } | j ƒ  \ } } } } t | ƒ t | ƒ t | ƒ } } } i d d 6d d 6d d	 6| } | d k rº | | | | d
 f a  qÒ | | d
 | | f a  n  t  S(   Nt   infot
   patchlevels   (\d+)\.(\d+)([ab.])(\d+)$t   alphat   at   betat   bt   finalR   i    (   t   _tk_patchlevelt   NoneR   t   callt   ret   matcht   groupst   int(   t   tclR
   t   mt   majort   minort   releaselevelt   serial(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_tcl.pyt   get_tk_patchlevel   s    	&t   TkinterTestc           B   s   e  Z d  „  Z RS(   c         C   s   |  j  t t j t ƒ d  S(   N(   t   assertRaisest	   TypeErrorR   t   _flattent   True(   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_tcl.pyt   testFlattenLen)   s    (   t   __name__t
   __module__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_tcl.pyR   '   s   t   TclTestc           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 d „  Z d „  Z d „  Z d „  Z d „  Z e j e j d k d ƒ d „  ƒ Z d „  Z d „  Z  d „  Z! d „  Z" e j e# d* k d! ƒ d" „  ƒ Z$ d# „  Z% d$ „  Z& d% „  Z' d& „  Z( d' „  Z) d( „  Z* d) „  Z+ RS(+   c         C   s%   t  ƒ  |  _ |  j j j ƒ  |  _ d  S(   N(   R   t   interpt   tkt   wantobjects(   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_tcl.pyt   setUp0   s    c         C   s3   |  j  } | j d ƒ |  j | j d ƒ d ƒ d  S(   Ns   set a 1s   set at   1(   R(   t   evalt   assertEqual(   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_tcl.pyt   testEval4   s    	c         C   s#   |  j  } |  j t | j d ƒ d  S(   Ns   set a(   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_tcl.pyt   testEvalException9   s    	c         C   s#   |  j  } |  j t | j d ƒ d  S(   Ns   this is wrong(   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_tcl.pyt   testEvalException2=   s    	c         C   s<   |  j  } | j d d d ƒ |  j | j d d ƒ d ƒ d  S(   Nt   setR   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_tcl.pyt   testCallA   s    	c         C   s&   |  j  } |  j t | j d d ƒ d  S(   NR2   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_tcl.pyt   testCallExceptionF   s    	c         C   s)   |  j  } |  j t | j d d d ƒ d  S(   Nt   thist   ist   wrong(   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_tcl.pyt   testCallException2J   s    	c         C   s6   |  j  } | j d d ƒ |  j | j d ƒ d ƒ d  S(   NR   R,   s   set a(   R(   t   setvarR.   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_tcl.pyt
   testSetVarN   s    	c         C   s6   |  j  } | j d d ƒ |  j | j d ƒ d ƒ d  S(   Ns   a(1)R,   s   set a(1)(   R(   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_tcl.pyt   testSetVarArrayS   s    	c         C   s3   |  j  } | j d ƒ |  j | j d ƒ d ƒ d  S(   Ns   set a 1R   R,   (   R(   R-   R.   t   getvar(   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_tcl.pyt
   testGetVarX   s    	c         C   s3   |  j  } | j d ƒ |  j | j d ƒ d ƒ d  S(   Ns
   set a(1) 1s   a(1)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_tcl.pyt   testGetVarArray]   s    	c         C   s#   |  j  } |  j t | j d ƒ d  S(   NR   (   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_tcl.pyt   testGetVarExceptionb   s    	c         C   s#   |  j  } |  j t | j d ƒ d  S(   Ns   a(1)(   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_tcl.pyt   testGetVarArrayExceptionf   s    	c         C   s\   |  j  } | j d d ƒ |  j | j d ƒ d ƒ | j d ƒ |  j | j d ƒ d ƒ d  S(   NR   i   s   info exists aR,   t   0(   R(   R9   R.   R-   t   unsetvar(   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_tcl.pyt   testUnsetVarj   s
    	c         C   sž   |  j  } | j d d ƒ | j d d ƒ |  j | j d ƒ d ƒ |  j | j d ƒ d ƒ | j d ƒ |  j | j d ƒ d ƒ |  j | j d ƒ d ƒ d  S(	   Ns   a(1)i   s   a(2)i   s   info exists a(1)R,   s   info exists a(2)RA   (   R(   R9   R.   R-   RB   (   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_tcl.pyt   testUnsetVarArrayq   s    	c         C   s#   |  j  } |  j t | j d ƒ d  S(   NR   (   R(   R   R   RB   (   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_tcl.pyt   testUnsetVarException{   s    	c         C   s…   d d d d d f } t  d k r: | d d d d f 7} n  t ƒ  d k sh d t ƒ  k oc d k  n r� | d d  d! d# f 7} n  | S($   Ni    i   iÿÿÿÿi   i   i   i   i?   i   R   i   iè  I   €    iÿÿÿI   €    i   €(   i   i   I   €    I   €    i   €Iÿÿÿÿÿÿÿl            l   ÿÿÿÿ l            lûÿÿÿ         (   i   i   i    R   (   i   i   i   (   i   i   l            l            lûÿÿÿ         lûÿÿÿ        lC                                                                                                                                        lC                                                                                                                                        l½ÿÿÿ                                                                                                                                     (   t   tcl_versionR   (   R#   t   integers(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_tcl.pyt   get_integers   s    c         C   sà  |  j  j } x¾ |  j ƒ  D]° } | j d | ƒ } |  j | | ƒ |  j | t t | ƒ ƒ ƒ t d k r� |  j | j d j	 | ƒ ƒ | ƒ n  |  j | j d | ƒ | ƒ |  j | j d | ƒ | ƒ q Wt d k  rø |  j
 t | j t d ƒ ƒ n  |  j | j d	 ƒ d	 ƒ |  j
 t | j ƒ |  j
 t | j d
 d ƒ |  j
 t | j d ƒ |  j
 t | j d ƒ |  j
 t t t f | j d ƒ t j rÜ|  j | j t d
 ƒ ƒ d	 ƒ |  j
 t t t f | j d
 t d ƒ ƒ n  d  S(   Ns    %d i   i   s    {:#o} s    %#o s    %#x i   iè  i*   t   42t   10g      E@R   s   42 i Ø  (   i   i   (   i   i   lC                                                                                                                                        (   R(   R)   RH   t   getintR.   t   assertIsInstancet   typeR   RF   t   formatR   R   t   strR    t
   ValueErrorR    t   have_unicodet   unicodet   UnicodeEncodeErrort   unichr(   R#   R   t   it   result(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_tcl.pyt   test_getint‰   s,    %!	c         C   s&  |  j  j } |  j | j d ƒ d ƒ |  j | j d ƒ d ƒ |  j | j d ƒ d ƒ |  j t | j ƒ |  j t | j d d ƒ |  j t | j d ƒ |  j t | j d ƒ |  j t t t f | j d	 ƒ t j	 r"|  j | j t
 d ƒ ƒ d ƒ |  j t t t f | j d t d
 ƒ ƒ n  d  S(   Ns    42 g      E@s    42.5 g     @E@s   42.5RJ   i*   R   s   42.5 i Ø  (   R(   R)   R.   t	   getdoubleR   R    R   RP   R    RQ   RR   RS   RT   (   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_tcl.pyt   test_getdouble¡   s    	c         C   s£  |  j  j } |  j | j d ƒ t ƒ |  j | j d ƒ t ƒ |  j | j d ƒ t ƒ |  j | j d ƒ t ƒ |  j | j d ƒ t ƒ |  j | j d ƒ t ƒ |  j | j d ƒ t ƒ |  j | j d ƒ t ƒ |  j t | j ƒ |  j t | j d d ƒ |  j t | j d	 ƒ |  j t | j d
 ƒ |  j t t	 t f | j d ƒ t
 j rŸ|  j | j t d ƒ ƒ t ƒ |  j t t	 t f | j d t d ƒ ƒ n  d  S(   Nt   onR,   u   onu   1i*   i    l   * l    g      ð?R   s   on i Ø  (   R(   R)   t   assertIst
   getbooleanR"   t   FalseR   R    R   RP   R    RQ   RR   RS   RT   (   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_tcl.pyt   test_getboolean±   s&    	c         C   s¤   |  j  } d } t | d ƒ } d } | j | ƒ | j ƒ  | j | ƒ t j | ƒ |  j | j d ƒ d ƒ |  j | j d ƒ d ƒ |  j | j d ƒ d	 ƒ d  S(
   Ns   testEvalFile.tclt   ws?   set a 1
        set b 2
        set c [ expr $a + $b ]
        s   set aR,   s   set bt   2s   set ct   3(	   R(   t   opent   writet   closet   evalfilet   ost   removeR.   R-   (   R#   R   t   filenamet   fdt   script(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_tcl.pyt   testEvalFileÆ   s    	
c         C   s�   |  j  } t t j d ƒ �* } |  j t j t j ƒ | j d ƒ Wd  QX| j t j ƒ |  j | j	 d ƒ d ƒ |  j | j	 d ƒ d ƒ d  S(   Nt   wbs>   
            set a "a b"
            set b "a\0b"
            s   set as   aÀ€bs   set b(
   R(   Rb   R    t   TESTFNt
   addCleanupt   unlinkRc   Re   R.   R-   (   R#   R   t   f(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_tcl.pyt   test_evalfile_null_in_resultÖ   s    	c         C   sP   |  j  } d } y t j | ƒ Wn t k
 r5 } n X|  j t | j | ƒ d  S(   Nt   doesnotexists(   R(   Rf   Rg   t	   ExceptionR   R   Re   (   R#   R   Rh   t   e(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_tcl.pyt   testEvalFileExceptionâ   s    	c         C   s#   |  j  } |  j t | j d ƒ d  S(   Ns   package require DNE(   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_tcl.pyt   testPackageRequireExceptionë   s    	t   win32s   only applies to Windowsc   
      C   sS  t  j j t j ƒ } | d d k r9 |  j d | ƒ n  d t  j d | d | d f } t j ƒ  �æ } | j	 d ƒ d	 | f } y t
 | d
 t d t ƒ} WnD t k
 ræ } | j d k sÐ | j d k rà |  j d ƒ qç ‚  n X| j ƒ  \ } } d j d d | d | d | g ƒ }	 |  j d | |	 ƒ |  j | j ƒ  d d ƒ Wd  QXd  S(   Ni   t   :s   unusable path: %rs   \\%s\%s$\%st   COMPUTERNAMEi    i   t   TCL_LIBRARYs%   %s -c "import Tkinter; print Tkinter"t   stdoutt   stderri   i   s(   Not permitted to start the child processs   

s   "Tkinter.py" not in outputs   Command:s   stdout:s   stderr:s
   Tkinter.pys   Non-zero exit code(   Rf   t   patht   abspatht   syst
   executablet   skipTestt   environR    t   EnvironmentVarGuardt   unsetR   R   t   WindowsErrort   winerrort   communicatet   joint   assertInR.   t   wait(
   R#   t   fullnamet   unc_namet   envt   cmdt   pRt   t   out_datat   err_datat   msg(    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_tcl.pyt   testLoadWithUNCï   s,    	c            s   ˆ  j  ‰ ˆ j d d d ƒ ˆ j d d d ƒ ‡  ‡ f d †  } ˆ  j t ˆ j ƒ ˆ  j t ˆ j d d ƒ ˆ  j t ˆ j d	 ƒ | d
 d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d  d! ƒ | d" d! ƒ | d# d$ ƒ | d% d& ƒ | d' d& ƒ | d( d) ƒ t d/ k rœ| d, t d0 ƒ ƒ n  d  S(1   NR2   R   i   R   i   c            s3   ˆ j  |  ƒ } ˆ  j | | ƒ ˆ  j | t ƒ d  S(   N(   t
   exprstringR.   RL   RO   (   t   exprt   expectedRV   (   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_tcl.pyt   check  s    s   8.2s   +6t   spamt    RA   s   8.2 + 6s   14.2s   3.1 + $as   6.1s   2 + "$a.$b"s   5.6s   4*[llength "6 2"]t   8s   {word one} < "word $a"s   4*2 < 7s   hypot($a, 4)s   5.0s   5 / 4R,   s   5 / 4.0s   1.25s$   5 / ( [string length "abcd"] + 0.0 )s   20.0/5.0s   4.0s   "0x03" > "2"s   [string length "aÂ½â‚¬"]Ra   s   [string length "a\xbd\u20ac"]s   "abc"t   abcs   "aÂ½â‚¬"s   aÂ½â‚¬s   "a\xbd\u20ac"s   "a\0b"s   aÀ€bi   i   s   2**64i   i@   (   i   i   l            (   R(   R   R   R    R”   R   RF   RO   (   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_tcl.pyt   test_exprstring  s8    	c            s‚  ˆ  j  ‰ ˆ j d d d ƒ ˆ j d d d ƒ ‡  ‡ f d †  } ˆ  j t ˆ j ƒ ˆ  j t ˆ j d d ƒ ˆ  j t ˆ j d	 ƒ | d
 d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d  d! ƒ | d" d! ƒ ˆ  j t ˆ j d# ƒ t d) k r~| d& t d* ƒ ƒ n  d  S(+   NR2   R   i   R   i   c            s3   ˆ j  |  ƒ } ˆ  j | | ƒ ˆ  j | t ƒ d  S(   N(   t
   exprdoubleR.   RL   t   float(   R•   R–   RV   (   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_tcl.pyR—   :  s    s   8.2s   +6R˜   R™   g        s   8.2 + 6gffffff,@s   3.1 + $agffffff@s   2 + "$a.$b"gffffff@s   4*[llength "6 2"]g       @s   {word one} < "word $a"s   4*2 < 7s   hypot($a, 4)g      @s   5 / 4g      ð?s   5 / 4.0g      ô?s$   5 / ( [string length "abcd"] + 0.0 )s   20.0/5.0g      @s   "0x03" > "2"s   [string length "aÂ½â‚¬"]g      @s   [string length "a\xbd\u20ac"]s   "abc"i   i   s   2**64i   i@   (   i   i   l            (   R(   R   R   R    R�   R   RF   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_tcl.pyt   test_exprdouble6  s2    	c            s…  ˆ  j  ‰ ˆ j d d d ƒ ˆ j d d d ƒ ‡  ‡ f d †  } ˆ  j t ˆ j ƒ ˆ  j t ˆ j d d ƒ ˆ  j t ˆ j d	 ƒ | d
 d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ | d d ƒ ˆ  j t ˆ j d ƒ t d! k r�ˆ  j t ˆ j d  ƒ n  d  S("   NR2   R   i   R   i   c            s3   ˆ j  |  ƒ } ˆ  j | | ƒ ˆ  j | t ƒ d  S(   N(   t   exprlongR.   RL   R   (   R•   R–   RV   (   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_tcl.pyR—   Y  s    s   8.2s   +6R˜   R™   i    s   8.2 + 6i   s   3.1 + $as   2 + "$a.$b"i   s   4*[llength "6 2"]i   s   {word one} < "word $a"s   4*2 < 7s   hypot($a, 4)s   5 / 4i   s   5 / 4.0s$   5 / ( [string length "abcd"] + 0.0 )s   20.0/5.0i   s   "0x03" > "2"s   [string length "aÂ½â‚¬"]s   [string length "a\xbd\u20ac"]s   "abc"s   2**64(   i   i   (   R(   R   R   R    R    R   RF   (   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_tcl.pyt   test_exprlongU  s2    	c            sü  ˆ  j  ‰ ˆ j d d d ƒ ˆ j d d d ƒ ‡  ‡ f d †  } ˆ  j t ˆ j ƒ ˆ  j t ˆ j d d ƒ ˆ  j t ˆ j d	 ƒ | d
 t ƒ x= d' D]5 } | | t ƒ | d | t ƒ | d | t ƒ q— Wx= d( D]5 } | | t ƒ | d | t ƒ | d | t ƒ q× W| d t ƒ | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d  t ƒ | d! t ƒ | d" t ƒ ˆ  j t ˆ j d# ƒ t d) k rø| d& t ƒ n  d  S(*   NR2   R   i   R   i   c            sC   ˆ j  |  ƒ } ˆ  j | | ƒ ˆ  j | t ƒ ˆ  j | t ƒ d  S(   N(   t   exprbooleanR.   RL   R   t   assertNotIsInstancet   bool(   R•   R–   RV   (   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_tcl.pyR—   x  s    s   8.2s   +6R˜   R™   RA   t   falset   not   offs   "%s"s   {%s}R,   t   truet   yesRZ   s   8.2 + 6s   3.1 + $as   2 + "$a.$b"s   4*[llength "6 2"]s   {word one} < "word $a"s   4*2 < 7s   hypot($a, 4)s   5 / 4s   5 / 4.0s$   5 / ( [string length "abcd"] + 0.0 )s   20.0/5.0s   "0x03" > "2"s   [string length "aÂ½â‚¬"]s   [string length "a\xbd\u20ac"]s   "abc"i   i   s   2**64(   RA   R¥   R¦   R§   (   R,   R¨   R©   RZ   (   i   i   (	   R(   R   R   R    R¢   R   R]   R"   RF   (   R#   R—   t   value(    (   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_tcl.pyt   test_exprbooleant  sB    	i   i   s   requires Tcl version >= 8.5c            s‡   ˆ  j  ‰ ‡  ‡ f d †  } | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d t ƒ | d	 t ƒ d  S(
   Nc            sw   ˆ j  d |  ƒ } ˆ j ƒ  rA ˆ  j | | ƒ ˆ  j | t ƒ n2 ˆ  j | |  t t | ƒ ƒ f ƒ ˆ  j | t ƒ d  S(   NR•   (   R   R*   R.   RL   R   R‰   RO   (   R•   R–   RV   (   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_tcl.pyR—   Ÿ  s    "R¨   R©   RZ   R¥   R¦   R§   s   1 < 2s   1 > 2(   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_tcl.pyt   test_booleansœ  s    	c         C   sç   |  j  } x© |  j ƒ  D]› } | j d t | ƒ ƒ } |  j r‹ |  j | | ƒ |  j | t t f ƒ t	 | ƒ d k  r± |  j | t ƒ q± q |  j | t | ƒ ƒ |  j | t ƒ q Wt
 d k  rã |  j t | j d t d	 ƒ ƒ n  d  S(
   NR•   i   i   i   i   iè  I   €    (   i   i   lC                                                                                                                                        (   R(   RH   R   RO   R*   R.   RL   R   t   longt   absRF   R   R   (   R#   R   RU   RV   (    (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_tcl.pyt   test_expr_bignum°  s    		c      	      sA  ‡  f d †  } ˆ  j  | t ƒ ˆ  j r- t n d ƒ ˆ  j  | t ƒ ˆ  j rR t n d ƒ ˆ  j  | d ƒ d ƒ ˆ  j  | d ƒ d ƒ ˆ  j  | d ƒ d ƒ ˆ  j  | d ƒ d ƒ ˆ  j  | d	 ƒ d	 ƒ ˆ  j  | d ƒ d ƒ ˆ  j  | d
 ƒ d
 ƒ ˆ  j  | d ƒ d
 ƒ ˆ  j  | d ƒ d ƒ ˆ  j  | d ƒ d ƒ ˆ  j  | d ƒ d ƒ x? ˆ  j ƒ  D]1 } ˆ  j  | | ƒ ˆ  j r|| n	 t | ƒ ƒ qXWt d k  r¸ˆ  j  | d ƒ t d  ƒ ƒ n  x… d d d d! d d t j j	 t j j
 t j j	 t j j
 f	 D]D } ˆ  j r ˆ  j  | | ƒ | ƒ qøˆ  j  t | | ƒ ƒ | ƒ qøWˆ  j r´| t d ƒ ƒ } ˆ  j | | ƒ ˆ  j  | t d ƒ ƒ t d ƒ ƒ ˆ  j  | t d ƒ ƒ t d ƒ ƒ nR ˆ  j  t | t d ƒ ƒ ƒ t d ƒ ƒ ˆ  j  t | t d ƒ ƒ ƒ t d ƒ ƒ ˆ  j  | d d d" f ƒ ˆ  j r6d d d# f n d ƒ d  S($   Nc            s   ˆ  j  j d d |  ƒ S(   NR2   t   _(   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_tcl.pyt	   passValueÀ  s    R,   RA   t   strings   string½s	   stringâ‚¬u	   stringâ‚¬u   stringu   stringÂ½s   str ings   strÀ€ingu   str ingu	   str ingÂ½u
   str ingâ‚¬i   i   i   iè  g        g      ð?g      ð¿i   i   g      @t   nant   infR`   g333333@s   1 2 3.4(   i   i   lC                                                                                                                                        lC                                                                                                                                        i    (   g333333@(   g333333@(   R.   R"   R*   R]   RH   RO   RF   R   t
   float_infot   mint   maxRž   t   assertNotEqual(   R#   R±   RU   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_tcl.pyt   test_passing_values¿  sB    %%/	 	"'(*c            s(  g  ‰  ‡  f d †  } ˆ j  j d | ƒ ˆ j ˆ j  j j d ƒ d  ˆ j ‡  ‡ f d † } ‡ f d †  } | t d ƒ | t d ƒ | d ƒ | d ƒ | d	 d
 ƒ | d ƒ | d ƒ | d ƒ | d
 ƒ | d ƒ | d d ƒ | d d ƒ | d ƒ | d ƒ | d ƒ x' ˆ j	 ƒ  D] } | | t
 | ƒ ƒ qWt d# k  r\| d$ t
 d% ƒ ƒ n  x! d& D] } | | t | ƒ ƒ qcWxK d d t j j t j j t j j t j j f D] } | | d | ƒq´W| t d ƒ d | ƒ| t d ƒ d | ƒ| d' d ƒ | d d( d) d! d* f d" ƒ d  S(+   Nc            s   ˆ  j  |  ƒ |  S(   N(   t   append(   t   arg(   RV   (    sƒ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_tcl.pyt   testfuncé  s    R¼   c            s–   | d  k r |  } n  ˆ  2ˆ j j d |  ƒ } ˆ j t ˆ  ƒ d ƒ ˆ j ˆ  d t t f ƒ | ˆ  d | ƒ ˆ j | t t f ƒ | | | ƒ d  S(   NR¼   i   i    (   R   R(   R   R.   t   lenRL   RO   RR   (   Rª   R–   t   eqt   r(   RV   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_tcl.pyR—   î  s    	c            s*   ˆ  j  t |  ƒ | d t | ƒ d ƒd  S(   Nt   deltag»½×Ùß|Û=(   t   assertAlmostEqualRž   R®   (   t   actualR–   (   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_tcl.pyt   float_eqø  s    R,   RA   R²   s   string½s	   stringâ‚¬u	   stringâ‚¬R™   u   stringu   stringÂ½u    s   strÀ€ingu   str ings   strÀ€ingâ‚¬u
   str ingâ‚¬u	   str ingÂ½i   i   i   iè  g        g      ð?g      ð¿i   g      @R¾   R´   i   i   s   5 6s   1 2 {3 4} {5 6} {}(   i   i   lC                                                                                                                                        lC                                                                                                                                        (   g        g      ð?g      ð¿(    (   i   (   i   i   (    (   R(   t   createcommandRn   R)   t   deletecommandR   R.   R"   R]   RH   RO   RF   t   reprR   Rµ   R¶   R·   Rž   (   R#   R¼   R—   RÃ   RU   Rp   (    (   RV   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_tcl.pyt   test_user_commandç  sD    










c         C   sÝ  |  j  j j } |  j  j j } |  j t | ƒ |  j t | d d ƒ |  j t | d ƒ d d# f d d$ f d d% f d d& f d d' f d
 d( f d d) f d d* f d d+ f d d, f d d- f d. d/ f d d0 f d1 d2 f d d3 f d4 d5 f d6 d7 f | d d d d8 ƒ |  j rd d d9 f n d: f g } t d; k r™|  j sDd< } n* t ƒ  d= k  r\d> } n d d d d? f } | | d  d! d d d d@ ƒ | f g 7} n  x* | D]" \ } } |  j	 | | ƒ | ƒ q W|  j t
 | d" ƒ d  S(A   NR   R   i   R`   R™   s   {}s   ""s
   a
 b	 c
 t   cu
   a
 b	 c
 s   a â‚¬s   â‚¬u   a â‚¬s	   aÀ€b cÀ€ds   aÀ€bs   cÀ€ds   a {b c}s   b cs   a b\ cs   a 2s   a 3.4s   3.4g333333@t   listi   R,   i   i   t   12u   â‚¬i   t   dictt   createt   {(   R`   (    (   R™   (   R™   (   R   R   RÈ   (   R   R   RÈ   (   R   s   â‚¬(   R   s   â‚¬(   s   aÀ€bs   cÀ€d(   R   s   b c(   R   s   b c(   R   s   b c(   R   s   b c(   R   R`   (   R   i   (   R   i   (   R   s   3.4(   R   g333333@(   R   g333333@(    (    (   g333333@(   g333333@(   R,   R`   s   3.4(   i   i   (   RÊ   s   â‚¬s   â‚¬s   3.4(   i   i   i   (   RÊ   u   â‚¬u   â‚¬s   3.4(   g333333@(   g333333@(   R(   R)   t	   splitlistR   R   R    R*   RF   R   R.   R   (   R#   RÎ   R   t	   testcasesR–   R»   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_tcl.pyt   test_splitlist  sJ    																				c         C   sî  |  j  j j } |  j  j j } |  j t | ƒ |  j t | d d ƒ |  j t | d ƒ d$ d% d& d' d( d	 d) f d d* f d d+ f d d, f d- d d. f d d d/ f f d d d0 f f d1 d d2 f f d3 d d4 f f d d5 f d6 d7 f d d8 f d9 d: f d d; f d d< f f d= d> f | d d d d? ƒ |  j r>d d d@ f n dA f g } t dB k r½|  j shdC } n* t ƒ  dD k  r€dE } n d! d  d  dF f } | | d" d# d! d  d dG ƒ | f g 7} n  x* | D]" \ } } |  j	 | | ƒ | ƒ qÄWd  S(H   NR   R   i   R`   R™   s   {}s   ""RÍ   s
   a
 b	 c
 RÈ   u
   a
 b	 c
 s   a â‚¬s   â‚¬u   a â‚¬s   aÀ€bs	   aÀ€b cÀ€ds   cÀ€ds   a {b c}s   a b\ cs   b cu   b cs   a 2s   a 3.4s   3.4g333333@RÉ   i   R,   i   i   RÊ   u   â‚¬i   RË   RÌ   (   R`   R`   (   R™   R™   (   s   {}R™   (   s   ""R™   (   RÍ   RÍ   (   R   R   RÈ   (   R   R   RÈ   (   R   s   â‚¬(   R   s   â‚¬(   s   aÀ€bs   aÀ€b(   s   aÀ€bs   cÀ€d(   R   RÈ   (   R   RÈ   (   R   s   b c(   R   RÈ   (   R   u   b c(   R   RÈ   (   R   R`   (   R   i   (   R   i   (   R   s   3.4(   R   g333333@(   R   g333333@(   i   g333333@(   i   g333333@(    (    (   g333333@(   g333333@(   R,   R`   s   3.4(   i   i   (   RÊ   s   â‚¬s   â‚¬s   3.4(   i   i   i   (   RÊ   u   â‚¬u   â‚¬s   3.4(   g333333@(   g333333@(
   R(   R)   t   splitR   R   R    R*   RF   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_tcl.pyt
   test_splitF  sP    													c      	   C   s  t  j } |  j j } d } |  j | | | t ƒ i d d 6d d 6d d 6ƒ |  j | | | ƒ i d d 6d d	 6d d 6ƒ d d d d d d f } |  j | | | t ƒ i d d 6d d 6d d 6ƒ |  j | | | ƒ i d d 6d d	 6d d 6ƒ |  j t | | d ƒ |  j t | | d ƒ | j d d d d d d d ƒ } |  j | | | ƒ i |  j	 rbd n d d 6d d	 6d d 6ƒ t
 d k r| j d d d d d d d d ƒ } |  j	 sÄt ƒ  d  k  râi d d 6d d	 6d d 6} n i d! d 6d d	 6d d 6} |  j | | | ƒ | ƒ n  d  S("   Ns#   -a {1 2 3} -something foo status {}s   1 2 3s   -at   foos
   -somethingR™   t   statusR   t	   somethingi   i   i   s   {}s   -a b -c R   s   -cRÉ   i   i   RË   RÌ   (   i   i   i   (   i   i   i   (   i   i   i   (   s   -aR   s   -c(   i   i   i   (    (   i   i   i   (   i   i   (   i   i   i   (    (   i   i   i   (   i   i   i   (   t   tkintert
   _splitdictR(   R)   R.   R]   R   t   RuntimeErrorR   R*   RF   R   (   R#   t	   splitdictR   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_tcl.pyt   test_splitdictu  s4    		c            s-  t  j ‰  ˆ j j ‰ ‡ f d †  ‰ ‡  ‡ ‡ f d †  } | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d	 ƒ | d
 ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ | d ƒ d  S(   Nc            s   ˆ  j  d |  d ƒ S(   Nt   lindexi    (   R   (   t   s(   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_tcl.pyt   unpack›  s    c            sñ   ˆ j  ˆ ˆ  |  g ƒ ƒ |  ƒ ˆ j  ˆ ˆ  |  d g ƒ ƒ |  ƒ ˆ j  ˆ ˆ ˆ  |  g g ƒ ƒ ƒ |  ƒ ˆ j  ˆ ˆ ˆ  |  d g g ƒ ƒ ƒ |  ƒ ˆ j  ˆ ˆ ˆ  |  g d g ƒ ƒ ƒ |  ƒ ˆ j  ˆ ˆ ˆ  |  d g d g ƒ ƒ ƒ |  ƒ d  S(   Ni    (   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_tcl.pyR—   �  s    "(++R™   R˜   s   sp ams   sp	ams   sp
ams    	
s   {spam}s   {sp am}s   "spam"s   "sp am"s   {"spam"}s   "{spam}"s   sp\ams   "sp\am"s	   "{}" "{}"s   "\s   "{s   "}s   
\s   
{s   
}s   \
s   {
s   }
(   R×   t   _joinR(   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_tcl.pyt	   test_join˜  s8    	






















(   i   i   (,   R%   R&   R+   R/   R0   R1   R3   R4   R8   R:   R;   R=   R>   R?   R@   RC   RD   RE   RH   RW   RY   R^   Rk   Rq   Ru   Rv   t   unittestt
   skipUnlessR   t   platformR“   Rœ   RŸ   R¡   R«   RF   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_tcl.pyR'   .   sJ   															
		
								$%	"			(!		(	3	,	/	#iÿÿ  i   i   t   BigmemTclTestc        
   B   s„  e  Z d  „  Z e j e j e e k  d ƒ e j	 d e d d d d e
 ƒ d „  ƒ ƒ ƒ Z e j e j e j d ƒ e j e e k  d ƒ e j	 d e d d d	 e d	 d e
 ƒ d
 „  ƒ ƒ ƒ ƒ Z e j e j e e k  d ƒ e j	 d e d d d d e
 ƒ d „  ƒ ƒ ƒ Z e j e j e j d ƒ e j e e k  d ƒ e j	 d e d d d	 e d d e
 ƒ d „  ƒ ƒ ƒ ƒ Z d „  Z RS(   c         C   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_tcl.pyR+   Â  s    s   needs UINT_MAX < SIZE_MAXt   sizei   t   memusei   t   dry_runc         C   s-   d | } |  j  t |  j j d d | ƒ d  S(   Nt    R2   R°   (   R   t   OverflowErrorR(   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_tcl.pyt   test_huge_string_callÅ  s    
s   requires unicode supporti   c         C   s3   t  d ƒ | } |  j t |  j j d d | ƒ d  S(   NRè   R2   R°   (   RR   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_tcl.pyt   test_huge_unicode_callÌ  s    i	   c         C   s   d d | } |  j  | ƒ d  S(   NR,   Rè   (   t   check_huge_string_builtins(   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_tcl.pyt   test_huge_string_builtins×  s    i   c         C   s%   t  d d | ƒ } |  j | ƒ d  S(   NR,   Rè   (   RR   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_tcl.pyt   test_huge_unicode_builtinsÞ  s    c         C   s®  |  j  j } |  j t | j | ƒ |  j t | j | ƒ |  j t | j | ƒ |  j t | j | ƒ |  j t | j | ƒ |  j t | j	 | ƒ |  j t | j
 | ƒ |  j t | j | d d ƒ |  j t | j d | d ƒ |  j t | j | ƒ |  j t | j d | ƒ |  j t | j | ƒ |  j t | j | ƒ |  j t | j | ƒ |  j t | j | ƒ |  j t | j | ƒ |  j t | j | t ƒ |  j t | j | ƒ d  S(   Nt   xR   (   R(   R)   R   Ré   RK   RX   R\   R-   Re   t   recordt   adderrorinfoR9   RB   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_tcl.pyRì   è  s&    (   R%   R&   R+   R    t   cpython_onlyRá   Râ   R   R   t   precisionbigmemtestR]   Rê   RQ   t   character_sizeRë   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_tcl.pyRä   À  s(   	11c          C   s.   t  j r* t ƒ  }  d G|  j d d ƒ GHn  d  S(   Ns   patchlevel =R	   R
   (   R    t   verboseR   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_tcl.pyt   setUpModuleþ  s    		c           C   s   t  j t t t ƒ d  S(   N(   R    t   run_unittestR'   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_tcl.pyt	   test_main  s    t   __main__(&   Rá   R   R   Rf   t   testR    t
   subprocessR   R   t   import_moduleR   t   TkinterR×   R   R   t	   _testcapiR   R   t   ImportErrort   maxsizet   tuplet   mapR   t   TCL_VERSIONRÒ   RF   R   R   R   t   TestCaseR   R'   t
   maxunicodeRô   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_tcl.pyt   <module>   s4   !	ÿ ÿ ’>		