Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.191.22.207
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_optparse.pyo
�
?��cc@sZddlZddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZmZddl	mZddl	mZeejd��Zdefd	��YZd
e
fd��YZdejfd
��YZdefd��YZdefd��YZ defd��YZ!defd��YZ"idd6dd6d]d6d_d6Z#d�Z$defd��YZ%d efd!��YZ&d"efd#��YZ'd$efd%��YZ(d&efd'��YZ)d(efd)��YZ*d*efd+��YZ+d,efd-��YZ,d.efd/��YZ-d0efd1��YZ.d2efd3��YZ/d4efd5��YZ0d6efd7��YZ1d8efd9��YZ2d:efd;��YZ3d<efd=��YZ4d>efd?��YZ5d@efdA��YZ6dBefdC��YZ7dDefdE��YZ8dFefdG��YZ9dHefdI��YZ:dJe:fdK��YZ;dLe:fdM��YZ<dNefdO��YZ=dPZ>dQZ?dRZ@dSZAdTZBdUefdV��YZCdWefdX��YZDdYefdZ��YZEd[�ZFeGd\krVeF�ndS(`i����N(tStringIO(ttest_support(tmake_optiontOptiontTitledHelpFormattertOptionParsertOptionGrouptSUPPRESS_USAGEtOptionErrortOptionConflictErrortBadOptionErrortOptionValueErrortValues(t
_match_abbrev(t
_parse_numttInterceptedErrorcBs#eZdddd�Zd�ZRS(cCs||_||_||_dS(N(t
error_messagetexit_statustexit_message(tselfRRR((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt__init__s		cCs|jp|jpdS(Nsintercepted error(RR(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt__str__&sN(t__name__t
__module__tNoneRR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRstInterceptingOptionParsercBs eZddd�Zd�ZRS(icCstd|d|��dS(NRR(R(Rtstatustmsg((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytexit*scCstd|��dS(NR(R(RR((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyterror-sN(RRRRR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR)stBaseTestcBsDeZd�Zd�Zd�Zddd�Zd�Zd�ZRS(cCsb|jj|�\}}t|�}|j||dt��|j||dt��||fS(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.(tparsert
parse_argstvarstassertEqualtlocals(Rtargst
expected_optstexpected_positional_argstoptionstpositional_argstoptdict((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt
assertParseOK2s
cCs�|dkrd}n|dkr*i}ny|||�Wnu|k
r�}t|�}t|t�r�|j|j|�d|j|f�n|j||d||f�|SX|jdt	��dS(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.
        sLexpected exception message pattern:
/%s/
actual exception message:
'''%s'''
sHexpected exception message:
'''%s'''
actual exception message:
'''%s'''
snexpected exception %(expected_exception)s not raised
called %(func)r
with args %(args)r
and kwargs %(kwargs)r
N((
Rtstrt
isinstancetretypet
assertTruetsearchtpatternR#tfailR$(RtfuncR%tkwargstexpected_exceptiontexpected_messageterrtactual_message((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytassertRaisesPs"			cCsNy|jj|�Wn&tk
r<}|j|j|�nX|jd�dS(s�
        Assert the parser fails with the expected message.  Caller
        must ensure that self.parser is an InterceptingOptionParser.
        sexpected parse failureN(R R!RR#RtassertFalse(Rtcmdline_argstexpected_outputR7((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytassertParseFail�s
ic	Cstj}t|dd�}yUz5t�t_|rB|tj_n|jj|�Wdtjj�}|t_XWn�t	k
r}|j
t|�tj
kdt|��||kr�|jd|d|d�n|j|j|�|j|j|�nX|jd�dS(s7Assert the parser prints the expected output on stdout.tencodingNs0expected output to be an ordinary string, not %rsexpected: 
'''
s'''
but got 
'''
s'''sexpected parser.exit()(tsyststdouttgetattrRRR>R R!tgetvalueRR/ttypettypest
StringTypeR2R#RRR:(	RR;R<texpected_statustexpected_errortsave_stdoutR>toutputR7((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytassertOutput�s*	cGs|j||dt|�dS(s4Assert that TypeError is raised when executing func.N(R9Rt	TypeError(RR3R6R%((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytassertTypeError�scCs>|j�}||kr:|jd|d|d��ndS(Nshelp text failure; expected:
"s	"; got:
"s"
(tformat_helptfailureException(RR t
expected_helptactual_help((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt
assertHelp�sN(	RRR+R9R=RRJRLRQ(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR1s		;		tTestOptionCheckscBs�eZd�Zgid�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCstdt�|_dS(Ntusage(RRR (R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytsetUp�scCs|jt||t|�dS(N(R9RR(RR6R%R4((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytassertOptionError�scCs|jtd�dS(Ns+at least one option string must be supplied(RLR(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_opt_string_empty�s	cCs|jddg�dS(Ns?invalid option string 'b': must be at least two characters longtb(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_opt_string_too_short�scCs|jddg�dS(NsOinvalid short option string '--': must be of the form -x, (x any non-dash char)s--(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_opt_string_short_invalid�scCs|jddg�dS(NsJinvalid long option string '---': must start with --, followed by non-dashs---(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_opt_string_long_invalid�scCs(|jddgidd6dd6�dS(Ns.option -b: invalid keyword arguments: bar, foos-btfootbar(RUR(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_attr_invalid�scCs!|jddgidd6�dS(Ns option -b: invalid action: 'foo's-bR[taction(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_action_invalid�scCs>|jddgidd6�|jddgitd6�dS(Ns%option -b: invalid option type: 'foo's-bR[RCs'option -b: invalid option type: 'tuple'(RUttuple(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_type_invalid�scCs(|jddgidd6dd6�dS(Ns4option -b: must not supply a type for action 'count's-btcountR^tintRC(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_type_for_action�scCs$|jdddgidd6�dS(Ns@option -b/--bad: must supply a list of choices for type 'choice's-bs--badtchoiceRC(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_choices_list�scCs>td�j}|jd|ddgidd6dd6�dS(	NRsBoption -b/--bad: choices must be a list of strings ('%s' supplied)s-bs--badReRCsbad choicestchoices(RCRRU(Rttypename((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_bad_choices_lists	cCs(|jddgidd6dd6�dS(Ns1option -b: must not supply choices for type 'int's-bRcRCtbadRg(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_choices_for_typescCs(|jddgidd6dd6�dS(Ns:option -b: 'const' must not be supplied for action 'store's-btstoreR^itconst(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_const_for_actionscCs(|jddgidd6dd6�dS(Ns:option -b: 'nargs' must not be supplied for action 'count's-bRbR^itnargs(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_nargs_for_actionscCs(|jddgidd6dd6�dS(Ns'option -b: callback not callable: 'foo's-btcallbackR^R[(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_callback_not_callablescCsdS(N((R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytdummy scCs2|jddgidd6|jd6dd6�dS(NsAoption -b: callback_args, if supplied, must be a tuple: not 'foo's-bRqR^R[t
callback_args(RURs(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_callback_args_no_tuple#s

cCs2|jddgidd6|jd6dd6�dS(NsBoption -b: callback_kwargs, if supplied, must be a dict: not 'foo's-bRqR^R[tcallback_kwargs(RURs(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_callback_kwargs_no_dict+s

cCs(|jddgidd6dd6�dS(Ns<option -b: callback supplied ('foo') for non-callback options-bRlR^R[Rq(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_callback_for_action3scCs(|jddgidd6dd6�dS(Ns9option -b: callback_args supplied for non-callback options-bRlR^R[Rt(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt test_no_callback_args_for_action9scCs(|jddgidd6dd6�dS(Ns;option -b: callback_kwargs supplied for non-callback options-bRlR^R[Rv(RU(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt"test_no_callback_kwargs_for_action?s(RRRTRURVRXRYRZR]R_RaRdRfRiRkRnRpRrRsRuRwRxRyRz(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRR�s,																				tTestOptionParsercBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zej
d
de�d��ZRS(
c	CsWt�|_|jjdddddddd�|jjd	d
ddddd�dS(
Ns-vs	--verboses-ns--noisyR^t
store_truetdesttverboses-qs--quiets--silenttstore_false(RR t
add_option(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRTFs

cCs|j|jjdd�dS(Nsnot an Option instance: None(RLR R�R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_add_option_no_OptionMscCs |j|jjddd�dS(Nsinvalid arguments(RLR R�R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt!test_add_option_invalid_argumentsQscCs~|jjd�}|j|t�|j|jddg�|j|jddg�|j|jd�|j|jd�dS(Ns-vs-ns	--verboses--noisyR|R~(	R t
get_optiontassertIsInstanceRR#t_short_optst
_long_optsR^R}(Rtopt1((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_get_optionUscCsz|jjd�}|jjd�}|jjd�}|jjd�}|j||kop|kop|kn�dS(Ns-vs	--verboses-ns--noisy(R R�R/(RR�topt2topt3topt4((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_get_option_equals]s
cCs6|j|jjd��|j|jjd��dS(Ns-vs	--verbose(R/R t
has_option(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_has_optiondscCs|j|jjd�dk�|j|jjd�dk�|j|jjd�dk�|j|jjd�dk�|j|jjd��|j|jjd��|j|jjd��|j|jjd��|j|jjd��|j|jjd��dS(Ns-vs	--verboses-ns--noisys-qs--silent(R/R R�RR:R�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytassertTrueremovedhscCs|jjd�|j�dS(Ns-n(R t
remove_optionR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_remove_short_optvscCs|jjd�|j�dS(Ns	--verbose(R R�R�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_remove_long_optzscCs#|j|jjddtd�dS(NR[sno such option 'foo'(R[(R9R R�Rt
ValueError(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_remove_nonexistent~ssRelies on sys.getrefcounttcpythoncCsddg}tj|�}t�}|jdd�||_|j�~|j|tj|��dS(Ni*s-as	--aaarggh(R?tgetrefcountRR�t	big_thingtdestroyR#(RR�trefcountR ((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_refleak�s			
(RRRTR�R�R�R�R�R�R�R�R�Rtimpl_detailtTrueR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR{Es										tTestOptionValuescBseZd�Zd�ZRS(cCsdS(N((R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�scCs�t�}|jt|�i�|j|i�|j|idd6�|j|d�idd6dd6}td|�}|jt|�|�|j||�|j|idd6�|j|i�|j|d�|j|g�dS(NR\R[Ri*tbaztdefaults(RR#R"tassertNotEqual(Rtvaluestdict((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_basics�s	(RRRTR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s	tTestTypeAliasescBs,eZd�Zd�Zd�Zd�ZRS(cCst�|_dS(N(RR (R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�scCs9|jjddd�|j|jjd�jd�dS(Ns-sRCR,tstring(R R�R#R�RC(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_str_aliases_string�scCsn|jjddt�|j|jjd�jd�|jjddt�|j|jjd�jd�dS(Ns-sRCR�s-xRc(R R�R,R#R�RCRc(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_new_type_object�scCst|jjddtj�|j|jjd�jd�|jjddtj�|j|jjd�jd�dS(Ns-sRCR�s-xRc(R R�RDRER#R�RCtIntType(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_old_type_object�s(RRRTR�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s			itsi<tmthitdcCsly8|dj�rt|�St|d �t|dSWn-ttfk
rgtd||f��nXdS(Ni����soption %s: invalid duration: %r(tisdigitRct_time_unitsR�t
IndexErrorR(toptiontopttvalue((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt_check_duration�s
tDurationOptioncBs1eZejdZejej�Zeed<RS(tduration(R�(RRRtTYPEStcopytTYPE_CHECKERR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s
tTestDefaultValuescBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCs�t�|_|jjdddt�|jjdddd�|jjdd	d
dd�|jjdd	d
�|jjd
dd�|jjd�|jjddd�itd6dd6dd6dd6dd6dd6|_dS(Ns-vs	--verbosetdefaults-qs--quietR}R~s-nRCRci%s-ms-sR[s-ts-utnR�R�tttu(RR R�R�Rtexpected(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�s
cCs |j|jj�|j�dS(N(R#R tget_default_valuesR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_basic_defaults�scCsW|jjdddd�|jjidd6dd6�|j|jj�|j�dS(NR�i*R�i����(R tset_defaultsR�tupdateR#R�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_mixed_defaults_post�scCs�|jjdddd�|jjddd�|jjd�|jjidd6dd6�|j|jj�|j�|jjd�|jjddd�|jjidd6�|j|jj�|j�dS(	Ntxtbarftytblahs-xR�tfrobs-y(	R R�R�R�R�R#R�R�R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_mixed_defaults_pre�scCs�t|j_|jjddddd�|jjddddd�|jjdd	�|jjidd
6dd6d
d6�|j|jj�|j�|jj	t
�|jjidd
6dd6d	d6�|j|jj�|j�dS(Ns-dRCR�R�i,s-et6mR�t42R�ihtei*(R�R toption_classR�R�R�R�R#R�tset_process_default_valuestFalse(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_process_default�s%%(RRRTR�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s
				
tTestProgNamecBs2eZdZd�Zd�Zd�Zd�ZRS(s]
    Test that %prog expands to the right thing in usage, version,
    and help strings.
    cCs|j|j�|�dS(N(R#t	get_usage(RR texpected_usage((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytassertUsage	scCs|j|j�|�dS(N(R#tget_version(RR texpected_version((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt
assertVersionscCs�tj}zstjjddd�tjd<tddd�}d}|j||�|j|d	�|j||d
d�Wd|tj(XdS(NR[R\sbaz.pyis	%prog ...tversions	%prog 1.2sUsage: baz.py ...
s
baz.py 1.2s
slOptions:
  --version   show program's version number and exit
  -h, --help  show this help message and exit
(	R?targvtostpathtjoinRR�R�RQ(Rt	save_argvR R�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_default_prognames
	cCsstdddddd�}|jd�|jd�d	}|j||�|j|d
�|j||d�dS(NtprogtthingyR�s	%prog 0.1RSs
%prog arg args-hs	--versionsUsage: thingy arg arg
s
thingy 0.1s
(RR�R�R�RQ(RR R�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_custom_progname!s	

(RRt__doc__R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�s
			tTestExpandDefaultscBsbeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
cCsHtdd�|_d|_d|_|jd|_|jd|_dS(NR�ttestsXUsage: 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]
(RR thelp_prefixt	file_helptexpected_help_filetexpected_help_none(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT.s		
cCs<|jjddddd|j�|j|j|j�dS(Ns-fs--fileR�sfoo.txtthelp(R R�R�RQR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_option_default<s
cCsI|jjddd|j�|jjdd�|j|j|j�dS(Ns-fs--fileR�tfilesfoo.txt(R R�R�tset_defaultRQR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_parser_default_1Bs
cCsI|jjddd|j�|jjdd�|j|j|j�dS(Ns-fs--fileR�R�sfoo.txt(R R�R�R�RQR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_parser_default_2Hs
cCs6|jjddd|j�|j|j|j�dS(Ns-fs--fileR�(R R�R�RQR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_defaultNs
cCs<|jjddddd|j�|j|j|j�dS(Ns-fs--fileR�R�(R R�RR�RQR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_default_none_1Ss
cCsI|jjddd|j�|jjdd�|j|j|j�dS(Ns-fs--fileR�R�(R R�R�R�RRQR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_default_none_2Ys
cCsP|jjdddd�|jjdd�|jd}|j|j|�dS(Ns-ps--probR�s1blow up with probability PROB [default: %default]tprobg��Q���?sF  -p PROB, --prob=PROB  blow up with probability PROB [default: 0.43]
(R R�R�R�RQ(RRO((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_float_default_s		cCsH|jjdddddd�d|jj_|j|j|j�dS(Ns-fs--fileR�sfoo.txtR�s#read from FILE [default: *DEFAULT*]s	*DEFAULT*(R R�t	formattertdefault_tagRQR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_alt_expandhs
cCsR|jjdddddd�d|jj_|jd}|j|j|�dS(Ns-fs--fileR�sfoo.txtR�sread from %default files0  -f FILE, --file=FILE  read from %default file
(R R�RR�R�R�RQ(RRO((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_expandos(RRRTR�R�R�R�R�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�-s										tTestStandardcBseZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsXtddd�tdddddd�td	d
d�g}tdtd
|�|_dS(Ns-aRCR�s-bs--booRcR}tboos--fooR^tappendRStoption_list(RRRR (RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT|s
cCs|jdgd�dS(Ns-as-a option requires an argument(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_required_value�scCs|jddgd�dS(Ns-bt5xs&option -b: invalid integer value: '5x'(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_invalid_integer�scCs|jdgd�dS(Ns--boo13sno such option: --boo13(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_such_option�scCs|jdgd�dS(Ns--boo=x5s)option --boo: invalid integer value: 'x5'(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_long_invalid_integer�scCs,|jgidd6dd6dd6g�dS(NtaR�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt
test_empty�scCs>|jddddgidd6dd6ddgd6g�dS(	Ns-aRs
--foo=blahs--foo=RR�R�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt"test_shortopt_empty_longopt_append�scCsD|jdddddgidd6dd6dddgd6g�dS(	Ns--fooR\Rs--foo=xRR�R�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_long_option_append�s

cCs/|jdgidd6dd6dd6g�dS(Ns-abctbcRR�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_option_argument_joined�scCs2|jddgidd6dd6dd6g�dS(Ns-at34RR�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_option_argument_split�scCs/|jdgidd6dd6dd6g�dS(Ns-b34Ri"R�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt#test_option_argument_joined_integer�scCs2|jddgidd6dd6dd6g�dS(Ns-bs-5Ri����R�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt+test_option_argument_split_negative_integer�scCs/|jdgidd6dd6dd6g�dS(Ns--boo=13Ri
R�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt test_long_option_argument_joined�scCs2|jddgidd6dd6dd6g�dS(Ns--boot111RioR�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_long_option_argument_split�scCs5|jddgidd6dd6dgd6g�dS(Ns	--foo=bars-axyztxyzRR�R\R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_long_option_short_option�scCs5|jddgidd6dd6dgd6g�dS(Ns--f=bars-axyzRRR�R\R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_abbrev_long_option�scCsG|jjg�\}}|jj�}|jt|�t|��dS(N(R R!R�R#R"(RR(R%R�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt
test_defaults�scCs9|jjddddddd�|jdgd	�dS(
Ns--fozR^RlRCR�R}R[s--f=bars%ambiguous option: --f (--foo, --foz?)(R R�R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_ambiguous_option�s
cCs>|jddddgidd6dd6dgd6g�fdS(Ns-aRs--fooR\RR�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt test_short_and_long_option_split�scCsA|jdddddgidd6dd6d	dgd
6g�dS(Ns	--foo=bars-bt123s--fooR�Ri{R�R\R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt*test_short_option_split_long_option_append�scCs;|jdddgidd6dd6dd6dg�fdS(Ns-aR[R\RR�(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt*test_short_option_split_one_positional_arg�scCs{|jddddgidd6dd6dd6ddg�f|jddddgidd6dd6dgd6g�fdS(Ns-as--R[R\RR�s--foo(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt$test_short_option_consumes_separator�scCsA|jddddgidd6dd6dd6ddg�fdS(	Ns-abs--s--fooR\RWRR�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt&test_short_option_joined_and_separator�scCs>|jddddgidd6dd6dgd6dg�dS(	Ns-abt-s--fooR\RWRR�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt"test_hyphen_becomes_positional_arg�scCsD|jddddddgidd6dd	6d
dgd6g�dS(Ns-b3s-bt5s	--foo=bars--fooR�RiR�R\R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_append_versus_append�scCs2|jddgidd6dd6dd6g�dS(Ns-as-b3RR�R[(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt&test_option_consumes_optionlike_string�scCs-|jjddd�|jdgd�dS(Ns-tR^R|s-testsno such option: -e(R R�R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt#test_combined_single_invalid_optionscCsO|jjdddd�|jdgidd6dd6dd6td	6g�dS(
Nu-uu	--unicodeR^R|s-uRR�R[tunicode(R R�R+RR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_add_option_accepts_unicodes(RRRTR�R�RRRRRRR	R
RRRRRRRRRRRRRRRRR!(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�{s8																											tTestBoolcBs5eZd�Zd�Zd�Zd�Zd�ZRS(c	CsRtdddddddd�td	d
dddd�g}td|�|_dS(
Ns-vs	--verboseR^R|R}R~R�Rs-qs--quietRR�(RRR (RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT
scCs|jgidd6g�dS(NRR~(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_bool_defaults	
cCs?|jdgidd6g�\}}|j|jtk�dS(Ns-qiR~(R+R/R~R�(RR(R%((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_bool_falses
cCs?|jdgidd6g�\}}|j|jtk�dS(Ns-viR~(R+R/R~R�(RR(R%((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_bool_true$s
cCs'|jdddgidd6g�dS(Ns-qvqs-qs-viR~(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_bool_flicker_on_and_off*s
(RRRTR#R$R%R&(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR"s
				t
TestChoicecBs,eZd�Zd�Zd�Zd�ZRS(cCsGtdt�|_|jjddddddddd	d
dg�dS(NRSs-cR^RlRCReR}Rgtonettwotthree(RRR R�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT0scCs*|jdddgidd6dg�dS(Ns-cR(RRe(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_valid_choice5s
cCs|jdddgd�dS(Ns-ctfourtabcsEoption -c: invalid choice: 'four' (choose from 'one', 'two', 'three')(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_invalid_choice:scCs^|jjddddddg�|jjd�}|j|jd�|j|jd�dS(	Ns-ds	--defaultRgR,tfivetsixReRl(R R�R�R#RCR^(RR�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_add_choice_option?s
(RRRTR+R.R1(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR'/s			t	TestCountcBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZRS(c	Cs�tdt�|_tddddd�|_|jj|j�|jjddd	dd�|jjd
dddddd
d�dS(NRSs-vR^RbR}R~s	--verboseRCRcs-qs--quiettstore_constRmi(RRR Rtv_optR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRTGscCs|jgidd6g�dS(NR~(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyROscCs!|jdgidd6g�dS(Ns-viR~(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_oneRscCs!|jdgidd6g�dS(Ns-vvviR~(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_threeUscCs'|jdddgidd6g�dS(Ns-viR~(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_three_apartXscCs$|jddgidd6g�dS(Ns-vvvs--verbose=2iR~(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_override_amount[scCs'|jdddgidd6g�dS(Ns-vvvs--verbose=2s-qiR~(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_override_quiet^scCs*|jddddgidd6g�dS(Ns-vvvs--verbose=2s-qs-viR~(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_overridingascCs*|jdddgidd6dg�dS(Ns--quiett3s-viR~(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_interspersed_argses
cCs:|jj�|jdddgidd6ddg�dS(Ns--quietR;s-viR~(R tdisable_interspersed_argsR+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_no_interspersed_argsjs

cCs|jddgd�dS(Ns-q3s-vsno such option: -3(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_no_such_optionpscCs|jddgd�dS(Ns	--quiet=3s-vs$--quiet option does not take a value(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_option_no_valuesscCs1|jjdd�|jgidd6g�dS(NR~i(R R�R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_with_defaultwscCs=|jjdd�|jddddgidd6g�dS(NR~is-vvvs--verbose=2s-qs-vi(R R�R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_count_overriding_default{s(RRRTRR5R6R7R8R9R:R<R>R?R@RARB(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR2Fs													tTestMultipleArgscBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCsAtdt�|_|jjdddddddd	d
d�dS(NRSs-ps--pointR^RlRoiRCtfloatR}tpoint(RRR R�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�scCs6|jddddddgidd
6ddg�dS(NR[s-pt1s2.5s-4.3Rg�?g@g333333�RE(g�?g@g333333�(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_nargs_with_positional_args�s
cCs0|jdddddgid
d	6dg�dS(Ns--points-1s2.5s-0Rg�g@g�RE(g�g@g�(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_nargs_long_opt�s
cCs |jddddgd�dS(Ns-ps1.0t2xs3.5s-option -p: invalid floating-point value: '2x'(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_nargs_invalid_float_value�scCs|jdddgd�dS(Ns--points1.0s3.5s#--point option requires 3 arguments(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_nargs_required_values�s(RRRTRGRHRJRK(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRC�s
				tTestMultipleArgsAppendcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCs�tdt�|_|jjdddddddd	d
d�|jjdd
ddddddd
d�|jjddddd
ddd�dS(NRSs-ps--pointR^RlRoiRCRDR}REs-fs--fooR�iRcR[s-zs--zerotappend_constRmi(ii(RRR R�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�s

cCsC|jdddddddgidd6ddgd
6dg�dS(Ns-ft4s-3R�s--fooRFt666REii����ii�R[(ii����(ii�(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_nargs_append�scCs|jdgd�dS(Ns-f4,3s-f option requires 2 arguments(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt!test_nargs_append_required_values�scCs.|jddgidd6dgd6g�dS(Ns--foo=3RNREiiR[(ii(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_nargs_append_simple�scCs=|jdddddgidd6ddd
gd
6g�dS(Ns--zeros--fooR;RNs-zREiiiR[(ii(ii(ii(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_nargs_append_const�s(RRRTRPRQRRRS(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRL�s
					tTestVersioncBseZd�Zd�ZRS(cCsmtdtdd�|_tj}z9tjjtjdd�tjd<|j	dgd�Wd|tj(XdS(	NRSR�s	%prog 0.1R[R\is	--versionsbar 0.1
(
RRR R?R�R�R�R�tcurdirRJ(RR�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_version�s
"cCs)tdt�|_|jdgd�dS(NRSs	--versionsno such option: --version(RRR R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_version�s(RRRVRW(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�s	
tTestConflictingDefaultscBs)eZdZd�Zd�Zd�ZRS(s4Conflicting default values: the last one should win.c
Cs1tdtddddddd�g�|_dS(	NR�s-vR^R|R}R~R�i(RRR (R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�scCs@|jjddddddd�|jgidd6g�dS(Ns-qR^RR}R~R�i(R R�R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_default�scCs@|jjddddddd�|jgidd6g�dS(Ns-qR^RR}R~R�(R R�RR+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_default_none�s(RRR�RTRYRZ(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRX�s		tTestOptionGroupcBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCstdt�|_dS(NRS(RRR (R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�scCs\t|jd�}|jj|�|jddddd�|jdgidd6g�dS(	NtSpams--spamR^R|R�sspam spam spam spamitspam(RR tadd_option_groupR�R+(Rtgroup((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt!test_option_group_create_instance�s
cCs|j|jjdd�dS(Ns!not an OptionGroup instance: None(RLR R^R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_add_group_no_group�scCs |j|jjddd�dS(Nsinvalid arguments(RLR R^R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt test_add_group_invalid_arguments�scCsDt|jd�}t�|_|j|jj|fdtd�dS(NR\s"invalid OptionGroup (wrong parser)(RR RR9R^RR�(RR_((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_add_group_wrong_parser�scCsX|jjddd�}|jd�|jddd�|j|jjd�|�dS(NsGroup 2tdescriptionsSome more optionstBacons--baconRCRc(R R^t	set_titleR�R/tget_option_group(RR_((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_group_manipulate�s
	
(RRRTR`RaRbRcRh(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR[�s					tTestExtendAddTypescBsKeZd�Zd�Zdefd��YZd�Zd�Zd�ZRS(cCs]tdtd|j�|_|jjdddddd�|jjdd	dd
dd
�dS(NRSR�s-aRCR�R}Rs-fs--fileR�(RRtMyOptionR R�R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�scCsTtjjtj�r(tjtj�n(tjjtj�rPtjtj�ndS(N(R�R�tisdirRtTESTFNtrmdirtisfiletunlink(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttearDownsRjcBs:eZd�ZejdZejej�Zeed<RS(cCsNtjj|�s%td|��n%tjj|�sJtd|��n|S(Ns%s: file does not exists%s: not a regular file(R�R�texistsRRn(R�R�R�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt
check_files
R�(R�(RRRrRR�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRjs	
cCsJttjd�j�|jdtjdgitjd6dd6g�dS(Ntws--files-afooR�R[R(topenRRltcloseR+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_filetype_okscCs'|jdtjdgdtj�dS(Ns--files-afoos%s: file does not exist(R=RRl(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_filetype_noexistscCs7tjtj�|jdtjdgdtj�dS(Ns--files-afoos%s: not a regular file(R�tmkdirRRlR=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_filetype_notfiles(	RRRTRpRRjRvRwRy(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRi�s				tTestExtendAddActionscBs9eZd�Zdefd��YZd�Zd�ZRS(c	Cs=|jdddddddd�g}td	|�|_dS(
Ns-as--appleR^textendRCR�R}tappleR�(RjRR (RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT&sRjcBs8eZejdZejdZejdZd�ZRS(R{cCsZ|dkr7|jd�}|j|g�j|�ntj|||||||�dS(NR{t,(tsplittensure_valueR{Rttake_action(RR^R}R�R�R�R tlvalue((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�0s
(R{(R{(R{(RRRtACTIONSt
STORE_ACTIONSt
TYPED_ACTIONSR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRj+s


cCs-|jddgidddgd6g�dS(Ns	-afoo,bars--apple=blahR[R\R�R|(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_extend_add_action8scCs6|jddddgiddddgd6g�dS(	Ns-aR[s-abars--apple=x,yR\R�R�R|(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_extend_add_action_normal=s(RRRTRRjR�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRz%s	
	tTestCallbackcBs,eZd�Zd�Zd�Zd�ZRS(cCs^tddddd|j�tddddd|jdddd	�g}td
|�|_dS(Ns-xR^Rqs-fs--fileRCR�R}tfilenameR�(RRtprocess_optRR (RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRTEs		cCs@|dkr�|j|jdg�|j|jg�|j||jk�|j|dk�|jt|j�idd6�d|j_n�|dkr+|j|jdg�|j|jdg�|j||jk�|j|d�|jt|j�idd6dd6�t	|j|j
|�n|jd|�dS(	Ns-xR�i*s--files-fR[R�s!Unknown option %r in process_opt.(R#R�R�R/R RR"R�R�tsetattrR}R2(RR�R�R�tparser_((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�Rs 'cCs+|jddgidd6dd6g�dS(Ns-xs
--file=fooR[R�i*R�(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt
test_callbackfscCsatdt�}|jd�|jdddddd�dd	d
d�d}|j||�dS(
NRSs-hs-ts--testR^RqcSsdS(N(R(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt<lambda>rRRCR�R�R[s%Options:
  -t TEST, --test=TEST  foo
(RRR�R�RQ(RR RO((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_callback_helpks
(RRRTR�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�Ds	
		tTestCallbackExtraArgscBs#eZd�Zd�Zd�ZRS(cCsUtddddd|jddtfddd	d
dg�g}td|�|_dS(
Ns-ps--pointR^RqRtiRCR�R}tpointsR�R�(Rt
process_tupleRcRR (RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT{s
	cCs�|j|d�|j|tk�|dkrB|j|d�n|dkra|j|d�ntt||jd���}t|j|j�j	|�dS(Nis-ps1,2,3s--points4,5,6R}(
R#R/RcR`tmapR~RAR�R}R�(RR�R�R�R�tlenRC((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��scCs-|jdddgiddgd
6g�dS(
Ns-p1,2,3s--points4,5,6iiiiiiR�(iii(iii(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_callback_extra_args�s(RRRTR�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�zs		tTestCallbackMeddleArgscBs,eZd�Zd�Zd�Zd�ZRS(c
Cs\gtddd�D]-}tt|�ddd|jdd�^q}td|�|_dS(Ni����i����R^RqR}tthingsR�(trangeRR,t	process_nRR (RR�R(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�sCcCs�t|d�}|j}t|�|krE|jd||f�n|jj|jg�}|jt|d|!��|j	j|�|d|5dS(Nis$Expected %d arguments for %s option.i(
RctrargsR�R2R�RR}R�R`tlargs(RR�R�R�R�RoR�R}((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s	cCs<|jddddddgid
dgd6dd	g�dS(Ns-1R[s-3R\R�tquxR�ii(R[(R\R�R�(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_callback_meddle_args�scCs-|jdddgidgd6dg�dS(Ns-2R[s--R�i(R[s--(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt#test_callback_meddle_args_separator�s
(RRRTR�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s			tTestCallbackManyArgscBs#eZd�Zd�Zd�ZRS(cCsjtddddddd|jdd�td	d
ddddd|jdd�g}td
|�|_dS(Ns-as--appleR^RqRoiRCR�s-bs--bobiRcR�(Rtprocess_manyRR (RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�s
cCs�|dkr|j|d�n]|dkr>|j|d�n>|dkr]|j|d�n|dkr||j|d�ndS(Ns-aR[R\s--appletdingtdongs-biiis--bobif���i*i(R[R\(R�R�(iii(if���i*i(R#(RR�R�R�R�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��scCsO|jddddddddd	d
ddd
dgidd6dd6g�dS(Ns-aR[R\s--appleR�R�s-bRFt2R;s--bobs-666R�t0R|tbob(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_many_args�s
(RRRTR�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s		
tTestCallbackCheckAbbrevcBs#eZd�Zd�Zd�ZRS(cCs/t�|_|jjdddd|j�dS(Ns	--foo-barR^Rq(RR R�tcheck_abbrev(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�scCs|j|d�dS(Ns	--foo-bar(R#(RR�R�R�R ((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��scCs|jdgig�dS(Ns--foo(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_abbrev_callback_expansion�s(RRRTR�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s		tTestCallbackVarArgscBsGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsstddddddd�tdd	d
dd�tdd
d	dd|jdd�g}tdtd|�|_dS(Ns-aRCRcRoiR}Rs-bR^R|RWs-cs
--callbackRqtcRSR�(Rt
variable_argsRRR (RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�scCs�|j|dk�g}|j}x�|r�|d}|d dkrWt|�dks�|d dkr�t|�dkr�|ddkr�Pq%|j|�|d=q%Wt|j|j|�dS(Niis--iR(R/RR�R�R�R�R�R}(RR�R�R�R R�targ((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s		
"2
cCsA|jdddddgidd6dd	6ddgd
6g�dS(Ns-a3s-5s
--callbackR[R\ii����RRWR�(ii����(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_variable_args�scCsJ|jddddddgidd6td6dddgd	6dg�dS(
Ns-ct37s--txxxs-bthelloRRWR�(R+RR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt%test_consume_separator_stop_at_option�s

cCsG|jdddddgidd6dd6dddgd6dg�dS(	NR�s-cR[RR\RRWR�(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt%test_positional_arg_and_variable_args�s

cCs8|jdddgidd6td6dgd6g�dS(Ns-cR[s-bRRWR�(R+RR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_stop_at_option�scCs |jddddgd�dS(Ns-cR;s-5s-asno such option: -5(R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_stop_at_invalid_options(	RRRTR�R�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s						tConflictBasecBseZd�Zd�ZRS(c	Cs@tdddddddd�g}td	td
|�|_dS(Ns-vs	--verboseR^RbR}R~R�sincrement verbosityRSR�(RRRR (RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRTscCsd|j_dS(Ni(R�tshow_version(RR�R�R�R ((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�s(RRRTR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�
s	tTestConflictcBs2eZdZd�Zd�Zd�Zd�ZRS(s9Use the default conflict resolution for Optik 1.2: error.cCs]|j|d
idd6|jd6dd6td�}|j|jd�|j|jd	�dS(Ns-vs	--versionRqR^sshow versionR�s5option -v/--version: conflicting option string(s): -vs conflicting option string(s): -vs-v/--version(s-vs	--version(R9R�R	R#Rt	option_id(RR3R7((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytassertTrueconflict_errors
	cCs|j|jj�dS(N(R�R R�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_error!scCs&t|jd�}|j|j�dS(NsGroup 1(RR R�R�(RR_((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_error_group$scCs#|j|jjddtd�dS(NR[s'invalid conflict_resolution value 'foo'(R[(R9R tset_conflict_handlerRR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_no_such_conflict_handler(s(RRR�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�s
			tTestConflictResolvecBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(c	CsItj|�|jjd�|jjddddd|jdd�dS(Ntresolves-vs	--versionR^RqR�sshow version(R�RTR R�R�R�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT/s
cCs�|jjd�}|jjd�}|jjd�}|j||k�|j||k	�|j|jdg�|j|jdg�|j|jdg�|j|jg�|j|jdg�dS(Ns-vs	--verboses	--version(R R�R/R#R�R�(RR4tverbose_opttversion_opt((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_resolve5scCs|jdgd�dS(Ns-hs}Options:
  --verbose      increment verbosity
  -h, --help     show this help message and exit
  -v, --version  show version
(RJ(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_resolve_helpBscCs(|jdgidd6dd6g�dS(Ns-vR~iR�(R+R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_resolve_short_optJscCs!|jdgidd6g�dS(Ns	--verboseiR~(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_resolve_long_optOs
cCs+|jddgidd6dd6g�dS(Ns	--verboses	--versioniR~R�(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_resolve_long_optsTs(RRRTR�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�.s		
			tTestConflictOverridecBs,eZd�Zd�Zd�Zd�ZRS(cCsvtdt�|_|jjd�|jjddddddd	d
�|jjdddddd
ddd	d�dS(NRSR�s-ns	--dry-runR^R|R}tdry_runR�sdon't do anythingR3Rmi*sdry run mode(RRR R�R�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRTZscCsB|jjd�}|j|jdg�|j|jdg�dS(Ns	--dry-runs-n(R R�R#R�R�(RR�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_override_optsdscCs|jdgd�dS(Ns-hsXOptions:
  -h, --help     show this help message and exit
  -n, --dry-run  dry run mode
(RJ(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_override_helpiscCs!|jdgidd6g�dS(Ns-ni*R�(R+(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_conflict_override_argsps
(RRRTR�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�Ys	
		sSUsage: 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
sSUsage: 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
sWUsage
=====
  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
tTestHelpcBskeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(cCs|jd�|_dS(NiP(tmake_parserR (R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRT�scCs�tddddddddd	�td
ddddd
dddd�tddddddddd�g}tj��$}t|�|d<td|�SWdQXdS(Ns-aRCR�R}RtmetavartAPPLER�sthrow APPLEs at baskets-bs--booRcR�tNUMseshout "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 fooingtCOLUMNSR�(RRtEnvironmentVarGuardR,R(RtcolumnsR(tenv((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��scCs�t|�tjkr?|jjtj�}|j|d�}ntj}z3t	j
jdd�tjd<|jdg|�Wd|tj(XdS(NtreplaceR[sbar.pyis-h(
RCRDtUnicodeTypeR t
_get_encodingR?R@tencodeR�R�R�R�RJ(RR<R>R�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pytassertHelpEquals�s
cCs|jt�dS(N(R�t_expected_help_basic(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt	test_help�scCs!|jjd�|jt�dS(NsUsage: %prog [options](R t	set_usageR�R�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_help_old_usage�scCs d|jj_|jt�dS(Ni(R R�tshort_firstR�t_expected_help_long_opts_first(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_help_long_opts_first�scCs?tj��-}d|d<t�|j_|jt�WdQXdS(Nt80R�(RR�RR R�R�t_expected_help_title_formatter(RR�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_help_title_formatter�s
cCsB|jd�|_|jt�|jd�|_|jt�dS(Ni<i(R�R R�t_expected_help_short_linest_expected_very_help_short_lines(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_wrap_columnss
cCsEtdt�|_|jjddddd�d}|j|�dS(NRSs-aR^R|R�uolé!uKOptions:
  -h, --help  show this help message and exit
  -a          olé!
(RRR R�R�(Rtexpect((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_help_unicode	scCs/tdtdd�|_d}|j|�dS(NRSRduolé!u>olé!

Options:
  -h, --help  show this help message and exit
(RRR R�(RR�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_help_unicode_descriptionscCs�|jjd�t|jdd�}|jddddd�|jj|�d	}|j|�d
|j_|j|d�dS(Ns`This is the program description for %prog.  %prog has an option group as well as single options.sDangerous OptionssZCaution: use of these options is at your own risk.  It is believed that some of them bite.s-gR^R|R�s
Group option.sTUsage: 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 tset_descriptionRR�R^R�tepilog(RR_R�((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_help_description_groupss			
(
RRRTR�R�R�R�R�R�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR��s			
							
	tTestMatchAbbrevcBseZd�Zd�ZRS(cCs9|jtdidd6dd6dd6dd6�d�dS(Ns--fs--fozs--foos--fie(R#R
R(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_match_abbrevEs

cCsDd}idd6dd6dd6}|jt||fdtd�dS(Ns--fs--fozs--foos--fies,ambiguous option: --f (--fie, --foo, --foz?)(RR9R
R
(RR�twordmap((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_match_abbrev_errorMs
(RRR�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�Ds	tTestParseNumbercBs,eZd�Zd�Zd�Zd�ZRS(cCs<t�|_|jjddt�|jjddt�dS(Ns-nRCs-l(RR R�Rctlong(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyRTVscCsT|jtdtfittjd��|jtdtfittjd��dS(NRs!invalid literal for int().*: '?'?t0xOoopss)invalid literal for long().*: '?0xOoops'?(R9RRcR�tretcompileR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_parse_num_fail[scCs�|jtdt�d�|jtdt�d�|jtdt�d�|jtdt�d�|jtd	t�d
�|jtdt�d�dS(
NR�it0x10it0XAl
t010lt0b11it0bl(R#RRcR�(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_parse_num_okescCs�|jddddgidd6dd6g�|jdd	d
gidd6dd6g�|jd
gd�|jdgd�|jddgd�dS(Ns-nR�s-lt0x20i*R�i tlt0b0101s-l010iis-n008s'option -n: invalid integer value: '008's-l0b0123s/option -l: invalid long integer value: '0b0123't0x12xs.option -l: invalid long integer value: '0x12x'(R+R=(R((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyttest_numeric_optionsms(RRRTR�R�R(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyR�Us		
	cCstjt�dS(N(Rtrun_unittestR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt	test_mainzst__main__iii�Q(HR?R�R�R�RDtunittestRR�RtoptparseRRRRRRRR	R
RRR
RRCR�R.t	ExceptionRRtTestCaseRRRR{R�R�R�R�R�R�R�R�R�R"R'R2RCRLRTRXR[RiRzR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_optparse.pyt<module>	spL�|O"	
3*N�#:"+65
+'
!{%	
© 2025 GrazzMean