ó
‹wÛjc           @   sZ  d  d l  Z  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  d l m Z d  d l	 m
 Z
 m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z d  d l	 m Z d  d l	 m Z e e j 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 f d „  ƒ  YZ  d e f d „  ƒ  YZ! d e f d „  ƒ  YZ" i d d 6d d 6d] d 6d_ d 6Z# d „  Z$ 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 f d) „  ƒ  YZ* d* e f d+ „  ƒ  YZ+ d, e f d- „  ƒ  YZ, d. e f d/ „  ƒ  YZ- d0 e f d1 „  ƒ  YZ. d2 e f d3 „  ƒ  YZ/ d4 e f d5 „  ƒ  YZ0 d6 e f d7 „  ƒ  YZ1 d8 e f d9 „  ƒ  YZ2 d: e f d; „  ƒ  YZ3 d< e f d= „  ƒ  YZ4 d> e f d? „  ƒ  YZ5 d@ e f dA „  ƒ  YZ6 dB e f dC „  ƒ  YZ7 dD e f dE „  ƒ  YZ8 dF e f dG „  ƒ  YZ9 dH e f dI „  ƒ  YZ: dJ e: f dK „  ƒ  YZ; dL e: f dM „  ƒ  YZ< dN e f dO „  ƒ  YZ= dP Z> dQ Z? dR Z@ dS ZA dT ZB dU e f dV „  ƒ  YZC dW e f dX „  ƒ  YZD dY e f dZ „  ƒ  YZE d[ „  ZF eG d\ k rVeF ƒ  n  d S(`   iÿÿÿÿN(   t   StringIO(   t   test_support(   t   make_optiont   Optiont   TitledHelpFormattert   OptionParsert   OptionGroupt   SUPPRESS_USAGEt   OptionErrort   OptionConflictErrort   BadOptionErrort   OptionValueErrort   Values(   t   _match_abbrev(   t
   _parse_numt    t   InterceptedErrorc           B   s#   e  Z d d d d  „ Z d „  Z RS(   c         C   s   | |  _  | |  _ | |  _ d  S(   N(   t   error_messaget   exit_statust   exit_message(   t   selfR   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_optparse.pyt   __init__   s    		c         C   s   |  j  p |  j p d S(   Ns   intercepted error(   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_optparse.pyt   __str__&   s    N(   t   __name__t
   __module__t   NoneR   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_optparse.pyR      s   t   InterceptingOptionParserc           B   s    e  Z d  d d „ Z d „  Z RS(   i    c         C   s   t  d | d | ƒ ‚ d  S(   NR   R   (   R   (   R   t   statust   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_optparse.pyt   exit*   s    c         C   s   t  d | ƒ ‚ d  S(   NR   (   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_optparse.pyt   error-   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_optparse.pyR   )   s   t   BaseTestc           B   sD   e  Z d  „  Z d „  Z d „  Z d d d „ Z d „  Z d „  Z RS(   c         C   sb   |  j  j | ƒ \ } } t | ƒ } |  j | | d t ƒ  ƒ |  j | | d t ƒ  ƒ | | f S(   sš  Assert the options are what we expected when parsing arguments.

        Otherwise, fail with a nicely formatted message.

        Keyword arguments:
        args -- A list of arguments to parse with OptionParser.
        expected_opts -- The options expected.
        expected_positional_args -- The positional arguments expected.

        Returns the options and positional args for further testing.
        sJ   
Options are %(optdict)s.
Should be %(expected_opts)s.
Args were %(args)s.sj   
Positional arguments are %(positional_args)s.
Should be %(expected_positional_args)s.
Args were %(args)s.(   t   parsert
   parse_argst   varst   assertEqualt   locals(   R   t   argst   expected_optst   expected_positional_argst   optionst   positional_argst   optdict(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   assertParseOK2   s    c         C   sË   | d k r d } n  | d k r* i  } n  y | | | Ž  Wnu | k
 r² } t | ƒ } t | t ƒ r‘ |  j | j | ƒ d | j | f ƒ n |  j | | d | | f ƒ | SX|  j d t	 ƒ  ƒ d S(   s-  
        Assert that the expected exception is raised when calling a
        function, and that the right error message is included with
        that exception.

        Arguments:
          func -- the function to call
          args -- positional arguments to `func`
          kwargs -- keyword arguments to `func`
          expected_exception -- exception that should be raised
          expected_message -- expected exception message (or pattern
            if a compiled regex object)

        Returns the exception raised for further testing.
        sL   expected exception message pattern:
/%s/
actual exception message:
'''%s'''
sH   expected exception message:
'''%s'''
actual exception message:
'''%s'''
sn   expected exception %(expected_exception)s not raised
called %(func)r
with args %(args)r
and kwargs %(kwargs)r
N(    (
   R   t   strt
   isinstancet   retypet
   assertTruet   searcht   patternR#   t   failR$   (   R   t   funcR%   t   kwargst   expected_exceptiont   expected_messaget   errt   actual_message(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   assertRaisesP   s"    			c         C   sN   y |  j  j | ƒ Wn& t k
 r< } |  j | j | ƒ n X|  j d ƒ d S(   s‘   
        Assert the parser fails with the expected message.  Caller
        must ensure that self.parser is an InterceptingOptionParser.
        s   expected parse failureN(   R    R!   R   R#   R   t   assertFalse(   R   t   cmdline_argst   expected_outputR7   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   assertParseFail‹   s
    i    c   	      C   s  t  j } t | d d ƒ } yU z5 t ƒ  t  _ | rB | t  j _ n  |  j j | ƒ Wd t  j j ƒ  } | t  _ XWnŽ t	 k
 r } |  j
 t | ƒ t j k d t | ƒ ƒ | | k r× |  j d | d | d ƒ n  |  j | j | ƒ |  j | j | ƒ n X|  j d ƒ d S(   s7   Assert the parser prints the expected output on stdout.t   encodingNs0   expected output to be an ordinary string, not %rs   expected: 
'''
s   '''
but got 
'''
s   '''s   expected parser.exit()(   t   syst   stdoutt   getattrR   R    R>   R    R!   t   getvalueR   R/   t   typet   typest
   StringTypeR2   R#   R   R   R:   (	   R   R;   R<   t   expected_statust   expected_errort   save_stdoutR>   t   outputR7   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   assertOutput—   s*    	c         G   s   |  j  | | d t | ƒ d S(   s4   Assert that TypeError is raised when executing func.N(   R9   R   t	   TypeError(   R   R3   R6   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_optparse.pyt   assertTypeError·   s    c         C   s>   | j  ƒ  } | | k r: |  j d | d | d ƒ ‚ n  d  S(   Ns   help text failure; expected:
"s	   "; got:
"s   "
(   t   format_helpt   failureException(   R   R    t   expected_helpt   actual_help(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt
   assertHelp»   s    N(	   R   R   R+   R9   R=   R   RJ   RL   RQ   (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyR   1   s   		;		t   TestOptionChecksc           B   sÔ   e  Z d  „  Z g  i  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 RS(   c         C   s   t  d t ƒ |  _ d  S(   Nt   usage(   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_optparse.pyt   setUpÊ   s    c         C   s   |  j  t | | t | ƒ d  S(   N(   R9   R   R   (   R   R6   R%   R4   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   assertOptionErrorÍ   s    c         C   s   |  j  t d ƒ d  S(   Ns+   at least one option string must be supplied(   RL   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_optparse.pyt   test_opt_string_emptyÑ   s    	c         C   s   |  j  d d g ƒ d  S(   Ns?   invalid option string 'b': must be at least two characters longt   b(   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_optparse.pyt   test_opt_string_too_shortÕ   s    c         C   s   |  j  d d g ƒ d  S(   NsO   invalid short option string '--': must be of the form -x, (x any non-dash char)s   --(   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_optparse.pyt   test_opt_string_short_invalidÚ   s    c         C   s   |  j  d d g ƒ d  S(   NsJ   invalid long option string '---': must start with --, followed by non-dashs   ---(   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_optparse.pyt   test_opt_string_long_invalidà   s    c         C   s(   |  j  d d g i d  d 6d  d 6ƒ d  S(   Ns.   option -b: invalid keyword arguments: bar, foos   -bt   foot   bar(   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_optparse.pyt   test_attr_invalidæ   s    c         C   s!   |  j  d d g i d d 6ƒ d  S(   Ns    option -b: invalid action: 'foo's   -bR[   t   action(   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_optparse.pyt   test_action_invalidë   s    c         C   s>   |  j  d d g i d d 6ƒ |  j  d d g i t d 6ƒ d  S(   Ns%   option -b: invalid option type: 'foo's   -bR[   RC   s'   option -b: invalid option type: 'tuple'(   RU   t   tuple(   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_optparse.pyt   test_type_invalidð   s    c         C   s(   |  j  d d g i d d 6d d 6ƒ d  S(   Ns4   option -b: must not supply a type for action 'count's   -bt   countR^   t   intRC   (   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_optparse.pyt   test_no_type_for_actionø   s    c         C   s$   |  j  d d d g i d d 6ƒ d  S(   Ns@   option -b/--bad: must supply a list of choices for type 'choice's   -bs   --badt   choiceRC   (   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_optparse.pyt   test_no_choices_listý   s    c         C   s>   t  d ƒ j } |  j d | d d g i d d 6d d 6ƒ d  S(	   NR   sB   option -b/--bad: choices must be a list of strings ('%s' supplied)s   -bs   --badRe   RC   s   bad choicest   choices(   RC   R   RU   (   R   t   typename(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   test_bad_choices_list  s    	c         C   s(   |  j  d d g i d d 6d d 6ƒ d  S(   Ns1   option -b: must not supply choices for type 'int's   -bRc   RC   t   badRg   (   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_optparse.pyt   test_no_choices_for_type  s    c         C   s(   |  j  d d g i d d 6d d 6ƒ d  S(   Ns:   option -b: 'const' must not be supplied for action 'store's   -bt   storeR^   i   t   const(   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_optparse.pyt   test_no_const_for_action  s    c         C   s(   |  j  d d g i d d 6d d 6ƒ d  S(   Ns:   option -b: 'nargs' must not be supplied for action 'count's   -bRb   R^   i   t   nargs(   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_optparse.pyt   test_no_nargs_for_action  s    c         C   s(   |  j  d d g i d d 6d d 6ƒ d  S(   Ns'   option -b: callback not callable: 'foo's   -bt   callbackR^   R[   (   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_optparse.pyt   test_callback_not_callable  s    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_optparse.pyt   dummy   s    c         C   s2   |  j  d d g i d d 6|  j d 6d d 6ƒ d  S(   NsA   option -b: callback_args, if supplied, must be a tuple: not 'foo's   -bRq   R^   R[   t   callback_args(   RU   Rs   (   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_optparse.pyt   test_callback_args_no_tuple#  s
    
c         C   s2   |  j  d d g i d d 6|  j d 6d d 6ƒ d  S(   NsB   option -b: callback_kwargs, if supplied, must be a dict: not 'foo's   -bRq   R^   R[   t   callback_kwargs(   RU   Rs   (   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_optparse.pyt   test_callback_kwargs_no_dict+  s
    
c         C   s(   |  j  d d g i d d 6d d 6ƒ d  S(   Ns<   option -b: callback supplied ('foo') for non-callback options   -bRl   R^   R[   Rq   (   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_optparse.pyt   test_no_callback_for_action3  s    c         C   s(   |  j  d d g i d d 6d d 6ƒ d  S(   Ns9   option -b: callback_args supplied for non-callback options   -bRl   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_optparse.pyt    test_no_callback_args_for_action9  s    c         C   s(   |  j  d d g i d d 6d d 6ƒ d  S(   Ns;   option -b: callback_kwargs supplied for non-callback options   -bRl   R^   R[   Rv   (   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_optparse.pyt"   test_no_callback_kwargs_for_action?  s    (   R   R   RT   RU   RV   RX   RY   RZ   R]   R_   Ra   Rd   Rf   Ri   Rk   Rn   Rp   Rr   Rs   Ru   Rw   Rx   Ry   Rz   (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyRR   É   s,   																				t   TestOptionParserc           B   s€   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z e j d
 d e ƒd „  ƒ Z RS(   c      	   C   sW   t  ƒ  |  _ |  j j d d d d d d d d ƒ|  j j d	 d
 d d d d d ƒd  S(   Ns   -vs	   --verboses   -ns   --noisyR^   t
   store_truet   destt   verboses   -qs   --quiets   --silentt   store_false(   R   R    t
   add_option(   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_optparse.pyRT   F  s
    c         C   s   |  j  |  j j d d  ƒ d  S(   Ns   not an Option instance: None(   RL   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_optparse.pyt   test_add_option_no_OptionM  s    c         C   s    |  j  |  j j d d  d  ƒ d  S(   Ns   invalid arguments(   RL   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_optparse.pyt!   test_add_option_invalid_argumentsQ  s    c         C   s~   |  j  j d ƒ } |  j | t ƒ |  j | j d d g ƒ |  j | j d d g ƒ |  j | j d ƒ |  j | j d ƒ d  S(   Ns   -vs   -ns	   --verboses   --noisyR|   R~   (	   R    t
   get_optiont   assertIsInstanceR   R#   t   _short_optst
   _long_optsR^   R}   (   R   t   opt1(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   test_get_optionU  s    c         C   sz   |  j  j d ƒ } |  j  j d ƒ } |  j  j d ƒ } |  j  j d ƒ } |  j | | k op | k op | k n ƒ d  S(   Ns   -vs	   --verboses   -ns   --noisy(   R    Rƒ   R/   (   R   R‡   t   opt2t   opt3t   opt4(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   test_get_option_equals]  s
    c         C   s6   |  j  |  j j d ƒ ƒ |  j  |  j j d ƒ ƒ d  S(   Ns   -vs	   --verbose(   R/   R    t
   has_option(   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_optparse.pyt   test_has_optiond  s    c         C   s  |  j  |  j j d ƒ d  k ƒ |  j  |  j j d ƒ d  k ƒ |  j  |  j j d ƒ d  k ƒ |  j  |  j j d ƒ d  k ƒ |  j |  j j d ƒ ƒ |  j |  j j d ƒ ƒ |  j |  j j d ƒ ƒ |  j |  j j d ƒ ƒ |  j  |  j j d ƒ ƒ |  j  |  j j d ƒ ƒ d  S(   Ns   -vs	   --verboses   -ns   --noisys   -qs   --silent(   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_optparse.pyt   assertTrueremovedh  s    c         C   s   |  j  j d ƒ |  j ƒ  d  S(   Ns   -n(   R    t   remove_optionR�   (   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_optparse.pyt   test_remove_short_optv  s    c         C   s   |  j  j d ƒ |  j ƒ  d  S(   Ns	   --verbose(   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_optparse.pyt   test_remove_long_optz  s    c         C   s#   |  j  |  j j d d  t d ƒ d  S(   NR[   s   no such option 'foo'(   R[   (   R9   R    R�   R   t
   ValueError(   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_optparse.pyt   test_remove_nonexistent~  s    s   Relies on sys.getrefcountt   cpythonc         C   sd   d g } t  j | ƒ } t ƒ  } | j d d ƒ | | _ | j ƒ  ~ |  j | t  j | ƒ ƒ d  S(   Ni*   s   -as	   --aaarggh(   R?   t   getrefcountR   R€   t	   big_thingt   destroyR#   (   R   R—   t   refcountR    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   test_refleak‚  s    			
(   R   R   RT   R�   R‚   Rˆ   RŒ   RŽ   R�   R‘   R’   R”   R   t   impl_detailt   TrueRš   (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyR{   E  s   										t   TestOptionValuesc           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_optparse.pyRT   •  s    c         C   sê   t  ƒ  } |  j t | ƒ i  ƒ |  j | i  ƒ |  j | i d d 6ƒ |  j | d ƒ i d d 6d d 6} t  d | ƒ } |  j t | ƒ | ƒ |  j | | ƒ |  j | i d d 6ƒ |  j | i  ƒ |  j | d ƒ |  j | g  ƒ d  S(   NR\   R[   R   i*   t   bazt   defaults(   R   R#   R"   t   assertNotEqual(   R   t   valuest   dict(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   test_basics˜  s    	(   R   R   RT   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_optparse.pyR�   ”  s   	t   TestTypeAliasesc           B   s,   e  Z d  „  Z d „  Z 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_optparse.pyRT   ª  s    c         C   s9   |  j  j d d d ƒ|  j |  j  j d ƒ j d ƒ d  S(   Ns   -sRC   R,   t   string(   R    R€   R#   Rƒ   RC   (   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_optparse.pyt   test_str_aliases_string­  s    c         C   sn   |  j  j d d t ƒ|  j |  j  j d ƒ j d ƒ |  j  j d d t ƒ|  j |  j  j d ƒ j d ƒ d  S(   Ns   -sRC   R¥   s   -xRc   (   R    R€   R,   R#   Rƒ   RC   Rc   (   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_optparse.pyt   test_new_type_object±  s    c         C   st   |  j  j d d t j ƒ|  j |  j  j d ƒ j d ƒ |  j  j d d t j ƒ|  j |  j  j d ƒ j d ƒ d  S(   Ns   -sRC   R¥   s   -xRc   (   R    R€   RD   RE   R#   Rƒ   RC   t   IntType(   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_optparse.pyt   test_old_type_object·  s    (   R   R   RT   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_optparse.pyR¤   ©  s   			i   t   si<   t   mt   hi   t   dc         C   sl   y8 | d j  ƒ  r t | ƒ St | d  ƒ t | d SWn- t t f k
 rg t d | | f ƒ ‚ n Xd  S(   Niÿÿÿÿs   option %s: invalid duration: %r(   t   isdigitRc   t   _time_unitsR“   t
   IndexErrorR   (   t   optiont   optt   value(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   _check_durationÁ  s    
t   DurationOptionc           B   s1   e  Z e j d Z e j e j ƒ Z e e d  <RS(   t   duration(   R¶   (   R   R   R   t   TYPESt   copyt   TYPE_CHECKERR´   (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyRµ   Ë  s   t   TestDefaultValuesc           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   sã   t  ƒ  |  _ |  j j d d d t ƒ|  j j d d d d ƒ|  j j d d	 d
 d d ƒ|  j j d d	 d
 ƒ|  j j d d d ƒ|  j j d ƒ |  j j d d d  ƒi t d 6d d 6d  d 6d d 6d  d 6d  d 6|  _ d  S(   Ns   -vs	   --verboset   defaults   -qs   --quietR}   R~   s   -nRC   Rc   i%   s   -ms   -sR[   s   -ts   -ut   nR«   Rª   t   tt   u(   R   R    R€   Rœ   R   t   expected(   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_optparse.pyRT   Ñ  s    
c         C   s    |  j  |  j j ƒ  |  j ƒ d  S(   N(   R#   R    t   get_default_valuesR¿   (   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_optparse.pyt   test_basic_defaultsá  s    c         C   sW   |  j  j d d d d ƒ |  j j i d d 6d d 6ƒ |  j |  j  j ƒ  |  j ƒ d  S(   NR¼   i*   R«   iœÿÿÿ(   R    t   set_defaultsR¿   t   updateR#   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_optparse.pyt   test_mixed_defaults_postä  s    c         C   sÖ   |  j  j d d d d ƒ |  j  j d d d ƒ|  j  j d ƒ |  j j i d d 6d d 6ƒ |  j |  j  j ƒ  |  j ƒ |  j  j d ƒ |  j  j d d d  ƒ|  j j i d  d 6ƒ |  j |  j  j ƒ  |  j ƒ d  S(	   Nt   xt   barft   yt   blahs   -xR»   t   frobs   -y(	   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_optparse.pyt   test_mixed_defaults_preé  s    c         C   sí   t  |  j _ |  j j d d d d d ƒ|  j j d d d d d ƒ|  j j d d	 ƒ |  j j i d d
 6d d 6d d 6ƒ |  j |  j j ƒ  |  j ƒ |  j j	 t
 ƒ |  j j i d d
 6d d 6d	 d 6ƒ |  j |  j j ƒ  |  j ƒ d  S(   Ns   -dRC   R¶   R»   i,  s   -et   6mR¼   t   42R­   ih  t   ei*   (   Rµ   R    t   option_classR€   RÂ   R¿   RÃ   R#   RÀ   t   set_process_default_valuest   False(   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_optparse.pyt   test_process_defaultö  s    %%(   R   R   RT   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_optparse.pyRº   Ð  s
   				t   TestProgNamec           B   s2   e  Z d  Z d „  Z d „  Z d „  Z d „  Z RS(   s]   
    Test that %prog expands to the right thing in usage, version,
    and help strings.
    c         C   s   |  j  | j ƒ  | ƒ d  S(   N(   R#   t	   get_usage(   R   R    t   expected_usage(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   assertUsage	  s    c         C   s   |  j  | j ƒ  | ƒ d  S(   N(   R#   t   get_version(   R   R    t   expected_version(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   assertVersion  s    c         C   s�   t  j } zs t j j d d d ƒ t  j d <t d d d ƒ} d } |  j | | ƒ |  j | d	 ƒ |  j | | d
 d ƒ Wd  | t  j (Xd  S(   NR[   R\   s   baz.pyi    s	   %prog ...t   versions	   %prog 1.2s   Usage: baz.py ...
s
   baz.py 1.2s   
sl   Options:
  --version   show program's version number and exit
  -h, --help  show this help message and exit
(	   R?   t   argvt   ost   patht   joinR   RÕ   RØ   RQ   (   R   t	   save_argvR    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_optparse.pyt   test_default_progname  s    
	c         C   ss   t  d d d d d d ƒ } | j d ƒ | j d ƒ d	 } |  j | | ƒ |  j | d
 ƒ |  j | | d ƒ d  S(   Nt   progt   thingyRÙ   s	   %prog 0.1RS   s   %prog arg args   -hs	   --versions   Usage: thingy arg arg
s
   thingy 0.1s   
(   R   R�   RÕ   RØ   RQ   (   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_optparse.pyt   test_custom_progname!  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_optparse.pyRÒ     s
   			t   TestExpandDefaultsc           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   sH   t  d d ƒ |  _ d |  _ d |  _ |  j d |  _ |  j d |  _ d  S(   NRà   t   testsX   Usage: test [options]

Options:
  -h, --help            show this help message and exit
s"   read from FILE [default: %default]s:     -f FILE, --file=FILE  read from FILE [default: foo.txt]
s7     -f FILE, --file=FILE  read from FILE [default: none]
(   R   R    t   help_prefixt	   file_helpt   expected_help_filet   expected_help_none(   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_optparse.pyRT   .  s    		
c         C   s<   |  j  j d d d d d |  j ƒ|  j |  j  |  j ƒ d  S(   Ns   -fs   --fileR»   s   foo.txtt   help(   R    R€   Rç   RQ   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_optparse.pyt   test_option_default<  s    
c         C   sI   |  j  j d d d |  j ƒ|  j  j d d ƒ |  j |  j  |  j ƒ d  S(   Ns   -fs   --fileRê   t   files   foo.txt(   R    R€   Rç   t   set_defaultRQ   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_optparse.pyt   test_parser_default_1B  s    
c         C   sI   |  j  j d d d |  j ƒ|  j  j d d ƒ |  j |  j  |  j ƒ d  S(   Ns   -fs   --fileRê   Rì   s   foo.txt(   R    R€   Rç   RÂ   RQ   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_optparse.pyt   test_parser_default_2H  s    
c         C   s6   |  j  j d d d |  j ƒ|  j |  j  |  j ƒ d  S(   Ns   -fs   --fileRê   (   R    R€   Rç   RQ   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_optparse.pyt   test_no_defaultN  s    
c         C   s<   |  j  j d d d d  d |  j ƒ|  j |  j  |  j ƒ d  S(   Ns   -fs   --fileR»   Rê   (   R    R€   R   Rç   RQ   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_optparse.pyt   test_default_none_1S  s    
c         C   sI   |  j  j d d d |  j ƒ|  j  j d d  ƒ |  j |  j  |  j ƒ d  S(   Ns   -fs   --fileRê   Rì   (   R    R€   Rç   RÂ   R   RQ   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_optparse.pyt   test_default_none_2Y  s    
c         C   sP   |  j  j d d d d ƒ|  j  j d d ƒ |  j d } |  j |  j  | ƒ d  S(   Ns   -ps   --probRê   s1   blow up with probability PROB [default: %default]t   probg…ëQ¸…Û?sF     -p PROB, --prob=PROB  blow up with probability PROB [default: 0.43]
(   R    R€   RÂ   Ræ   RQ   (   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_optparse.pyt   test_float_default_  s    		c         C   sH   |  j  j d d d d d d ƒd |  j  j _ |  j |  j  |  j ƒ d  S(   Ns   -fs   --fileR»   s   foo.txtRê   s#   read from FILE [default: *DEFAULT*]s	   *DEFAULT*(   R    R€   t	   formattert   default_tagRQ   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_optparse.pyt   test_alt_expandh  s
    c         C   sR   |  j  j d d d d d d ƒd  |  j  j _ |  j d } |  j |  j  | ƒ d  S(   Ns   -fs   --fileR»   s   foo.txtRê   s   read from %default files0     -f FILE, --file=FILE  read from %default file
(   R    R€   R   Rõ   Rö   Ræ   RQ   (   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_optparse.pyt   test_no_expando  s    (   R   R   RT   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_optparse.pyRä   -  s   										t   TestStandardc           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 d „  Z d „  Z d „  Z d „  Z RS(   c         C   sX   t  d d d ƒt  d d d d d d ƒt  d	 d
 d ƒg } t d t d | ƒ |  _ d  S(   Ns   -aRC   R¥   s   -bs   --booRc   R}   t   boos   --fooR^   t   appendRS   t   option_list(   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_optparse.pyRT   |  s
    c         C   s   |  j  d g d ƒ d  S(   Ns   -as   -a option requires an argument(   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_optparse.pyt   test_required_value„  s    c         C   s   |  j  d d g d ƒ d  S(   Ns   -bt   5xs&   option -b: invalid integer value: '5x'(   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_optparse.pyt   test_invalid_integer‡  s    c         C   s   |  j  d g d ƒ d  S(   Ns   --boo13s   no such option: --boo13(   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_optparse.pyt   test_no_such_option‹  s    c         C   s   |  j  d g d ƒ d  S(   Ns   --boo=x5s)   option --boo: invalid integer value: 'x5'(   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_optparse.pyt   test_long_invalid_integerŽ  s    c         C   s,   |  j  g  i d  d 6d  d 6d  d 6g  ƒ d  S(   Nt   aRú   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_optparse.pyt
   test_empty’  s    c         C   s>   |  j  d d d d g i d d 6d  d 6d d g d 6g  ƒ d  S(	   Ns   -aR   s
   --foo=blahs   --foo=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_optparse.pyt"   test_shortopt_empty_longopt_append•  s    c         C   sD   |  j  d d d d d g i d  d 6d  d 6d d d g d 6g  ƒ d  S(	   Ns   --fooR\   R   s   --foo=xR  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_optparse.pyt   test_long_option_appendš  s
    
c         C   s/   |  j  d g i d d 6d  d 6d  d 6g  ƒ d  S(   Ns   -abct   bcR  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_optparse.pyt   test_option_argument_joined¡  s    c         C   s2   |  j  d d g i d d 6d  d 6d  d 6g  ƒ d  S(   Ns   -at   34R  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_optparse.pyt   test_option_argument_split¦  s    c         C   s/   |  j  d g i d  d 6d d 6d  d 6g  ƒ d  S(   Ns   -b34R  i"   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_optparse.pyt#   test_option_argument_joined_integer«  s    c         C   s2   |  j  d d g i d  d 6d d 6d  d 6g  ƒ d  S(   Ns   -bs   -5R  iûÿÿÿ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_optparse.pyt+   test_option_argument_split_negative_integer°  s    c         C   s/   |  j  d g i d  d 6d d 6d  d 6g  ƒ d  S(   Ns   --boo=13R  i   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_optparse.pyt    test_long_option_argument_joinedµ  s    c         C   s2   |  j  d d g i d  d 6d d 6d  d 6g  ƒ d  S(   Ns   --boot   111R  io   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_optparse.pyt   test_long_option_argument_splitº  s    c         C   s5   |  j  d d g i d d 6d  d 6d g d 6g  ƒ d  S(   Ns	   --foo=bars   -axyzt   xyzR  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_optparse.pyt   test_long_option_short_option¿  s    c         C   s5   |  j  d d g i d d 6d  d 6d g d 6g  ƒ d  S(   Ns   --f=bars   -axyzR  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_optparse.pyt   test_abbrev_long_optionÄ  s    c         C   sG   |  j  j g  ƒ \ } } |  j  j ƒ  } |  j t | ƒ t | ƒ ƒ 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_optparse.pyt   test_defaultsÉ  s    c         C   s9   |  j  j d d d d d d d ƒ|  j d g d	 ƒ d  S(
   Ns   --fozR^   Rl   RC   R¥   R}   R[   s   --f=bars%   ambiguous option: --f (--foo, --foz?)(   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_optparse.pyt   test_ambiguous_optionÎ  s    c         C   s>   |  j  d d d d g i d d 6d  d 6d g d 6g  ƒ f d  S(   Ns   -aR  s   --fooR\   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_optparse.pyt    test_short_and_long_option_splitÕ  s    c         C   sA   |  j  d d d d d g i d  d 6d d 6d	 d g d
 6g  ƒ d  S(   Ns	   --foo=bars   -bt   123s   --fooRž   R  i{   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_optparse.pyt*   test_short_option_split_long_option_appendÚ  s    c         C   s;   |  j  d d d g i d d 6d  d 6d  d 6d g ƒ f d  S(   Ns   -aR[   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_optparse.pyt*   test_short_option_split_one_positional_argß  s    c         C   s{   |  j  d d d d g i d d 6d  d 6d  d 6d d g ƒ f |  j  d d d d g i d d 6d  d 6d g d 6g  ƒ f d  S(   Ns   -as   --R[   R\   R  Rú   s   --foo(   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_optparse.pyt$   test_short_option_consumes_separatorä  s    c         C   sA   |  j  d d d d g i d d 6d  d 6d  d 6d d g ƒ f d  S(	   Ns   -abs   --s   --fooR\   RW   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_optparse.pyt&   test_short_option_joined_and_separatorì  s    c         C   s>   |  j  d d d d g i d d 6d  d 6d g d 6d g ƒ d  S(	   Ns   -abt   -s   --fooR\   RW   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_optparse.pyt"   test_hyphen_becomes_positional_argñ  s    c         C   sD   |  j  d d d d d d g i d  d 6d d	 6d
 d g d 6g  ƒ d  S(   Ns   -b3s   -bt   5s	   --foo=bars   --fooRž   R  i   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_optparse.pyt   test_no_append_versus_appendö  s    c         C   s2   |  j  d d g i d d 6d  d 6d  d 6g  ƒ d  S(   Ns   -as   -b3R  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_optparse.pyt&   test_option_consumes_optionlike_stringû  s    c         C   s-   |  j  j d d d ƒ|  j d g d ƒ d  S(   Ns   -tR^   R|   s   -tests   no such option: -e(   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_optparse.pyt#   test_combined_single_invalid_option   s    c         C   sO   |  j  j d d d d ƒ|  j d g i d  d 6d  d 6d  d 6t d	 6g  ƒ d  S(
   Nu   -uu	   --unicodeR^   R|   s   -uR  Rú   R[   t   unicode(   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_optparse.pyt   test_add_option_accepts_unicode  s    (   R   R   RT   Rý   Rÿ   R   R  R  R  R  R  R	  R
  R  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_optparse.pyRù   {  s8   																											t   TestBoolc           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c      	   C   sR   t  d d d d d d d d ƒt  d	 d
 d d d d ƒg } t d | ƒ |  _ d  S(   Ns   -vs	   --verboseR^   R|   R}   R~   R»   R   s   -qs   --quietR   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_optparse.pyRT     s    c         C   s   |  j  g  i d d 6g  ƒ d  S(   NR   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_optparse.pyt   test_bool_default  s    	
c         C   s?   |  j  d g i d d 6g  ƒ \ } } |  j | j t k ƒ d  S(   Ns   -qi    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_optparse.pyt   test_bool_false  s    
c         C   s?   |  j  d g i d d 6g  ƒ \ } } |  j | j t k ƒ d  S(   Ns   -vi   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_optparse.pyt   test_bool_true$  s    
c         C   s'   |  j  d d d g i d d 6g  ƒ d  S(   Ns   -qvqs   -qs   -vi   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_optparse.pyt   test_bool_flicker_on_and_off*  s    
(   R   R   RT   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_optparse.pyR"    s
   				t
   TestChoicec           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   sG   t  d t ƒ |  _ |  j j d d d d d d d d d	 d
 d g ƒd  S(   NRS   s   -cR^   Rl   RC   Re   R}   Rg   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_optparse.pyRT   0  s    c         C   s*   |  j  d d d g i d d 6d g ƒ d  S(   Ns   -cR(  R  Re   (   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_optparse.pyt   test_valid_choice5  s    
c         C   s   |  j  d d d g d ƒ d  S(   Ns   -ct   fourt   abcsE   option -c: invalid choice: 'four' (choose from 'one', 'two', 'three')(   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_optparse.pyt   test_invalid_choice:  s    c         C   s^   |  j  j d d d d d d g ƒ|  j  j d ƒ } |  j | j d ƒ |  j | j d ƒ d  S(	   Ns   -ds	   --defaultRg   R,  t   fivet   sixRe   Rl   (   R    R€   Rƒ   R#   RC   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_optparse.pyt   test_add_choice_option?  s
    (   R   R   RT   R+  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_optparse.pyR'  /  s   			t	   TestCountc           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 RS(   c      	   C   s…   t  d t ƒ |  _ t d d d d d ƒ|  _ |  j j |  j ƒ |  j j d d d	 d d ƒ|  j j d
 d d d d d d d ƒd  S(   NRS   s   -vR^   Rb   R}   R~   s	   --verboseRC   Rc   s   -qs   --quiett   store_constRm   i    (   R   R   R    R   t   v_optR€   (   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_optparse.pyRT   G  s    c         C   s   |  j  g  i d  d 6g  ƒ d  S(   NR~   (   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_optparse.pyR  O  s    c         C   s!   |  j  d g i d d 6g  ƒ d  S(   Ns   -vi   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_optparse.pyt   test_count_oneR  s    c         C   s!   |  j  d g i d d 6g  ƒ d  S(   Ns   -vvvi   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_optparse.pyt   test_count_threeU  s    c         C   s'   |  j  d d d g i d d 6g  ƒ d  S(   Ns   -vi   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_optparse.pyt   test_count_three_apartX  s    c         C   s$   |  j  d d g i d d 6g  ƒ d  S(   Ns   -vvvs   --verbose=2i   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_optparse.pyt   test_count_override_amount[  s    c         C   s'   |  j  d d d g i d d 6g  ƒ d  S(   Ns   -vvvs   --verbose=2s   -qi    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_optparse.pyt   test_count_override_quiet^  s    c         C   s*   |  j  d d d d g i d d 6g  ƒ d  S(   Ns   -vvvs   --verbose=2s   -qs   -vi   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_optparse.pyt   test_count_overridinga  s    c         C   s*   |  j  d d d g i d d 6d g ƒ d  S(   Ns   --quiett   3s   -vi   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_optparse.pyt   test_count_interspersed_argse  s    
c         C   s:   |  j  j ƒ  |  j d d d g i d d 6d d g ƒ d  S(   Ns   --quietR;  s   -vi    R~   (   R    t   disable_interspersed_argsR+   (   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_optparse.pyt   test_count_no_interspersed_argsj  s    
c         C   s   |  j  d d g d ƒ d  S(   Ns   -q3s   -vs   no such option: -3(   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_optparse.pyt   test_count_no_such_optionp  s    c         C   s   |  j  d d g d ƒ d  S(   Ns	   --quiet=3s   -vs$   --quiet option does not take a 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_optparse.pyt   test_count_option_no_values  s    c         C   s1   |  j  j d d ƒ |  j g  i d d 6g  ƒ d  S(   NR~   i    (   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_optparse.pyt   test_count_with_defaultw  s    c         C   s=   |  j  j d d ƒ |  j d d d d g i d d 6g  ƒ d  S(   NR~   i    s   -vvvs   --verbose=2s   -qs   -vi   (   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_optparse.pyt   test_count_overriding_default{  s    (   R   R   RT   R  R5  R6  R7  R8  R9  R:  R<  R>  R?  R@  RA  RB  (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyR2  F  s   													t   TestMultipleArgsc           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   sA   t  d t ƒ |  _ |  j j d d d d d d d d	 d
 d ƒd  S(   NRS   s   -ps   --pointR^   Rl   Ro   i   RC   t   floatR}   t   point(   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_optparse.pyRT   �  s    c         C   s6   |  j  d d d d d d g i d d
 6d d g ƒ d  S(   NR[   s   -pt   1s   2.5s   -4.3R  g      ð?g      @g333333ÀRE  (   g      ð?g      @g333333À(   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_optparse.pyt   test_nargs_with_positional_args†  s    
c         C   s0   |  j  d d d d d g i d
 d	 6d g ƒ d  S(   Ns   --points   -1s   2.5s   -0R  g      ð¿g      @g       €RE  (   g      ð¿g      @g       €(   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_optparse.pyt   test_nargs_long_opt‹  s    
c         C   s    |  j  d d d d g d ƒ d  S(   Ns   -ps   1.0t   2xs   3.5s-   option -p: invalid floating-point value: '2x'(   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_optparse.pyt   test_nargs_invalid_float_value�  s    c         C   s   |  j  d d d g d ƒ d  S(   Ns   --points   1.0s   3.5s#   --point option requires 3 arguments(   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_optparse.pyt   test_nargs_required_values•  s    (   R   R   RT   RG  RH  RJ  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_optparse.pyRC  €  s
   				t   TestMultipleArgsAppendc           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s‘   t  d t ƒ |  _ |  j j d d d d d d d d	 d
 d ƒ|  j j d d d d d d d d d
 d ƒ|  j j d d d d d
 d d d ƒd  S(   NRS   s   -ps   --pointR^   Rl   Ro   i   RC   RD  R}   RE  s   -fs   --fooRû   i   Rc   R[   s   -zs   --zerot   append_constRm   i    (   i    i    (   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_optparse.pyRT   š  s    c         C   sC   |  j  d d d d d d d g i d  d 6d d g d 6d g ƒ d  S(   Ns   -ft   4s   -3RÈ   s   --fooRF  t   666RE  i   iýÿÿÿi   iš  R[   (   i   iýÿÿÿ(   i   iš  (   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_optparse.pyt   test_nargs_append£  s    c         C   s   |  j  d g d ƒ d  S(   Ns   -f4,3s   -f option requires 2 arguments(   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_optparse.pyt!   test_nargs_append_required_values¨  s    c         C   s.   |  j  d d g i d  d 6d g d 6g  ƒ d  S(   Ns   --foo=3RN  RE  i   i   R[   (   i   i   (   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_optparse.pyt   test_nargs_append_simple¬  s    c         C   s=   |  j  d d d d d g i d  d 6d d d g d
 6g  ƒ d  S(   Ns   --zeros   --fooR;  RN  s   -zRE  i    i   i   R[   (   i    i    (   i   i   (   i    i    (   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_optparse.pyt   test_nargs_append_const±  s    (   R   R   RT   RP  RQ  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_optparse.pyRL  ™  s
   					t   TestVersionc           B   s   e  Z d  „  Z d „  Z RS(   c         C   sm   t  d t d d ƒ |  _ t j } z9 t j j t j d d ƒ t j d <|  j	 d g d ƒ Wd  | t j (Xd  S(	   NRS   RÙ   s	   %prog 0.1R[   R\   i    s	   --versions   bar 0.1
(
   R   R   R    R?   RÚ   RÛ   RÜ   RÝ   t   curdirRJ   (   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_optparse.pyt   test_version·  s    
"c         C   s)   t  d t ƒ |  _ |  j d g d ƒ d  S(   NRS   s	   --versions   no such option: --version(   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_optparse.pyt   test_no_versionÁ  s    (   R   R   RV  RW  (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyRT  ¶  s   	
t   TestConflictingDefaultsc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s4   Conflicting default values: the last one should win.c      
   C   s1   t  d t d d d d d d d ƒg ƒ |  _ d  S(	   NRü   s   -vR^   R|   R}   R~   R»   i   (   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_optparse.pyRT   Ê  s    c         C   s@   |  j  j d d d d d d d ƒ|  j g  i d d 6g  ƒ d  S(   Ns   -qR^   R   R}   R~   R»   i    (   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_optparse.pyt   test_conflict_defaultÎ  s    c         C   s@   |  j  j d d d d d d d  ƒ|  j g  i d  d 6g  ƒ d  S(   Ns   -qR^   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_optparse.pyt   test_conflict_default_noneÓ  s    (   R   R   Rã   RT   RY  RZ  (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyRX  È  s   		t   TestOptionGroupc           B   s>   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s   t  d t ƒ |  _ d  S(   NRS   (   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_optparse.pyRT   Ù  s    c         C   s\   t  |  j d ƒ } |  j j | ƒ | j d d d d d ƒ|  j d g i d d 6g  ƒ d  S(	   Nt   Spams   --spamR^   R|   Rê   s   spam spam spam spami   t   spam(   R   R    t   add_option_groupR€   R+   (   R   t   group(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt!   test_option_group_create_instanceÜ  s
    c         C   s   |  j  |  j j d d  ƒ d  S(   Ns!   not an OptionGroup instance: None(   RL   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_optparse.pyt   test_add_group_no_groupã  s    c         C   s    |  j  |  j j d d  d  ƒ d  S(   Ns   invalid arguments(   RL   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_optparse.pyt    test_add_group_invalid_argumentsç  s    c         C   sD   t  |  j d ƒ } t ƒ  | _ |  j |  j j | f d  t d ƒ d  S(   NR\  s"   invalid OptionGroup (wrong parser)(   R   R    R   R9   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_optparse.pyt   test_add_group_wrong_parserë  s    c         C   sX   |  j  j d d d ƒ} | j d ƒ | j d d d ƒ|  j |  j  j d ƒ | ƒ d  S(   Ns   Group 2t   descriptions   Some more optionst   Bacons   --baconRC   Rc   (   R    R^  t	   set_titleR€   R/   t   get_option_group(   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_optparse.pyt   test_group_manipulateñ  s
    	(   R   R   RT   R`  Ra  Rb  Rc  Rh  (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyR[  Ø  s   					t   TestExtendAddTypesc           B   sK   e  Z d  „  Z d „  Z d e f d „  ƒ  YZ d „  Z d „  Z d „  Z RS(   c         C   s]   t  d t d |  j ƒ |  _ |  j j d d  d d d d ƒ|  j j d d	 d d
 d d
 ƒd  S(   NRS   RÎ   s   -aRC   R¥   R}   R  s   -fs   --fileRì   (   R   R   t   MyOptionR    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_optparse.pyRT   û  s    c         C   sT   t  j j t j ƒ r( t  j t j ƒ n( t  j j t j ƒ rP t  j t j ƒ n  d  S(   N(   RÛ   RÜ   t   isdirR   t   TESTFNt   rmdirt   isfilet   unlink(   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_optparse.pyt   tearDown  s    Rj  c           B   s:   e  Z d  „  Z e j d Z e j e j ƒ Z e e d <RS(   c         C   sN   t  j j | ƒ s% t d | ƒ ‚ n% t  j j | ƒ sJ t d | ƒ ‚ n  | S(   Ns   %s: file does not exists   %s: not a regular file(   RÛ   RÜ   t   existsR   Rn  (   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_optparse.pyt
   check_file  s
    Rì   (   Rì   (   R   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_optparse.pyRj    s   	c         C   sJ   t  t j d ƒ j ƒ  |  j d t j d g i t j d 6d d 6g  ƒ d  S(   Nt   ws   --files   -afooRì   R[   R  (   t   openR   Rl  t   closeR+   (   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_optparse.pyt   test_filetype_ok  s    c         C   s'   |  j  d t j d g d t j ƒ d  S(   Ns   --files   -afoos   %s: file does not exist(   R=   R   Rl  (   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_optparse.pyt   test_filetype_noexist  s    c         C   s7   t  j t j ƒ |  j d t j d g d t j ƒ d  S(   Ns   --files   -afoos   %s: not a regular file(   RÛ   t   mkdirR   Rl  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_optparse.pyt   test_filetype_notfile  s    (	   R   R   RT   Rp  R   Rj  Rv  Rw  Ry  (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyRi  ú  s   				t   TestExtendAddActionsc           B   s9   e  Z d  „  Z d e f d „  ƒ  YZ d „  Z d „  Z RS(   c      	   C   s=   |  j  d d d d d d d d ƒg } t d	 | ƒ |  _ d  S(
   Ns   -as   --appleR^   t   extendRC   R¥   R}   t   appleRü   (   Rj  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_optparse.pyRT   &  s    Rj  c           B   s8   e  Z e j d Z e j d Z e j d Z d „  Z RS(   R{  c         C   sZ   | d k r7 | j  d ƒ } | j | g  ƒ j | ƒ n t j |  | | | | | | ƒ d  S(   NR{  t   ,(   t   splitt   ensure_valueR{  R   t   take_action(   R   R^   R}   R²   R³   R¡   R    t   lvalue(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyR€  0  s
    (   R{  (   R{  (   R{  (   R   R   R   t   ACTIONSt   STORE_ACTIONSt   TYPED_ACTIONSR€  (    (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyRj  +  s   c         C   s-   |  j  d d g i d d d g d 6g  ƒ d  S(   Ns	   -afoo,bars   --apple=blahR[   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_optparse.pyt   test_extend_add_action8  s    c         C   s6   |  j  d d d d g i d d d d g d 6g  ƒ d  S(	   Ns   -aR[   s   -abars   --apple=x,yR\   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_optparse.pyt   test_extend_add_action_normal=  s    (   R   R   RT   R   Rj  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_optparse.pyRz  %  s   		t   TestCallbackc           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   s^   t  d d  d d d |  j ƒt  d d d d d |  j d d d d	 ƒg } t d
 | ƒ |  _ d  S(   Ns   -xR^   Rq   s   -fs   --fileRC   R¥   R}   t   filenameRü   (   R   R   t   process_optR   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_optparse.pyRT   E  s    		c         C   s@  | d k r� |  j  | j d g ƒ |  j  | j g  ƒ |  j | |  j k ƒ |  j | d  k ƒ |  j  t | j ƒ i d  d 6ƒ d | j _ n¯ | d k r+|  j  | j d g ƒ |  j  | j d g ƒ |  j | |  j k ƒ |  j  | d ƒ |  j  t | j ƒ i d  d 6d d 6ƒ t	 | j | j
 | ƒ n |  j d | ƒ d  S(	   Ns   -xRˆ  i*   s   --files   -fR[   RÅ   s!   Unknown option %r in process_opt.(   R#   R…   R†   R/   R    R   R"   R¡   RÅ   t   setattrR}   R2   (   R   R±   R²   R³   t   parser_(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyR‰  R  s     'c         C   s+   |  j  d d g i d d 6d d 6g  ƒ d  S(   Ns   -xs
   --file=fooR[   Rˆ  i*   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_optparse.pyt   test_callbackf  s    c         C   sa   t  d t ƒ } | j d ƒ | j d d d d d d „  d d	 d
 d ƒd } |  j | | ƒ d  S(   NRS   s   -hs   -ts   --testR^   Rq   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_optparse.pyt   <lambda>r  R   RC   R¥   Rê   R[   s%   Options:
  -t TEST, --test=TEST  foo
(   R   R   R�   R€   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_optparse.pyt   test_callback_helpk  s    (   R   R   RT   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_optparse.pyR‡  D  s   			t   TestCallbackExtraArgsc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   sU   t  d d d d d |  j d d t f d d d	 d
 d g  ƒg } t d | ƒ |  _ d  S(   Ns   -ps   --pointR^   Rq   Rt   i   RC   R¥   R}   t   pointsR»   Rü   (   R   t   process_tupleRc   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_optparse.pyRT   {  s
    	c         C   sŸ   |  j  | d ƒ |  j | t k ƒ | d k rB |  j  | d ƒ n | d k ra |  j  | d ƒ n  t t | | j d ƒ ƒ ƒ } t | j | j ƒ j	 | ƒ d  S(   Ni   s   -ps   1,2,3s   --points   4,5,6R}  (
   R#   R/   Rc   R`   t   mapR~  RA   R¡   R}   Rû   (   R   R±   R²   R³   R‹  t   lenRC   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyR‘  ‚  s    c         C   s-   |  j  d d d g i d d g d
 6g  ƒ d  S(   Ns   -p1,2,3s   --points   4,5,6i   i   i   i   i   i   R�  (   i   i   i   (   i   i   i   (   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_optparse.pyt   test_callback_extra_argsŽ  s    (   R   R   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_optparse.pyR�  z  s   		t   TestCallbackMeddleArgsc           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c      
   C   s\   g  t  d d d ƒ D]- } t t | ƒ d d d |  j d d ƒ^ q } t d | ƒ |  _ d  S(   NiÿÿÿÿiúÿÿÿR^   Rq   R}   t   thingsRü   (   t   rangeR   R,   t	   process_nR   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_optparse.pyRT   ”  s    Cc         C   s•   t  | d ƒ } | j } t | ƒ | k  rE |  j d | | f ƒ n  | j j | j g  ƒ } | j t | d | !ƒ ƒ | j	 j | ƒ | d | 5d  S(   Ni   s$   Expected %d arguments for %s option.i    (
   Rc   t   rargsR“  R2   R¡   R  R}   Rû   R`   t   largs(   R   R±   R²   R³   R‹  Ro   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_optparse.pyR˜  ›  s    	c         C   s<   |  j  d d d d d d g i d
 d g d 6d d	 g ƒ d  S(   Ns   -1R[   s   -3R\   Rž   t   quxR–  i   i   (   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_optparse.pyt   test_callback_meddle_args¦  s    c         C   s-   |  j  d d d g i d g d 6d g ƒ d  S(   Ns   -2R[   s   --R–  i   (   R[   s   --(   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_optparse.pyt#   test_callback_meddle_args_separator«  s    (   R   R   RT   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_optparse.pyR•  “  s   			t   TestCallbackManyArgsc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   sj   t  d d d d d d d |  j d d ƒt  d	 d
 d d d d d |  j d d ƒg } t d | ƒ |  _ d  S(   Ns   -as   --appleR^   Rq   Ro   i   RC   R¥   s   -bs   --bobi   Rc   Rü   (   R   t   process_manyR   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_optparse.pyRT   ±  s
    c         C   s€   | d k r |  j  | d ƒ n] | d k r> |  j  | d ƒ n> | d k r] |  j  | d ƒ n | d k r| |  j  | d ƒ n  d  S(   Ns   -aR[   R\   s   --applet   dingt   dongs   -bi   i   i   s   --bobifýÿÿi*   i    (   R[   R\   (   R   R¡  (   i   i   i   (   ifýÿÿi*   i    (   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_optparse.pyRŸ  ¸  s    c         C   sO   |  j  d d d d d d d d d	 d
 d d d d g i d  d 6d  d 6g  ƒ d  S(   Ns   -aR[   R\   s   --appleR   R¡  s   -bRF  t   2R;  s   --bobs   -666RÌ   t   0R|  t   bob(   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_optparse.pyt   test_many_argsÂ  s
    (   R   R   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_optparse.pyRž  °  s   		
t   TestCallbackCheckAbbrevc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   s/   t  ƒ  |  _ |  j j d d d d |  j ƒd  S(   Ns	   --foo-barR^   Rq   (   R   R    R€   t   check_abbrev(   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_optparse.pyRT   Ê  s    c         C   s   |  j  | d ƒ d  S(   Ns	   --foo-bar(   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_optparse.pyR§  Ï  s    c         C   s   |  j  d g i  g  ƒ d  S(   Ns   --foo(   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_optparse.pyt   test_abbrev_callback_expansionÒ  s    (   R   R   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_optparse.pyR¦  É  s   		t   TestCallbackVarArgsc           B   sG   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   ss   t  d d d d d d d ƒt  d d	 d
 d d ƒt  d d d	 d d |  j d d ƒg } t d t d | ƒ |  _ d  S(   Ns   -aRC   Rc   Ro   i   R}   R  s   -bR^   R|   RW   s   -cs
   --callbackRq   t   cRS   Rü   (   R   t   variable_argsR   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_optparse.pyRT   Ö  s    c         C   s¿   |  j  | d  k ƒ g  } | j } x€ | r¤ | d } | d  d k rW t | ƒ d k s‰ | d  d k r� t | ƒ d k r� | d d k r� Pq% | j | ƒ | d =q% Wt | j | j | ƒ d  S(   Ni    i   s   --i   R  (   R/   R   R™  R“  Rû   RŠ  R¡   R}   (   R   R±   R²   R³   R    R™  t   arg(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyR«  Þ  s    		
"2c         C   sA   |  j  d d d d d g i d d 6d  d	 6d d g d
 6g  ƒ d  S(   Ns   -a3s   -5s
   --callbackR[   R\   i   iûÿÿÿR  RW   Rª  (   i   iûÿÿÿ(   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_optparse.pyt   test_variable_argsì  s    c         C   sJ   |  j  d d d d d d g i d  d 6t d 6d d d g d	 6d g ƒ d  S(
   Ns   -ct   37s   --t   xxxs   -bt   helloR  RW   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_optparse.pyt%   test_consume_separator_stop_at_optionñ  s
    
c         C   sG   |  j  d d d d d g i d  d 6d  d 6d d d g d 6d g ƒ d  S(	   NR°  s   -cR[   R  R\   R  RW   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_optparse.pyt%   test_positional_arg_and_variable_argsø  s
    
c         C   s8   |  j  d d d g i d  d 6t d 6d g d 6g  ƒ d  S(   Ns   -cR[   s   -bR  RW   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_optparse.pyt   test_stop_at_optionÿ  s    c         C   s    |  j  d d d d g d ƒ d  S(   Ns   -cR;  s   -5s   -as   no such option: -5(   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_optparse.pyt   test_stop_at_invalid_option  s    (	   R   R   RT   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_optparse.pyR©  Õ  s   						t   ConflictBasec           B   s   e  Z d  „  Z d „  Z RS(   c      	   C   s@   t  d d d d d d d d ƒg } t d	 t d
 | ƒ |  _ d  S(   Ns   -vs	   --verboseR^   Rb   R}   R~   Rê   s   increment verbosityRS   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_optparse.pyRT     s    c         C   s   d | j  _ d  S(   Ni   (   R¡   t   show_version(   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_optparse.pyR¶    s    (   R   R   RT   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_optparse.pyRµ  
  s   	t   TestConflictc           B   s2   e  Z d  Z d „  Z d „  Z d „  Z d „  Z RS(   s9   Use the default conflict resolution for Optik 1.2: error.c         C   s]   |  j  | d
 i d d 6|  j d 6d d 6t d ƒ } |  j | j d ƒ |  j | j d	 ƒ d  S(   Ns   -vs	   --versionRq   R^   s   show versionRê   s5   option -v/--version: conflicting option string(s): -vs    conflicting option string(s): -vs   -v/--version(   s   -vs	   --version(   R9   R¶  R	   R#   R   t	   option_id(   R   R3   R7   (    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   assertTrueconflict_error  s    
	c         C   s   |  j  |  j j ƒ 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_optparse.pyt   test_conflict_error!  s    c         C   s&   t  |  j d ƒ } |  j | j ƒ d  S(   Ns   Group 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_optparse.pyt   test_conflict_error_group$  s    c         C   s#   |  j  |  j j d d  t d ƒ d  S(   NR[   s'   invalid conflict_resolution value 'foo'(   R[   (   R9   R    t   set_conflict_handlerR   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_optparse.pyt   test_no_such_conflict_handler(  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_optparse.pyR·    s
   			t   TestConflictResolvec           B   s>   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c      	   C   sI   t  j |  ƒ |  j j d ƒ |  j j d d d d d |  j d d ƒd  S(   Nt   resolves   -vs	   --versionR^   Rq   Rê   s   show version(   Rµ  RT   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_optparse.pyRT   /  s    c         C   sË   |  j  j d ƒ } |  j  j d ƒ } |  j  j d ƒ } |  j | | k ƒ |  j | | k	 ƒ |  j | j d g ƒ |  j | j d g ƒ |  j | j d g ƒ |  j | j g  ƒ |  j | j d g ƒ d  S(   Ns   -vs	   --verboses	   --version(   R    Rƒ   R/   R#   R†   R…   (   R   R4  t   verbose_optt   version_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_optparse.pyt   test_conflict_resolve5  s    c         C   s   |  j  d g d ƒ d  S(   Ns   -hs}   Options:
  --verbose      increment verbosity
  -h, --help     show this help message and exit
  -v, --version  show version
(   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_optparse.pyt   test_conflict_resolve_helpB  s    c         C   s(   |  j  d g i d  d 6d d 6g  ƒ d  S(   Ns   -vR~   i   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_optparse.pyt   test_conflict_resolve_short_optJ  s    c         C   s!   |  j  d g i d d 6g  ƒ d  S(   Ns	   --verbosei   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_optparse.pyt   test_conflict_resolve_long_optO  s    
c         C   s+   |  j  d d g i d d 6d d 6g  ƒ d  S(   Ns	   --verboses	   --versioni   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_optparse.pyt   test_conflict_resolve_long_optsT  s    (   R   R   RT   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_optparse.pyR¾  .  s   					t   TestConflictOverridec           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   sv   t  d t ƒ |  _ |  j j d ƒ |  j j d d d d d d d	 d
 ƒ|  j j d d d d d d d d d	 d ƒd  S(   NRS   R¿  s   -ns	   --dry-runR^   R|   R}   t   dry_runRê   s   don't do anythingR3  Rm   i*   s   dry run mode(   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_optparse.pyRT   Z  s    c         C   sB   |  j  j d ƒ } |  j | j d g ƒ |  j | j d g ƒ d  S(   Ns	   --dry-runs   -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_optparse.pyt   test_conflict_override_optsd  s    c         C   s   |  j  d g d ƒ d  S(   Ns   -hsX   Options:
  -h, --help     show this help message and exit
  -n, --dry-run  dry run mode
(   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_optparse.pyt   test_conflict_override_helpi  s    c         C   s!   |  j  d g i d d 6g  ƒ d  S(   Ns   -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_optparse.pyt   test_conflict_override_argsp  s    
(   R   R   RT   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_optparse.pyRÇ  Y  s   	
		sS  Usage: bar.py [options]

Options:
  -a APPLE           throw APPLEs at basket
  -b NUM, --boo=NUM  shout "boo!" NUM times (in order to frighten away all the
                     evil spirits that cause trouble and mayhem)
  --foo=FOO          store FOO in the foo list for later fooing
  -h, --help         show this help message and exit
sS  Usage: bar.py [options]

Options:
  -a APPLE           throw APPLEs at basket
  --boo=NUM, -b NUM  shout "boo!" NUM times (in order to frighten away all the
                     evil spirits that cause trouble and mayhem)
  --foo=FOO          store FOO in the foo list for later fooing
  --help, -h         show this help message and exit
sW  Usage
=====
  bar.py [options]

Options
=======
-a APPLE           throw APPLEs at basket
--boo=NUM, -b NUM  shout "boo!" NUM times (in order to frighten away all the
                   evil spirits that cause trouble and mayhem)
--foo=FOO          store FOO in the foo list for later fooing
--help, -h         show this help message and exit
s}  Usage: bar.py [options]

Options:
  -a APPLE           throw APPLEs at basket
  -b NUM, --boo=NUM  shout "boo!" NUM times (in order to
                     frighten away all the evil spirits
                     that cause trouble and mayhem)
  --foo=FOO          store FOO in the foo list for later
                     fooing
  -h, --help         show this help message and exit
s~  Usage: bar.py [options]

Options:
  -a APPLE
    throw
    APPLEs at
    basket
  -b NUM, --boo=NUM
    shout
    "boo!" NUM
    times (in
    order to
    frighten
    away all
    the evil
    spirits
    that cause
    trouble and
    mayhem)
  --foo=FOO
    store FOO
    in the foo
    list for
    later
    fooing
  -h, --help
    show this
    help
    message and
    exit
t   TestHelpc           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         C   s   |  j  d ƒ |  _ d  S(   NiP   (   t   make_parserR    (   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_optparse.pyRT   Ê  s    c         C   s¢   t  d d d d d d d d d	 ƒt  d
 d d d d d d d d d ƒt  d d d d d d d d d ƒg } t j ƒ  �$ } t | ƒ | d <t d | ƒ SWd  QXd  S(   Ns   -aRC   R¥   R}   R  t   metavart   APPLERê   s   throw APPLEs at baskets   -bs   --booRc   Rú   t   NUMse   shout "boo!" NUM times (in order to frighten away all the evil spirits that cause trouble and mayhem)s   --fooR^   Rû   R[   s*   store FOO in the foo list for later fooingt   COLUMNSRü   (   R   R   t   EnvironmentVarGuardR,   R   (   R   t   columnsR(   t   env(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyRÍ  Í  s    c         C   sŽ   t  | ƒ t j k r? |  j j t j ƒ } | j | d ƒ } n  t j } z3 t	 j
 j d d ƒ t j d <|  j d g | ƒ Wd  | t j (Xd  S(   Nt   replaceR[   s   bar.pyi    s   -h(   RC   RD   t   UnicodeTypeR    t   _get_encodingR?   R@   t   encodeRÚ   RÛ   RÜ   RÝ   RJ   (   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_optparse.pyt   assertHelpEqualsâ  s    
c         C   s   |  j  t ƒ d  S(   N(   RÙ  t   _expected_help_basic(   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_optparse.pyt	   test_helpï  s    c         C   s!   |  j  j d ƒ |  j t ƒ d  S(   Ns   Usage: %prog [options](   R    t	   set_usageRÙ  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_optparse.pyt   test_help_old_usageò  s    c         C   s    d |  j  j _ |  j t ƒ d  S(   Ni    (   R    Rõ   t   short_firstRÙ  t   _expected_help_long_opts_first(   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_optparse.pyt   test_help_long_opts_firstö  s    c         C   s?   t  j ƒ  �- } d | d <t ƒ  |  j _ |  j t ƒ Wd  QXd  S(   Nt   80RÑ  (   R   RÒ  R   R    Rõ   RÙ  t   _expected_help_title_formatter(   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_optparse.pyt   test_help_title_formatterú  s    
c         C   sB   |  j  d ƒ |  _ |  j t ƒ |  j  d ƒ |  _ |  j t ƒ d  S(   Ni<   i    (   RÍ  R    RÙ  t   _expected_help_short_linest   _expected_very_help_short_lines(   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_optparse.pyt   test_wrap_columns   s    c         C   sE   t  d t ƒ |  _ |  j j d d d d d ƒd } |  j | ƒ d  S(   NRS   s   -aR^   R|   Rê   u   olÃ©!uK   Options:
  -h, --help  show this help message and exit
  -a          olÃ©!
(   R   R   R    R€   RÙ  (   R   t   expect(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   test_help_unicode	  s    c         C   s/   t  d t d d ƒ |  _ d } |  j | ƒ d  S(   NRS   Rd  u   olÃ©!u>   olÃ©!

Options:
  -h, --help  show this help message and exit
(   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_optparse.pyt   test_help_unicode_description  s    c         C   s‚   |  j  j d ƒ t |  j  d d ƒ } | j d d d d d ƒ|  j  j | ƒ d	 } |  j | ƒ d
 |  j  _ |  j | d ƒ d  S(   Ns`   This is the program description for %prog.  %prog has an option group as well as single options.s   Dangerous OptionssZ   Caution: use of these options is at your own risk.  It is believed that some of them bite.s   -gR^   R|   Rê   s   Group option.sT  Usage: bar.py [options]

This is the program description for bar.py.  bar.py has an option group as
well as single options.

Options:
  -a APPLE           throw APPLEs at basket
  -b NUM, --boo=NUM  shout "boo!" NUM times (in order to frighten away all the
                     evil spirits that cause trouble and mayhem)
  --foo=FOO          store FOO in the foo list for later fooing
  -h, --help         show this help message and exit

  Dangerous Options:
    Caution: use of these options is at your own risk.  It is believed
    that some of them bite.

    -g               Group option.
s    Please report bugs to /dev/null.s"   
Please report bugs to /dev/null.
(   R    t   set_descriptionR   R€   R^  RÙ  t   epilog(   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_optparse.pyt   test_help_description_groups  s    			(   R   R   RT   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_optparse.pyRÌ  É  s   										
	t   TestMatchAbbrevc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s9   |  j  t d i d  d 6d  d 6d  d 6d  d 6ƒ d ƒ d  S(   Ns   --fs   --fozs   --foos   --fie(   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_optparse.pyt   test_match_abbrevE  s    

c         C   sD   d } i d  d 6d  d 6d  d 6} |  j t | | f d  t d ƒ d  S(   Ns   --fs   --fozs   --foos   --fies,   ambiguous option: --f (--fie, --foo, --foz?)(   R   R9   R   R
   (   R   Rª   t   wordmap(    (    sˆ   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_optparse.pyt   test_match_abbrev_errorM  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_optparse.pyRí  D  s   	t   TestParseNumberc           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   s<   t  ƒ  |  _ |  j j d d t ƒ|  j j d d t ƒd  S(   Ns   -nRC   s   -l(   R   R    R€   Rc   t   long(   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_optparse.pyRT   V  s    c         C   sT   |  j  t d t f i  t t j d ƒ ƒ |  j  t d t f i  t t j d ƒ ƒ d  S(   NR   s!   invalid literal for int().*: '?'?t   0xOoopss)   invalid literal for long().*: '?0xOoops'?(   R9   R   Rc   R“   t   ret   compileRò  (   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_optparse.pyt   test_parse_num_fail[  s    c         C   sš   |  j  t d t ƒ d ƒ |  j  t d t ƒ d ƒ |  j  t d t ƒ d ƒ |  j  t d t ƒ d ƒ |  j  t d	 t ƒ d
 ƒ |  j  t d t ƒ d ƒ d  S(   NR£  i    t   0x10i   t   0XAl   
 t   010l    t   0b11i   t   0bl    (   R#   R   Rc   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_optparse.pyt   test_parse_num_oke  s    c         C   s—   |  j  d d d d g i d d 6d d 6g  ƒ |  j  d d	 d
 g i d d 6d d 6g  ƒ |  j d g d ƒ |  j d g d ƒ |  j d d g d ƒ d  S(   Ns   -nRÌ   s   -lt   0x20i*   R¼   i    t   lt   0b0101s   -l010i   i   s   -n008s'   option -n: invalid integer value: '008's   -l0b0123s/   option -l: invalid long integer value: '0b0123't   0x12xs.   option -l: invalid long integer value: '0x12x'(   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_optparse.pyt   test_numeric_optionsm  s    (   R   R   RT   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_optparse.pyRñ  U  s   		
	c           C   s   t  j t ƒ d  S(   N(   R   t   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_optparse.pyt	   test_mainz  s    t   __main__i  i  i€Q (H   R?   RÛ   Rô  R¸   RD   t   unittestR    Rå   R   t   optparseR   R   R   R   R   R   R   R	   R
   R   R   R   R   RC   Rõ  R.   t	   ExceptionR   R   t   TestCaseR   RR   R{   R�   R¤   R¯   R´   Rµ   Rº   RÒ   Rä   Rù   R"  R'  R2  RC  RL  RT  RX  R[  Ri  Rz  R‡  R�  R•  Rž  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_optparse.pyt   <module>	   sp   L˜|O"	
3*N‘#:"+65
+'!{%	