ó
ŠwÛjc           @   sp  d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l m Z d e j f d „  ƒ  YZ d e j f d „  ƒ  YZ	 d e	 f d „  ƒ  YZ
 d	 e	 f d
 „  ƒ  YZ d e	 f d „  ƒ  YZ d e
 f d „  ƒ  YZ d e f d „  ƒ  YZ d e j f d „  ƒ  YZ d e j f d „  ƒ  YZ d e f d „  ƒ  YZ d e j f d „  ƒ  YZ d „  Z e d k rle ƒ  n  d S(   iÿÿÿÿN(   t   test_supportt
   SortedDictc           B   sD   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z e Z d „  Z RS(   c         C   s   |  j  j ƒ  } | j ƒ  | S(   N(   t   datat   itemst   sort(   t   selft   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_cfgparser.pyR      s    
c         C   s   |  j  j ƒ  } | j ƒ  | S(   N(   R   t   keysR   (   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_cfgparser.pyR      s    
c         C   s'   |  j  ƒ  } g  | D] } | d ^ q S(   Ni   (   R   (   R   R   t   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_cfgparser.pyt   values   s    c         C   s   t  |  j ƒ  ƒ S(   N(   t   iterR   (   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_cfgparser.pyt	   iteritems   t    c         C   s   t  |  j ƒ  ƒ 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_cfgparser.pyt   iterkeys   R   c         C   s   t  |  j ƒ  ƒ 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_cfgparser.pyt
   itervalues   R   (	   t   __name__t
   __module__R   R   R	   R   R   t   __iter__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_cfgparser.pyR   
   s   					t   TestCaseBasec           B   s­   e  Z e Z d d  „ Z d 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 RS(   c         C   sI   | d  k r' |  j d |  j ƒ |  _ n |  j | d |  j ƒ|  _ |  j S(   Nt   allow_no_value(   t   Nonet   config_classR   t   cf(   R   t   defaults(    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt	   newconfig#   s
    c         C   s/   |  j  | ƒ } t j | ƒ } | j | ƒ | S(   N(   R   t   StringIOt   readfp(   R   t   stringR   R   t   sio(    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt
   fromstring+   s    c         C   sà  d } |  j  r | d 7} n  |  j | ƒ } | j ƒ  } | j ƒ  d d d d d d d	 g } |  j  ru | j d
 ƒ n  | j ƒ  |  j } | | | ƒ | | j d d ƒ d ƒ | | j d	 d ƒ d ƒ | | j d d ƒ d ƒ | | j d d ƒ d ƒ | | j d d ƒ d ƒ |  j  r7| | j d
 d ƒ d  ƒ n  |  j d | j	 d ƒ d ƒ |  j
 | j d d ƒ d ƒ |  j | j d d ƒ d ƒ |  j | j d d ƒ d ƒ |  j t j | j d d ƒ | | j d d ƒ d ƒ d  S(   NsQ  [Foo Bar]
foo=bar
[Spacey Bar]
foo = bar
[Commented Bar]
foo: bar ; comment
[Long Line]
foo: this line is much, much longer than my editor
   likes it.
[Section\with$weird%characters[	]
[Internationalized Stuff]
foo[bg]: Bulgarian
foo=Default
foo[en]=English
foo[de]=Deutsch
[Spaces]
key with spaces : value
another with spaces = splat!
s   [NoValue]
option-without-value
s   Commented Bars   Foo Bars   Internationalized Stuffs	   Long Lines   Section\with$weird%characters[	t   Spacess
   Spacey Bart   NoValuet   foot   bars   key with spacest   values   another with spacess   splat!s   option-without-valueR   s3   __name__ "option" should not be exposed by the API!s4   remove_option() failed to report existence of options'   remove_option() failed to remove optionsI   remove_option() failed to report non-existence of option that was removeds   No Such Sections7   this line is much, much longer than my editor
likes it.(   R   R   t   sectionsR   t   appendt   assertEqualt   getR   t   assertNotInt   optionst
   assertTruet   remove_optiont   assertFalset
   has_optiont   assertRaisest   ConfigParsert   NoSectionError(   R   t   config_stringR   t   Lt   Et   eq(    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt
   test_basic1   sL    	

		
		c         C   sË  |  j  ƒ  } | j d ƒ | j d ƒ | j ƒ  } | j ƒ  |  j } | | d d g ƒ | j d d d ƒ | | j d ƒ d g ƒ | | j d d ƒ d d ƒ |  j | j	 d d ƒ ƒ | j d d d ƒ x* d D]" } |  j | j	 d | ƒ d ƒ qÓ W| | j d ƒ d	 g ƒ | | j d ƒ d g ƒ | j
 d d ƒ | | j d ƒ g  ƒ |  j d ƒ } | | j d ƒ d g ƒ | | j d d ƒ d ƒ |  j d d i d d 6ƒ} |  j | j	 d d ƒ ƒ d  S(   Nt   At   at   BR"   t   bs@   could not locate option, expecting case-insensitive option namess   A-Bs	   A-B values   a-bs   A-bs   a-Bs9   has_option() returned false for option which should exists,   [MySection]
Option: first line
	second line
t	   MySectiont   optiont   Options   first line
second lines   [section]
nekey=nevalue
R   t   keyt   sectiont   Key(   s   a-bs   A-bs   a-Bs   A-B(   R   t   add_sectionR#   R   R%   t   setR(   R&   R)   R,   R*   R   (   R   R   R1   R3   t   opt(    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt   test_case_sensitivity{   s8    
		c         C   sn   |  j  i d d 6ƒ } |  j | j d d ƒ d d ƒ |  j  i d d 6ƒ } |  j | j d d ƒ d d ƒ d  S(   Nt   BarR    t   DEFAULTt   Foos@   could not locate option, expecting case-insensitive option namess<   could not locate option, expecting case-insensitive defaults(   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_cfgparser.pyt   test_default_case_sensitivityž   s    c         C   sm   |  j  ƒ  |  j t j d ƒ |  j t j d ƒ |  j t j d ƒ |  j t j d ƒ |  j t j d ƒ d  S(   Ns   [Foo]
  extra-spaces: splat
s   [Foo]
  extra-spaces= splat
s!   [Foo]
:value-without-option-name
s!   [Foo]
=value-without-option-name
s   No Section!
(   R   t   parse_errorR.   t   ParsingErrort   MissingSectionHeaderError(   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_cfgparser.pyt   test_parse_errors¨   s    
c         C   s,   t  j  | ƒ } |  j | |  j j | ƒ d  S(   N(   R   R-   R   R   (   R   t   exct   srcR   (    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyRG   µ   s    c         C   s³   |  j  ƒ  } |  j | j ƒ  g  d ƒ |  j | j d ƒ d ƒ |  j t j | j d ƒ |  j t j | j	 d d d ƒ |  j
 t j d d ƒ | j d ƒ |  j
 t j d d ƒ d  S(   Ns0   new ConfigParser should have no defined sectionsRE   s5   new ConfigParser should have no acknowledged sectionsR    R!   R"   (   R   R%   R#   R+   t   has_sectionR-   R.   R/   R(   R@   t	   get_errorR?   t   NoOptionError(   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_cfgparser.pyt   test_query_errors¹   s    c         C   sO   y |  j  j | | ƒ Wn | k
 r- } | SX|  j d | j | j f ƒ d  S(   Ns   expected exception type %s.%s(   R   R&   t   failR   R   (   R   RK   R=   R:   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_cfgparser.pyRN   È   s    	c         C   s„   |  j  d ƒ } xn t d d ƒ D]] } |  j | j d d | ƒ ƒ |  j | j d d | ƒ ƒ |  j t | j d d | ƒ q Wd  S(   Ns{   [BOOLTEST]
T1=1
T2=TRUE
T3=True
T4=oN
T5=yes
F1=0
F2=FALSE
F3=False
F4=oFF
F5=nO
E1=2
E2=foo
E3=-1
E4=0.1
E5=FALSE AND MOREi   i   t   BOOLTESTs   t%ds   f%ds   e%d(   R   t   rangeR)   t
   getbooleanR+   R-   t
   ValueError(   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_cfgparser.pyt   test_booleanÑ   s    		c         C   s6   |  j  ƒ  } | j d ƒ |  j t j | j d ƒ d  S(   NRE   (   R   R?   R-   R.   t   DuplicateSectionError(   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_cfgparser.pyt   test_weird_errorsê   s    c         C   sz   d } |  j  r | d 7} n  |  j | ƒ } t j ƒ  } | j | ƒ d } |  j  r` | d 7} n  |  j | j ƒ  | ƒ d  S(   Nss   [Long Line]
foo: this line is much, much longer than my editor
   likes it.
[DEFAULT]
foo: another very
 long line
s!   [Valueless]
option-without-value
su   [DEFAULT]
foo = another very
	long line

[Long Line]
foo = this line is much, much longer than my editor
	likes it.

s"   [Valueless]
option-without-value

(   R   R   R   t   writeR%   t   getvalue(   R   R0   R   t   outputt   expect_string(    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt
   test_writeð   s    	
		
c         C   s�   |  j  d ƒ } d t f d „  ƒ  Y} | j d d d ƒ | j d d | d ƒ ƒ | j d d d ƒ | j d d | d ƒ ƒ d  S(   Ns   [sect]
option1=foo
t   mystrc           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_cfgparser.pyR`     s   t   sectt   option1t   splatt   option2(   R   t   strR@   (   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_cfgparser.pyt   test_set_string_types  s    c         C   sn   y t  Wn t k
 r( |  j d ƒ n X|  j d ƒ } | j d d t  d ƒ ƒ | j d d t  d ƒ ƒ d  S(   Ns   no unicode supports   [sect]
option1=foo
Ra   Rb   Rc   Rd   (   t   unicodet	   NameErrort   skipTestR   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_cfgparser.pyt   test_set_unicode   s    c         C   s  t  j d ƒ } |  j ƒ  } | j | d g ƒ } |  j | | g ƒ |  j | j d d ƒ d ƒ |  j ƒ  } | j | ƒ } |  j | | g ƒ |  j | j d d ƒ d ƒ |  j ƒ  } | j d g ƒ } |  j | g  ƒ |  j ƒ  } | j g  ƒ } |  j | g  ƒ d  S(   Ns   cfgparser.1s   nonexistent-files   Foo BarR    t   newbar(   R    t   findfileR   t   readR%   R&   (   R   t   file1R   t   parsed_files(    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt   test_read_returns_file_list+  s    c         C   s   |  j  d d i d d 6ƒS(   Nsê  [Foo]
bar=something %(with1)s interpolation (1 step)
bar9=something %(with9)s lots of interpolation (9 steps)
bar10=something %(with10)s lots of interpolation (10 steps)
bar11=something %(with11)s lots of interpolation (11 steps)
with11=%(with10)s
with10=%(with9)s
with9=%(with8)s
with8=%(With7)s
with7=%(WITH6)s
with6=%(with5)s
With5=%(with4)s
WITH4=%(with3)s
with3=%(with2)s
with2=%(with1)s
with1=with

[Mutual Recursion]
foo=%(bar)s
bar=%(foo)s

[Interpolation Error]
name=%(reference)s
R   s   %(__name__)st   getname(   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_cfgparser.pyt   get_interpolation_configA  s    c         C   sO   |  j  d d i d d 6ƒ} t | j d ƒ ƒ } | j ƒ  |  j | | ƒ d  S(   NsY   [section]
name = value
key: |%(name)s| 
getdefault: |%(default)s|
getname: |%(__name__)s|R   s	   <default>t   defaultR=   (   R   t   listR   R   R%   (   R   t   expectedR   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_cfgparser.pyt   check_items_config]  s    
N(   R   R   t   FalseR   R   R   R   R4   RB   RF   RJ   RG   RP   RN   RX   RZ   R_   Rf   Rj   Rp   Rr   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_cfgparser.pyR       s$   	J	#	
								$				t   ConfigParserTestCasec           B   s;   e  Z e j Z e Z d  „  Z d „  Z d „  Z d „  Z	 RS(   c         C   s­   i d t  j  6d t  j 6} |  j ƒ  } |  j } | | j d d ƒ d ƒ | | j d d ƒ d ƒ | | j d d ƒ d ƒ | | j d d	 ƒ d
 ƒ |  j t  j d d ƒ d  S(   Ns5   something %(with11)s lots of interpolation (11 steps)s	   %(with1)sRE   Rq   R!   s%   something with interpolation (1 step)t   bar9s.   something with lots of interpolation (9 steps)t   bar10s/   something with lots of interpolation (10 steps)t   bar11(   R.   t   SafeConfigParserRr   R%   R&   RN   t   InterpolationDepthError(   R   t   rawvalR   R3   (    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt   test_interpolationn  s    
	c         C   s_   |  j  ƒ  |  j t j d d ƒ } |  j | j d ƒ |  j | j d ƒ |  j | j d ƒ d  S(   Ns   Interpolation Errort   namet	   reference(   Rr   RN   R.   t   InterpolationErrorR%   R�   R=   R:   (   R   RR   (    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt    test_interpolation_missing_value~  s    
c         C   s    |  j  d d d d d g ƒ d  S(   NRs   s	   <default>t
   getdefaults   |<default>|Rq   s	   |section|R<   s   |value|R€   R"   (   Rs   s	   <default>(   R„   s   |<default>|(   Rq   s	   |section|(   R<   s   |value|(   R€   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_cfgparser.pyt
   test_items†  s
    	c         C   sç  |  j  ƒ  } | j d ƒ | j d d d ƒ | j d d d d d d d d d	 d
 d g	 ƒ | j d d i d d 6d d 6d d 6ƒ | j d d d ƒ | j d d ƒ |  j | j d d d t ƒd ƒ |  j t | j d d ƒ |  j | j d d d t ƒd d d d d d d	 d
 d g	 ƒ |  j t | j d d ƒ |  j | j d d d t ƒi d d 6d d 6d d 6ƒ |  j t | j d d ƒ |  j | j d d d t ƒd ƒ |  j t | j d d d t	 ƒ|  j | j d d ƒ d  ƒ d  S(   Ns
   non-stringt   inti   Rt   i    i   i   i   i   i   s   %(t   dictgn†ðù!	@t   pis   %(list)t   string_with_interpolations   %(list)ss   no-valuet   raw(   R   R?   R@   R%   R&   t   TrueR-   t	   TypeErrorRV   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_cfgparser.pyt   test_set_nonstring_types�  s*    .""(
   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_cfgparser.pyRx   j  s   				t   MultilineValuesTestCasec           B   s>   e  Z e j Z d  j d d ƒ Z d „  Z d „  Z d „  Z RS(   sS   I'm having spam spam spam spam spam spam spam beaked beans spam spam spam and spam!t    s   	
c         C   s¡   |  j  ƒ  } xf t d ƒ D]X } d j | ƒ } | j | ƒ x3 t d ƒ D]% } | j | d j | ƒ |  j ƒ qH Wq Wt t j d ƒ � } | j	 | ƒ Wd  QXd  S(   Nid   s	   section{}i
   s   lovely_spam{}t   w(
   R   RT   t   formatR?   R@   t   wonderful_spamt   openR    t   TESTFNR[   (   R   R   R   t   st   jt   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_cfgparser.pyt   setUpª  s    'c         C   s   t  j t j ƒ d  S(   N(   t   ost   unlinkR    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_cfgparser.pyt   tearDown´  s    c         C   s`   |  j  ƒ  } t t j ƒ � } | j | ƒ Wd  QX|  j | j d d ƒ |  j j d d ƒ ƒ d  S(   Nt   section8t   lovely_spam4s   	
s   
(	   R   R“   R    R”   R   R%   R&   R’   t   replace(   R   t   cf_from_fileR—   (    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt    test_dominating_multiline_values·  s
    (	   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_cfgparser.pyRŽ   ¤  s   		
	t   RawConfigParserTestCasec           B   s,   e  Z e j Z d  „  Z d „  Z d „  Z RS(   c         C   s–   |  j  ƒ  } |  j } | | j d d ƒ d ƒ | | j d d ƒ d ƒ | | j d d ƒ d ƒ | | j d d ƒ d	 ƒ | | j d d
 ƒ d ƒ d  S(   NRE   Rq   s   %(__name__)sR!   s*   something %(with1)s interpolation (1 step)Ry   s3   something %(with9)s lots of interpolation (9 steps)Rz   s5   something %(with10)s lots of interpolation (10 steps)R{   s5   something %(with11)s lots of interpolation (11 steps)(   Rr   R%   R&   (   R   R   R3   (    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyR   Ã  s    	c         C   s    |  j  d d d d d g ƒ d  S(   NRs   s	   <default>R„   s   |%(default)s|Rq   s   |%(__name__)s|R<   s
   |%(name)s|R€   R"   (   Rs   s	   <default>(   R„   s   |%(default)s|(   Rq   s   |%(__name__)s|(   R<   s
   |%(name)s|(   R€   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_cfgparser.pyR…   Ð  s
    	c         C   sè   |  j  ƒ  } | j d ƒ | j d d d ƒ | j d d d d d d d d d	 d
 g ƒ | j d d i d d 6ƒ |  j | j d d ƒ d ƒ |  j | j d d ƒ d d d d d d d	 d
 g ƒ |  j | j d d ƒ i d d 6ƒ d  S(   Ns
   non-stringR†   i   Rt   i    i   i   i   i   i   R‡   gn†ðù!	@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_cfgparser.pyR�   ×  s    +(   R   R   R.   t   RawConfigParserR   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_cfgparser.pyR¡   À  s   			t   SafeConfigParserTestCasec           B   s>   e  Z e j Z d  „  Z d „  Z d „  Z d „  Z d „  Z	 RS(   c         C   sK   |  j  d ƒ } |  j | j d d ƒ d ƒ |  j | j d d ƒ d ƒ d  S(   NsW   [section]
option1=xxx
option2=%(option1)s/xxx
ok=%(option1)s/%%s
not_ok=%(option2)s/%%sR=   t   oks   xxx/%st   not_oks
   xxx/xxx/%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_cfgparser.pyt   test_safe_interpolationæ  s    c         C   sÎ   |  j  d ƒ } |  j | j d d ƒ d ƒ |  j t | j d d d ƒ |  j t | j d d d ƒ |  j t | j d d d ƒ |  j | j d d ƒ d ƒ | j d d d	 ƒ |  j | j d d ƒ d
 ƒ d  S(   Ns   [sect]
option1=foo
Ra   Rb   R    s   %foos   foo%s   f%ooRd   s   foo%%bars   foo%bar(   R   R%   R&   R-   RV   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_cfgparser.pyt#   test_set_malformatted_interpolationð  s    c         C   sÁ   |  j  d ƒ } |  j t | j d d d ƒ |  j t | j d d d ƒ |  j t | j d d t ƒ  ƒ |  j t | j d d d ƒ |  j t | j d d d ƒ |  j t | j d d t ƒ  ƒ d  S(   Ns   [sect]
option1=foo
Ra   Rb   i   g      ð?Rd   (   R   R-   RŒ   R@   t   object(   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_cfgparser.pyR�      s    c         C   s&   |  j  ƒ  } |  j t | j d ƒ d  S(   NRs   (   R   R-   RV   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_cfgparser.pyt   test_add_section_default_1  s    c         C   s&   |  j  ƒ  } |  j t | j d ƒ d  S(   NRD   (   R   R-   RV   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_cfgparser.pyt   test_add_section_default_2  s    (
   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_cfgparser.pyR£   ã  s   		
			t   SafeConfigParserTestCaseNoValuec           B   s   e  Z e Z RS(    (   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_cfgparser.pyR«     s   t   TestChainMapc           B   s   e  Z d  „  Z RS(   c      
   C   s7  t  d d d d ƒ } t  d d d d ƒ } | j ƒ  } | j | ƒ t j | | ƒ } |  j | j ƒ  t ƒ |  j t	 | j ƒ  ƒ t	 | j ƒ  ƒ ƒ |  j t	 | j
 ƒ  ƒ t	 | j
 ƒ  ƒ ƒ |  j t	 | j ƒ  ƒ t	 | j ƒ  ƒ ƒ |  j t	 | ƒ t	 | ƒ ƒ |  j | | ƒ |  j g  | D] } | | ^ q| j
 ƒ  ƒ d j ƒ  } |  j g  | D] } | j | d	 ƒ ^ qUg  | D] } | j | d	 ƒ ^ qwƒ |  j g  | D] } | | k ^ q£g  | D] } | | k ^ q¿ƒ t j ƒ  �M |  j g  | D] } | j | ƒ ^ qòg  | D] } | j | ƒ ^ qƒ Wd  QXd  S(
   Nt   redi   t   greeni   i   t   bluei   s   red green blue black browni
   (   R‡   t   copyt   updateR.   t	   _Chainmapt   assertIsInstanceR   Rt   R%   R@   R	   R   t   splitR&   R    t   check_py3k_warningst   has_key(   R   t   d1t   d2t   dcombt   cmt   kt   klist(    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt   test_issue_12717  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_cfgparser.pyR¬     s   t   Issue7005TestCasec           B   s/   e  Z d  Z d Z d „  Z d „  Z d „  Z RS(   sr   Test output when None is set() as a value and allow_no_value == False.

    http://bugs.python.org/issue7005

    s   [section]
option = None

c         C   sR   | d t  ƒ } | j d ƒ | j d d d  ƒ t j ƒ  } | j | ƒ | j ƒ  S(   NR   R=   R:   (   Rw   R?   R@   R   R   R[   R\   (   R   R   t   cpR   (    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt   prepare8  s    c         C   s)   |  j  t j ƒ } |  j | |  j ƒ d  S(   N(   RÀ   R.   R%   t   expected_output(   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_cfgparser.pyt   test_none_as_value_stringifiedA  s    c         C   s)   |  j  t j ƒ } |  j | |  j ƒ d  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_cfgparser.pyt"   test_none_as_value_stringified_rawE  s    (   R   R   t   __doc__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_cfgparser.pyR¾   /  s
   			t   SortedTestCasec           B   s   e  Z d d  „ Z d „  Z RS(   c         C   s"   |  j  d | d t ƒ |  _ |  j S(   NR   t	   dict_type(   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_cfgparser.pyR   K  s    c         C   sC   |  j  d ƒ t j ƒ  } |  j j | ƒ |  j | j ƒ  d ƒ d  S(   Ns    [b]
o4=1
o3=2
o2=3
o1=4
[a]
k=v
s,   [a]
k = v

[b]
o1 = 4
o2 = 3
o3 = 2
o4 = 1

(   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_cfgparser.pyt   test_sortedO  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_cfgparser.pyRÅ   J  s   t   ExceptionPicklingTestCasec           B   sh   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(   sB   Tests for issue #13760: ConfigParser exceptions are not picklable.c         C   s�   d d  l  } t j d ƒ } xn t | j d ƒ D]Y } | j | | ƒ } | j | ƒ } |  j | j | j ƒ |  j t	 | ƒ t	 | ƒ ƒ q/ Wd  S(   NiÿÿÿÿR"   i   (
   t   pickleR.   t   ErrorRT   t   HIGHEST_PROTOCOLt   dumpst   loadsR%   t   messaget   repr(   R   RÉ   t   e1t   protot   pickledt   e2(    (    s‰   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_cfgparser.pyt
   test_errorf  s    c         C   s¼   d d  l  } t j d ƒ } xš t | j d ƒ D]… } | j | | ƒ } | j | ƒ } |  j | j | j ƒ |  j | j	 | j	 ƒ |  j | j
 | j
 ƒ |  j t | ƒ t | ƒ ƒ q/ Wd  S(   NiÿÿÿÿR=   i   (   RÉ   R.   R/   RT   RË   RÌ   RÍ   R%   RÎ   t   argsR=   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_cfgparser.pyt   test_nosectionerroro  s    c         C   sÕ   d d  l  } t j d d ƒ } x° t | j d ƒ D]› } | j | | ƒ } | j | ƒ } |  j | j | j ƒ |  j | j	 | j	 ƒ |  j | j
 | j
 ƒ |  j | j | j ƒ |  j t | ƒ t | ƒ ƒ q2 Wd  S(   NiÿÿÿÿR:   R=   i   (   RÉ   R.   RO   RT   RË   RÌ   RÍ   R%   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_cfgparser.pyt   test_nooptionerrorz  s    c         C   s¼   d d  l  } t j d ƒ } xš t | j d ƒ D]… } | j | | ƒ } | j | ƒ } |  j | j | j ƒ |  j | j	 | j	 ƒ |  j | j
 | j
 ƒ |  j t | ƒ t | ƒ ƒ q/ Wd  S(   NiÿÿÿÿR=   i   (   RÉ   R.   RY   RT   RË   RÌ   RÍ   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_cfgparser.pyt   test_duplicatesectionerror†  s    c         C   sØ   d d  l  } t j d d d ƒ } x° t | j d ƒ D]› } | j | | ƒ } | j | ƒ } |  j | j | j ƒ |  j | j	 | j	 ƒ |  j | j
 | j
 ƒ |  j | j | j ƒ |  j t | ƒ t | ƒ ƒ q5 Wd  S(   NiÿÿÿÿR:   R=   t   msgi   (   RÉ   R.   R‚   RT   RË   RÌ   RÍ   R%   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_cfgparser.pyt   test_interpolationerror‘  s    c         C   sñ   d d  l  } t j d d d d ƒ } xÆ t | j d ƒ D]± } | j | | ƒ } | j | ƒ } |  j | j | j ƒ |  j | j	 | j	 ƒ |  j | j
 | j
 ƒ |  j | j | j ƒ |  j | j | j ƒ |  j t | ƒ t | ƒ ƒ q8 Wd  S(   NiÿÿÿÿR:   R=   R~   R�   i   (   RÉ   R.   t   InterpolationMissingOptionErrorRT   RË   RÌ   RÍ   R%   RÎ   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_cfgparser.pyt$   test_interpolationmissingoptionerror�  s    c         C   sØ   d d  l  } t j d d d ƒ } x° t | j d ƒ D]› } | j | | ƒ } | j | ƒ } |  j | j | j ƒ |  j | j	 | j	 ƒ |  j | j
 | j
 ƒ |  j | j | j ƒ |  j t | ƒ t | ƒ ƒ q5 Wd  S(   NiÿÿÿÿR:   R=   RÙ   i   (   RÉ   R.   t   InterpolationSyntaxErrorRT   RË   RÌ   RÍ   R%   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_cfgparser.pyt   test_interpolationsyntaxerror«  s    c         C   sØ   d d  l  } t j d d d ƒ } x° t | j d ƒ D]› } | j | | ƒ } | j | ƒ } |  j | j | j ƒ |  j | j	 | j	 ƒ |  j | j
 | j
 ƒ |  j | j | j ƒ |  j t | ƒ t | ƒ ƒ q5 Wd  S(   NiÿÿÿÿR:   R=   R~   i   (   RÉ   R.   R}   RT   RË   RÌ   RÍ   R%   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_cfgparser.pyt   test_interpolationdeptherror·  s    	c         C   s  d d  l  } t j d ƒ } | j d d ƒ | j d d ƒ | j d d ƒ x° t | j d ƒ D]› } | j | | ƒ } | j | ƒ } |  j | j	 | j	 ƒ |  j | j
 | j
 ƒ |  j | j | j ƒ |  j | j | j ƒ |  j t | ƒ t | ƒ ƒ q_ Wd  S(	   Niÿÿÿÿt   sourcei   t   line1i   t   line2i   t   line3(   RÉ   R.   RH   R$   RT   RË   RÌ   RÍ   R%   RÎ   RÕ   t   filenamet   errorsRÏ   (   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_cfgparser.pyt   test_parsingerrorÄ  s    c         C   sî   d d  l  } t j d d d ƒ } xÆ t | j d ƒ D]± } | j | | ƒ } | j | ƒ } |  j | j | j ƒ |  j | j	 | j	 ƒ |  j | j
 | j
 ƒ |  j | j | j ƒ |  j | j | j ƒ |  j t | ƒ t | ƒ ƒ q5 Wd  S(   NiÿÿÿÿRä   i{   t   linei   (   RÉ   R.   RI   RT   RË   RÌ   RÍ   R%   RÎ   RÕ   Rç   Rä   t   linenoRÏ   (   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_cfgparser.pyt   test_missingsectionheadererrorÓ  s    (   R   R   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_cfgparser.pyRÈ   c  s   										c        
   C   s)   t  j t t t t t t t t	 t
 ƒ	 d  S(   N(   R    t   run_unittestRx   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_cfgparser.pyt	   test_mainá  s    t   __main__(   R.   R   R™   t   unittestt   UserDictt   testR    R   t   TestCaseR   Rx   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_cfgparser.pyt   <module>   s(   ÿ K:#2~	