%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/test/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/test/test_optparse.pyc


Nac@sZddlZddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZmZddl	mZddl	mZeejdZdefd	YZd
e
fdYZdejfd
YZdefdYZdefdYZ defdYZ!defdYZ"idd6dd6d]d6d_d6Z#dZ$defdYZ%d efd!YZ&d"efd#YZ'd$efd%YZ(d&efd'YZ)d(efd)YZ*d*efd+YZ+d,efd-YZ,d.efd/YZ-d0efd1YZ.d2efd3YZ/d4efd5YZ0d6efd7YZ1d8efd9YZ2d:efd;YZ3d<efd=YZ4d>efd?YZ5d@efdAYZ6dBefdCYZ7dDefdEYZ8dFefdGYZ9dHefdIYZ:dJe:fdKYZ;dLe:fdMYZ<dNefdOYZ=dPZ>dQZ?dRZ@dSZAdTZBdUefdVYZCdWefdXYZDdYefdZYZEd[ZFeGd\krVeFndS(`iN(tStringIO(ttest_support(tmake_optiontOptiontTitledHelpFormattertOptionParsertOptionGrouptSUPPRESS_USAGEtOptionErrortOptionConflictErrortBadOptionErrortOptionValueErrortValues(t
_match_abbrev(t
_parse_numttInterceptedErrorcBs#eZddddZdZRS(cCs||_||_||_dS(N(t
error_messagetexit_statustexit_message(tselfRRR((s./usr/local/lib/python2.7/test/test_optparse.pyt__init__s		cCs|jp|jpdS(Nsintercepted error(RR(R((s./usr/local/lib/python2.7/test/test_optparse.pyt__str__&sN(t__name__t
__module__tNoneRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRstInterceptingOptionParsercBs eZdddZdZRS(icCstd|d|dS(NRR(R(Rtstatustmsg((s./usr/local/lib/python2.7/test/test_optparse.pytexit*scCstd|dS(NR(R(RR((s./usr/local/lib/python2.7/test/test_optparse.pyterror-sN(RRRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyR)stBaseTestcBsDeZdZdZdZdddZdZdZRS(cCsb|jj|\}}t|}|j||dt|j||dt||fS(sAssert 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((s./usr/local/lib/python2.7/test/test_optparse.pyt
assertParseOK2s
cCs|dkrd}n|dkr*i}ny|||Wnu|k
r}t|}t|tr|j|j|d|j|fn|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((s./usr/local/lib/python2.7/test/test_optparse.pytassertRaisesPs"			cCsNy|jj|Wn&tk
r<}|j|j|nX|jddS(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((s./usr/local/lib/python2.7/test/test_optparse.pytassertParseFails
ic	Cstj}t|dd}yUz5tt_|rB|tj_n|jj|Wdtjj}|t_XWnt	k
r}|j
t|tj
kdt|||kr|jd|d|dn|j|j||j|j|nX|jddS(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((s./usr/local/lib/python2.7/test/test_optparse.pytassertOutputs*	cGs|j||dt|dS(s4Assert that TypeError is raised when executing func.N(R9Rt	TypeError(RR3R6R%((s./usr/local/lib/python2.7/test/test_optparse.pytassertTypeErrorscCs>|j}||kr:|jd|d|dndS(Nshelp text failure; expected:
"s	"; got:
"s"
(tformat_helptfailureException(RR t
expected_helptactual_help((s./usr/local/lib/python2.7/test/test_optparse.pyt
assertHelpsN(	RRR+R9R=RRJRLRQ(((s./usr/local/lib/python2.7/test/test_optparse.pyR1s		;		tTestOptionCheckscBseZdZgidZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZRS(cCstdt|_dS(Ntusage(RRR (R((s./usr/local/lib/python2.7/test/test_optparse.pytsetUpscCs|jt||t|dS(N(R9RR(RR6R%R4((s./usr/local/lib/python2.7/test/test_optparse.pytassertOptionErrorscCs|jtddS(Ns+at least one option string must be supplied(RLR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_opt_string_emptys	cCs|jddgdS(Ns?invalid option string 'b': must be at least two characters longtb(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_opt_string_too_shortscCs|jddgdS(NsOinvalid short option string '--': must be of the form -x, (x any non-dash char)s--(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_opt_string_short_invalidscCs|jddgdS(NsJinvalid long option string '---': must start with --, followed by non-dashs---(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_opt_string_long_invalidscCs(|jddgidd6dd6dS(Ns.option -b: invalid keyword arguments: bar, foos-btfootbar(RUR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_attr_invalidscCs!|jddgidd6dS(Ns option -b: invalid action: 'foo's-bR[taction(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_action_invalidscCs>|jddgidd6|jddgitd6dS(Ns%option -b: invalid option type: 'foo's-bR[RCs'option -b: invalid option type: 'tuple'(RUttuple(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_type_invalidscCs(|jddgidd6dd6dS(Ns4option -b: must not supply a type for action 'count's-btcountR^tintRC(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_type_for_actionscCs$|jdddgidd6dS(Ns@option -b/--bad: must supply a list of choices for type 'choice's-bs--badtchoiceRC(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_choices_listscCs>tdj}|jd|ddgidd6dd6dS(	NRsBoption -b/--bad: choices must be a list of strings ('%s' supplied)s-bs--badReRCsbad choicestchoices(RCRRU(Rttypename((s./usr/local/lib/python2.7/test/test_optparse.pyttest_bad_choices_lists	cCs(|jddgidd6dd6dS(Ns1option -b: must not supply choices for type 'int's-bRcRCtbadRg(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_choices_for_typescCs(|jddgidd6dd6dS(Ns:option -b: 'const' must not be supplied for action 'store's-btstoreR^itconst(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_const_for_actionscCs(|jddgidd6dd6dS(Ns:option -b: 'nargs' must not be supplied for action 'count's-bRbR^itnargs(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_nargs_for_actionscCs(|jddgidd6dd6dS(Ns'option -b: callback not callable: 'foo's-btcallbackR^R[(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_callback_not_callablescCsdS(N((R((s./usr/local/lib/python2.7/test/test_optparse.pytdummy scCs2|jddgidd6|jd6dd6dS(NsAoption -b: callback_args, if supplied, must be a tuple: not 'foo's-bRqR^R[t
callback_args(RURs(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_callback_args_no_tuple#s

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

cCs(|jddgidd6dd6dS(Ns<option -b: callback supplied ('foo') for non-callback options-bRlR^R[Rq(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_callback_for_action3scCs(|jddgidd6dd6dS(Ns9option -b: callback_args supplied for non-callback options-bRlR^R[Rt(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyt test_no_callback_args_for_action9scCs(|jddgidd6dd6dS(Ns;option -b: callback_kwargs supplied for non-callback options-bRlR^R[Rv(RU(R((s./usr/local/lib/python2.7/test/test_optparse.pyt"test_no_callback_kwargs_for_action?s(RRRTRURVRXRYRZR]R_RaRdRfRiRkRnRpRrRsRuRwRxRyRz(((s./usr/local/lib/python2.7/test/test_optparse.pyRRs,																				tTestOptionParsercBseZdZdZdZdZdZdZdZdZ	dZ
d	Zej
d
dedZRS(
c	CsWt|_|jjdddddddd|jjd	d
ddddddS(
Ns-vs	--verboses-ns--noisyR^t
store_truetdesttverboses-qs--quiets--silenttstore_false(RR t
add_option(R((s./usr/local/lib/python2.7/test/test_optparse.pyRTFs

cCs|j|jjdddS(Nsnot an Option instance: None(RLR RR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_add_option_no_OptionMscCs |j|jjddddS(Nsinvalid arguments(RLR RR(R((s./usr/local/lib/python2.7/test/test_optparse.pyt!test_add_option_invalid_argumentsQscCs~|jjd}|j|t|j|jddg|j|jddg|j|jd|j|jddS(Ns-vs-ns	--verboses--noisyR|R~(	R t
get_optiontassertIsInstanceRR#t_short_optst
_long_optsR^R}(Rtopt1((s./usr/local/lib/python2.7/test/test_optparse.pyttest_get_optionUscCsz|jjd}|jjd}|jjd}|jjd}|j||kop|kop|kndS(Ns-vs	--verboses-ns--noisy(R RR/(RRtopt2topt3topt4((s./usr/local/lib/python2.7/test/test_optparse.pyttest_get_option_equals]s
cCs6|j|jjd|j|jjddS(Ns-vs	--verbose(R/R t
has_option(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_has_optiondscCs|j|jjddk|j|jjddk|j|jjddk|j|jjddk|j|jjd|j|jjd|j|jjd|j|jjd|j|jjd|j|jjddS(Ns-vs	--verboses-ns--noisys-qs--silent(R/R RRR:R(R((s./usr/local/lib/python2.7/test/test_optparse.pytassertTrueremovedhscCs|jjd|jdS(Ns-n(R t
remove_optionR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_remove_short_optvscCs|jjd|jdS(Ns	--verbose(R RR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_remove_long_optzscCs#|j|jjddtddS(NR[sno such option 'foo'(R[(R9R RRt
ValueError(R((s./usr/local/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?tgetrefcountRRt	big_thingtdestroyR#(RRtrefcountR ((s./usr/local/lib/python2.7/test/test_optparse.pyttest_refleaks			
(RRRTRRRRRRRRRRtimpl_detailtTrueR(((s./usr/local/lib/python2.7/test/test_optparse.pyR{Es										tTestOptionValuescBseZdZdZRS(cCsdS(N((R((s./usr/local/lib/python2.7/test/test_optparse.pyRTscCst}|jt|i|j|i|j|idd6|j|didd6dd6}td|}|jt|||j|||j|idd6|j|i|j|d|j|gdS(NR\R[Ri*tbaztdefaults(RR#R"tassertNotEqual(Rtvaluestdict((s./usr/local/lib/python2.7/test/test_optparse.pyttest_basicss	(RRRTR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs	tTestTypeAliasescBs,eZdZdZdZdZRS(cCst|_dS(N(RR (R((s./usr/local/lib/python2.7/test/test_optparse.pyRTscCs9|jjddd|j|jjdjddS(Ns-sRCR,tstring(R RR#RRC(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_str_aliases_stringscCsn|jjddt|j|jjdjd|jjddt|j|jjdjddS(Ns-sRCRs-xRc(R RR,R#RRCRc(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_new_type_objectscCst|jjddtj|j|jjdjd|jjddtj|j|jjdjddS(Ns-sRCRs-xRc(R RRDRER#RRCtIntType(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_old_type_objects(RRRTRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs			itsi<tmthitdcCsly8|djrt|St|d t|dSWn-ttfk
rgtd||fnXdS(Nisoption %s: invalid duration: %r(tisdigitRct_time_unitsRt
IndexErrorR(toptiontopttvalue((s./usr/local/lib/python2.7/test/test_optparse.pyt_check_durations
tDurationOptioncBs1eZejdZejejZeed<RS(tduration(R(RRRtTYPEStcopytTYPE_CHECKERR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs
tTestDefaultValuescBs5eZdZdZdZdZdZRS(cCst|_|jjdddt|jjdddd|jjdd	d
dd|jjdd	d
|jjd
dd|jjd|jjddditd6dd6dd6dd6dd6dd6|_dS(Ns-vs	--verbosetdefaults-qs--quietR}R~s-nRCRci%s-ms-sR[s-ts-utnRRtttu(RR RRRtexpected(R((s./usr/local/lib/python2.7/test/test_optparse.pyRTs
cCs |j|jj|jdS(N(R#R tget_default_valuesR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_basic_defaultsscCsW|jjdddd|jjidd6dd6|j|jj|jdS(NRi*Ri(R tset_defaultsRtupdateR#R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_mixed_defaults_postscCs|jjdddd|jjddd|jjd|jjidd6dd6|j|jj|j|jjd|jjddd|jjidd6|j|jj|jdS(	Ntxtbarftytblahs-xRtfrobs-y(	R RRRRR#RRR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_mixed_defaults_prescCst|j_|jjddddd|jjddddd|jjdd	|jjidd
6dd6d
d6|j|jj|j|jj	t
|jjidd
6dd6d	d6|j|jj|jdS(Ns-dRCRRi,s-et6mRt42Rihtei*(RR toption_classRRRRR#Rtset_process_default_valuestFalse(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_process_defaults%%(RRRTRRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs
				
tTestProgNamecBs2eZdZdZdZdZdZRS(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((s./usr/local/lib/python2.7/test/test_optparse.pytassertUsage	scCs|j|j|dS(N(R#tget_version(RR texpected_version((s./usr/local/lib/python2.7/test/test_optparse.pyt
assertVersionscCstj}zstjjdddtjd<tddd}d}|j|||j|d	|j||d
dWd|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?targvtostpathtjoinRRRRQ(Rt	save_argvR R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_default_prognames
	cCsstdddddd}|jd|jdd	}|j|||j|d
|j||ddS(NtprogtthingyRs	%prog 0.1RSs
%prog arg args-hs	--versionsUsage: thingy arg arg
s
thingy 0.1s
(RRRRRQ(RR R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_custom_progname!s	

(RRt__doc__RRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs
			tTestExpandDefaultscBsbeZdZdZdZdZdZdZdZdZ	dZ
d	ZRS(
cCsHtdd|_d|_d|_|jd|_|jd|_dS(NRttestsXUsage: 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((s./usr/local/lib/python2.7/test/test_optparse.pyRT.s		
cCs<|jjddddd|j|j|j|jdS(Ns-fs--fileRsfoo.txtthelp(R RRRQR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_option_default<s
cCsI|jjddd|j|jjdd|j|j|jdS(Ns-fs--fileRtfilesfoo.txt(R RRtset_defaultRQR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_parser_default_1Bs
cCsI|jjddd|j|jjdd|j|j|jdS(Ns-fs--fileRRsfoo.txt(R RRRRQR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_parser_default_2Hs
cCs6|jjddd|j|j|j|jdS(Ns-fs--fileR(R RRRQR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_defaultNs
cCs<|jjddddd|j|j|j|jdS(Ns-fs--fileRR(R RRRRQR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_default_none_1Ss
cCsI|jjddd|j|jjdd|j|j|jdS(Ns-fs--fileRR(R RRRRRQR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_default_none_2Ys
cCsP|jjdddd|jjdd|jd}|j|j|dS(Ns-ps--probRs1blow up with probability PROB [default: %default]tprobgQ?sF  -p PROB, --prob=PROB  blow up with probability PROB [default: 0.43]
(R RRRRQ(RRO((s./usr/local/lib/python2.7/test/test_optparse.pyttest_float_default_s		cCsH|jjddddddd|jj_|j|j|jdS(Ns-fs--fileRsfoo.txtRs#read from FILE [default: *DEFAULT*]s	*DEFAULT*(R Rt	formattertdefault_tagRQR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_alt_expandhs
cCsR|jjddddddd|jj_|jd}|j|j|dS(Ns-fs--fileRsfoo.txtRsread from %default files0  -f FILE, --file=FILE  read from %default file
(R RRRRRRQ(RRO((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_expandos(RRRTRRRRRRRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyR-s										tTestStandardcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(cCsXtdddtddddddtd	d
dg}tdtd
||_dS(Ns-aRCRs-bs--booRcR}tboos--fooR^tappendRStoption_list(RRRR (RR(((s./usr/local/lib/python2.7/test/test_optparse.pyRT|s
cCs|jdgddS(Ns-as-a option requires an argument(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_required_valuescCs|jddgddS(Ns-bt5xs&option -b: invalid integer value: '5x'(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_invalid_integerscCs|jdgddS(Ns--boo13sno such option: --boo13(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_such_optionscCs|jdgddS(Ns--boo=x5s)option --boo: invalid integer value: 'x5'(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_long_invalid_integerscCs,|jgidd6dd6dd6gdS(NtaRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt
test_emptyscCs>|jddddgidd6dd6ddgd6gdS(	Ns-aRs
--foo=blahs--foo=RRRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt"test_shortopt_empty_longopt_appendscCsD|jdddddgidd6dd6dddgd6gdS(	Ns--fooR\Rs--foo=xRRRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_long_option_appends

cCs/|jdgidd6dd6dd6gdS(Ns-abctbcRRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_option_argument_joinedscCs2|jddgidd6dd6dd6gdS(Ns-at34RRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_option_argument_splitscCs/|jdgidd6dd6dd6gdS(Ns-b34Ri"RR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt#test_option_argument_joined_integerscCs2|jddgidd6dd6dd6gdS(Ns-bs-5RiRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt+test_option_argument_split_negative_integerscCs/|jdgidd6dd6dd6gdS(Ns--boo=13Ri
RR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt test_long_option_argument_joinedscCs2|jddgidd6dd6dd6gdS(Ns--boot111RioRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_long_option_argument_splitscCs5|jddgidd6dd6dgd6gdS(Ns	--foo=bars-axyztxyzRRR\R[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_long_option_short_optionscCs5|jddgidd6dd6dgd6gdS(Ns--f=bars-axyzRRRR\R[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_abbrev_long_optionscCsG|jjg\}}|jj}|jt|t|dS(N(R R!RR#R"(RR(R%R((s./usr/local/lib/python2.7/test/test_optparse.pyt
test_defaultsscCs9|jjddddddd|jdgd	dS(
Ns--fozR^RlRCRR}R[s--f=bars%ambiguous option: --f (--foo, --foz?)(R RR=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_ambiguous_options
cCs>|jddddgidd6dd6dgd6gfdS(Ns-aRs--fooR\RRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt test_short_and_long_option_splitscCsA|jdddddgidd6dd6d	dgd
6gdS(Ns	--foo=bars-bt123s--fooRRi{RR\R[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt*test_short_option_split_long_option_appendscCs;|jdddgidd6dd6dd6dgfdS(Ns-aR[R\RR(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt*test_short_option_split_one_positional_argscCs{|jddddgidd6dd6dd6ddgf|jddddgidd6dd6dgd6gfdS(Ns-as--R[R\RRs--foo(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt$test_short_option_consumes_separatorscCsA|jddddgidd6dd6dd6ddgfdS(	Ns-abs--s--fooR\RWRRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt&test_short_option_joined_and_separatorscCs>|jddddgidd6dd6dgd6dgdS(	Ns-abt-s--fooR\RWRRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt"test_hyphen_becomes_positional_argscCsD|jddddddgidd6dd	6d
dgd6gdS(Ns-b3s-bt5s	--foo=bars--fooRRiRR\R[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_append_versus_appendscCs2|jddgidd6dd6dd6gdS(Ns-as-b3RRR[(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt&test_option_consumes_optionlike_stringscCs-|jjddd|jdgddS(Ns-tR^R|s-testsno such option: -e(R RR=(R((s./usr/local/lib/python2.7/test/test_optparse.pyt#test_combined_single_invalid_optionscCsO|jjdddd|jdgidd6dd6dd6td	6gdS(
Nu-uu	--unicodeR^R|s-uRRR[tunicode(R RR+RR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_add_option_accepts_unicodes(RRRTRRRRRRRRR	R
RRRRRRRRRRRRRRRRR!(((s./usr/local/lib/python2.7/test/test_optparse.pyR{s8																											tTestBoolcBs5eZdZdZdZdZdZRS(c	CsRtddddddddtd	d
ddddg}td||_dS(
Ns-vs	--verboseR^R|R}R~RRs-qs--quietRR(RRR (RR(((s./usr/local/lib/python2.7/test/test_optparse.pyRT
scCs|jgidd6gdS(NRR~(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_bool_defaults	
cCs?|jdgidd6g\}}|j|jtkdS(Ns-qiR~(R+R/R~R(RR(R%((s./usr/local/lib/python2.7/test/test_optparse.pyttest_bool_falses
cCs?|jdgidd6g\}}|j|jtkdS(Ns-viR~(R+R/R~R(RR(R%((s./usr/local/lib/python2.7/test/test_optparse.pyttest_bool_true$s
cCs'|jdddgidd6gdS(Ns-qvqs-qs-viR~(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_bool_flicker_on_and_off*s
(RRRTR#R$R%R&(((s./usr/local/lib/python2.7/test/test_optparse.pyR"s
				t
TestChoicecBs,eZdZdZdZdZRS(cCsGtdt|_|jjddddddddd	d
dgdS(NRSs-cR^RlRCReR}Rgtonettwotthree(RRR R(R((s./usr/local/lib/python2.7/test/test_optparse.pyRT0scCs*|jdddgidd6dgdS(Ns-cR(RRe(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_valid_choice5s
cCs|jdddgddS(Ns-ctfourtabcsEoption -c: invalid choice: 'four' (choose from 'one', 'two', 'three')(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_invalid_choice:scCs^|jjddddddg|jjd}|j|jd|j|jddS(	Ns-ds	--defaultRgR,tfivetsixReRl(R RRR#RCR^(RR((s./usr/local/lib/python2.7/test/test_optparse.pyttest_add_choice_option?s
(RRRTR+R.R1(((s./usr/local/lib/python2.7/test/test_optparse.pyR'/s			t	TestCountcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZRS(c	Cstdt|_tddddd|_|jj|j|jjddd	dd|jjd
dddddd
ddS(NRSs-vR^RbR}R~s	--verboseRCRcs-qs--quiettstore_constRmi(RRR Rtv_optR(R((s./usr/local/lib/python2.7/test/test_optparse.pyRTGscCs|jgidd6gdS(NR~(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyROscCs!|jdgidd6gdS(Ns-viR~(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_oneRscCs!|jdgidd6gdS(Ns-vvviR~(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_threeUscCs'|jdddgidd6gdS(Ns-viR~(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_three_apartXscCs$|jddgidd6gdS(Ns-vvvs--verbose=2iR~(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_override_amount[scCs'|jdddgidd6gdS(Ns-vvvs--verbose=2s-qiR~(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_override_quiet^scCs*|jddddgidd6gdS(Ns-vvvs--verbose=2s-qs-viR~(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_overridingascCs*|jdddgidd6dgdS(Ns--quiett3s-viR~(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_interspersed_argses
cCs:|jj|jdddgidd6ddgdS(Ns--quietR;s-viR~(R tdisable_interspersed_argsR+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_no_interspersed_argsjs

cCs|jddgddS(Ns-q3s-vsno such option: -3(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_no_such_optionpscCs|jddgddS(Ns	--quiet=3s-vs$--quiet option does not take a value(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_option_no_valuesscCs1|jjdd|jgidd6gdS(NR~i(R RR+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_with_defaultwscCs=|jjdd|jddddgidd6gdS(NR~is-vvvs--verbose=2s-qs-vi(R RR+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_count_overriding_default{s(RRRTRR5R6R7R8R9R:R<R>R?R@RARB(((s./usr/local/lib/python2.7/test/test_optparse.pyR2Fs													tTestMultipleArgscBs5eZdZdZdZdZdZRS(cCsAtdt|_|jjdddddddd	d
ddS(NRSs-ps--pointR^RlRoiRCtfloatR}tpoint(RRR R(R((s./usr/local/lib/python2.7/test/test_optparse.pyRTscCs6|jddddddgidd
6ddgdS(NR[s-pt1s2.5s-4.3Rg?g@g333333RE(g?g@g333333(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_nargs_with_positional_argss
cCs0|jdddddgid
d	6dgdS(Ns--points-1s2.5s-0Rgg@gRE(gg@g(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_nargs_long_opts
cCs |jddddgddS(Ns-ps1.0t2xs3.5s-option -p: invalid floating-point value: '2x'(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_nargs_invalid_float_valuescCs|jdddgddS(Ns--points1.0s3.5s#--point option requires 3 arguments(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_nargs_required_valuess(RRRTRGRHRJRK(((s./usr/local/lib/python2.7/test/test_optparse.pyRCs
				tTestMultipleArgsAppendcBs5eZdZdZdZdZdZRS(cCstdt|_|jjdddddddd	d
d|jjdd
ddddddd
d|jjddddd
ddddS(NRSs-ps--pointR^RlRoiRCRDR}REs-fs--fooRiRcR[s-zs--zerotappend_constRmi(ii(RRR R(R((s./usr/local/lib/python2.7/test/test_optparse.pyRTs

cCsC|jdddddddgidd6ddgd
6dgdS(Ns-ft4s-3Rs--fooRFt666REiiiiR[(ii(ii(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_nargs_appendscCs|jdgddS(Ns-f4,3s-f option requires 2 arguments(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyt!test_nargs_append_required_valuesscCs.|jddgidd6dgd6gdS(Ns--foo=3RNREiiR[(ii(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_nargs_append_simplescCs=|jdddddgidd6ddd
gd
6gdS(Ns--zeros--fooR;RNs-zREiiiR[(ii(ii(ii(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_nargs_append_consts(RRRTRPRQRRRS(((s./usr/local/lib/python2.7/test/test_optparse.pyRLs
					tTestVersioncBseZdZdZRS(cCsmtdtdd|_tj}z9tjjtjddtjd<|j	dgdWd|tj(XdS(	NRSRs	%prog 0.1R[R\is	--versionsbar 0.1
(
RRR R?RRRRtcurdirRJ(RR((s./usr/local/lib/python2.7/test/test_optparse.pyttest_versions
"cCs)tdt|_|jdgddS(NRSs	--versionsno such option: --version(RRR R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_versions(RRRVRW(((s./usr/local/lib/python2.7/test/test_optparse.pyRTs	
tTestConflictingDefaultscBs)eZdZdZdZdZRS(s4Conflicting default values: the last one should win.c
Cs1tdtdddddddg|_dS(	NRs-vR^R|R}R~Ri(RRR (R((s./usr/local/lib/python2.7/test/test_optparse.pyRTscCs@|jjddddddd|jgidd6gdS(Ns-qR^RR}R~Ri(R RR+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_defaultscCs@|jjddddddd|jgidd6gdS(Ns-qR^RR}R~R(R RRR+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_default_nones(RRRRTRYRZ(((s./usr/local/lib/python2.7/test/test_optparse.pyRXs		tTestOptionGroupcBs>eZdZdZdZdZdZdZRS(cCstdt|_dS(NRS(RRR (R((s./usr/local/lib/python2.7/test/test_optparse.pyRTscCs\t|jd}|jj||jddddd|jdgidd6gdS(	NtSpams--spamR^R|Rsspam spam spam spamitspam(RR tadd_option_groupRR+(Rtgroup((s./usr/local/lib/python2.7/test/test_optparse.pyt!test_option_group_create_instances
cCs|j|jjdddS(Ns!not an OptionGroup instance: None(RLR R^R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_add_group_no_groupscCs |j|jjddddS(Nsinvalid arguments(RLR R^R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt test_add_group_invalid_argumentsscCsDt|jd}t|_|j|jj|fdtddS(NR\s"invalid OptionGroup (wrong parser)(RR RR9R^RR(RR_((s./usr/local/lib/python2.7/test/test_optparse.pyttest_add_group_wrong_parserscCsX|jjddd}|jd|jddd|j|jjd|dS(NsGroup 2tdescriptionsSome more optionstBacons--baconRCRc(R R^t	set_titleRR/tget_option_group(RR_((s./usr/local/lib/python2.7/test/test_optparse.pyttest_group_manipulates
	
(RRRTR`RaRbRcRh(((s./usr/local/lib/python2.7/test/test_optparse.pyR[s					tTestExtendAddTypescBsKeZdZdZdefdYZdZdZdZRS(cCs]tdtd|j|_|jjdddddd|jjdd	dd
dd
dS(NRSRs-aRCRR}Rs-fs--fileR(RRtMyOptionR RR(R((s./usr/local/lib/python2.7/test/test_optparse.pyRTscCsTtjjtjr(tjtjn(tjjtjrPtjtjndS(N(RRtisdirRtTESTFNtrmdirtisfiletunlink(R((s./usr/local/lib/python2.7/test/test_optparse.pyttearDownsRjcBs:eZdZejdZejejZeed<RS(cCsNtjj|s%td|n%tjj|sJtd|n|S(Ns%s: file does not exists%s: not a regular file(RRtexistsRRn(RRR((s./usr/local/lib/python2.7/test/test_optparse.pyt
check_files
R(R(RRRrRRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRjs	
cCsJttjdj|jdtjdgitjd6dd6gdS(Ntws--files-afooRR[R(topenRRltcloseR+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_filetype_okscCs'|jdtjdgdtjdS(Ns--files-afoos%s: file does not exist(R=RRl(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_filetype_noexistscCs7tjtj|jdtjdgdtjdS(Ns--files-afoos%s: not a regular file(RtmkdirRRlR=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_filetype_notfiles(	RRRTRpRRjRvRwRy(((s./usr/local/lib/python2.7/test/test_optparse.pyRis				tTestExtendAddActionscBs9eZdZdefdYZdZdZRS(c	Cs=|jddddddddg}td	||_dS(
Ns-as--appleR^textendRCRR}tappleR(RjRR (RR(((s./usr/local/lib/python2.7/test/test_optparse.pyRT&sRjcBs8eZejdZejdZejdZdZRS(R{cCsZ|dkr7|jd}|j|gj|ntj|||||||dS(NR{t,(tsplittensure_valueR{Rttake_action(RR^R}RRRR tlvalue((s./usr/local/lib/python2.7/test/test_optparse.pyR0s
(R{(R{(R{(RRRtACTIONSt
STORE_ACTIONSt
TYPED_ACTIONSR(((s./usr/local/lib/python2.7/test/test_optparse.pyRj+s


cCs-|jddgidddgd6gdS(Ns	-afoo,bars--apple=blahR[R\RR|(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_extend_add_action8scCs6|jddddgiddddgd6gdS(	Ns-aR[s-abars--apple=x,yR\RRR|(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_extend_add_action_normal=s(RRRTRRjRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRz%s	
	tTestCallbackcBs,eZdZdZdZdZRS(cCs^tddddd|jtddddd|jdddd	g}td
||_dS(Ns-xR^Rqs-fs--fileRCRR}tfilenameR(RRtprocess_optRR (RR(((s./usr/local/lib/python2.7/test/test_optparse.pyRTEs		cCs@|dkr|j|jdg|j|jg|j||jk|j|dk|jt|jidd6d|j_n|dkr+|j|jdg|j|jdg|j||jk|j|d|jt|jidd6dd6t	|j|j
|n|jd|dS(	Ns-xRi*s--files-fR[Rs!Unknown option %r in process_opt.(R#RRR/R RR"RRtsetattrR}R2(RRRRtparser_((s./usr/local/lib/python2.7/test/test_optparse.pyRRs 'cCs+|jddgidd6dd6gdS(Ns-xs
--file=fooR[Ri*R(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyt
test_callbackfscCsatdt}|jd|jdddddddd	d
dd}|j||dS(
NRSs-hs-ts--testR^RqcSsdS(N(R(((s./usr/local/lib/python2.7/test/test_optparse.pyt<lambda>rRRCRRR[s%Options:
  -t TEST, --test=TEST  foo
(RRRRRQ(RR RO((s./usr/local/lib/python2.7/test/test_optparse.pyttest_callback_helpks
(RRRTRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRDs	
		tTestCallbackExtraArgscBs#eZdZdZdZRS(cCsUtddddd|jddtfddd	d
dgg}td||_dS(
Ns-ps--pointR^RqRtiRCRR}tpointsRR(Rt
process_tupleRcRR (RR(((s./usr/local/lib/python2.7/test/test_optparse.pyRT{s
	cCs|j|d|j|tk|dkrB|j|dn|dkra|j|dntt||jd}t|j|jj	|dS(Nis-ps1,2,3s--points4,5,6R}(
R#R/RcR`tmapR~RARR}R(RRRRRtlenRC((s./usr/local/lib/python2.7/test/test_optparse.pyRscCs-|jdddgiddgd
6gdS(
Ns-p1,2,3s--points4,5,6iiiiiiR(iii(iii(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_callback_extra_argss(RRRTRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRzs		tTestCallbackMeddleArgscBs,eZdZdZdZdZRS(c
Cs\gtdddD]-}tt|ddd|jdd^q}td||_dS(NiiR^RqR}tthingsR(trangeRR,t	process_nRR (RRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRTsCcCst|d}|j}t||krE|jd||fn|jj|jg}|jt|d|!|j	j||d|5dS(Nis$Expected %d arguments for %s option.i(
RctrargsRR2RRR}RR`tlargs(RRRRRRoRR}((s./usr/local/lib/python2.7/test/test_optparse.pyRs	cCs<|jddddddgid
dgd6dd	gdS(Ns-1R[s-3R\RtquxRii(R[(R\RR(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_callback_meddle_argsscCs-|jdddgidgd6dgdS(Ns-2R[s--Ri(R[s--(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyt#test_callback_meddle_args_separators
(RRRTRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs			tTestCallbackManyArgscBs#eZdZdZdZRS(cCsjtddddddd|jddtd	d
ddddd|jddg}td
||_dS(Ns-as--appleR^RqRoiRCRs-bs--bobiRcR(Rtprocess_manyRR (RR(((s./usr/local/lib/python2.7/test/test_optparse.pyRTs
cCs|dkr|j|dn]|dkr>|j|dn>|dkr]|j|dn|dkr||j|dndS(Ns-aR[R\s--appletdingtdongs-biiis--bobifi*i(R[R\(RR(iii(ifi*i(R#(RRRRR((s./usr/local/lib/python2.7/test/test_optparse.pyRscCsO|jddddddddd	d
ddd
dgidd6dd6gdS(Ns-aR[R\s--appleRRs-bRFt2R;s--bobs-666Rt0R|tbob(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_many_argss
(RRRTRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs		
tTestCallbackCheckAbbrevcBs#eZdZdZdZRS(cCs/t|_|jjdddd|jdS(Ns	--foo-barR^Rq(RR Rtcheck_abbrev(R((s./usr/local/lib/python2.7/test/test_optparse.pyRTscCs|j|ddS(Ns	--foo-bar(R#(RRRRR ((s./usr/local/lib/python2.7/test/test_optparse.pyRscCs|jdgigdS(Ns--foo(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_abbrev_callback_expansions(RRRTRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs		tTestCallbackVarArgscBsGeZdZdZdZdZdZdZdZRS(cCsstdddddddtdd	d
ddtdd
d	dd|jddg}tdtd||_dS(Ns-aRCRcRoiR}Rs-bR^R|RWs-cs
--callbackRqtcRSR(Rt
variable_argsRRR (RR(((s./usr/local/lib/python2.7/test/test_optparse.pyRTscCs|j|dkg}|j}x|r|d}|d dkrWt|dks|d dkrt|dkr|ddkrPq%|j||d=q%Wt|j|j|dS(Niis--iR(R/RRRRRRR}(RRRRR Rtarg((s./usr/local/lib/python2.7/test/test_optparse.pyRs		
"2
cCsA|jdddddgidd6dd	6ddgd
6gdS(Ns-a3s-5s
--callbackR[R\iiRRWR(ii(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_variable_argsscCsJ|jddddddgidd6td6dddgd	6dgdS(
Ns-ct37s--txxxs-bthelloRRWR(R+RR(R((s./usr/local/lib/python2.7/test/test_optparse.pyt%test_consume_separator_stop_at_options

cCsG|jdddddgidd6dd6dddgd6dgdS(	NRs-cR[RR\RRWR(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyt%test_positional_arg_and_variable_argss

cCs8|jdddgidd6td6dgd6gdS(Ns-cR[s-bRRWR(R+RR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_stop_at_optionscCs |jddddgddS(Ns-cR;s-5s-asno such option: -5(R=(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_stop_at_invalid_options(	RRRTRRRRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs						tConflictBasecBseZdZdZRS(c	Cs@tddddddddg}td	td
||_dS(Ns-vs	--verboseR^RbR}R~Rsincrement verbosityRSR(RRRR (RR(((s./usr/local/lib/python2.7/test/test_optparse.pyRTscCsd|j_dS(Ni(Rtshow_version(RRRRR ((s./usr/local/lib/python2.7/test/test_optparse.pyRs(RRRTR(((s./usr/local/lib/python2.7/test/test_optparse.pyR
s	tTestConflictcBs2eZdZdZdZdZdZRS(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 versionRs5option -v/--version: conflicting option string(s): -vs conflicting option string(s): -vs-v/--version(s-vs	--version(R9RR	R#Rt	option_id(RR3R7((s./usr/local/lib/python2.7/test/test_optparse.pytassertTrueconflict_errors
	cCs|j|jjdS(N(RR R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_error!scCs&t|jd}|j|jdS(NsGroup 1(RR RR(RR_((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_error_group$scCs#|j|jjddtddS(NR[s'invalid conflict_resolution value 'foo'(R[(R9R tset_conflict_handlerRR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_no_such_conflict_handler(s(RRRRRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs
			tTestConflictResolvecBs>eZdZdZdZdZdZdZRS(c	CsItj||jjd|jjddddd|jdddS(Ntresolves-vs	--versionR^RqRsshow version(RRTR RRR(R((s./usr/local/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|jdgdS(Ns-vs	--verboses	--version(R RR/R#RR(RR4tverbose_opttversion_opt((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_resolve5scCs|jdgddS(Ns-hs}Options:
  --verbose      increment verbosity
  -h, --help     show this help message and exit
  -v, --version  show version
(RJ(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_resolve_helpBscCs(|jdgidd6dd6gdS(Ns-vR~iR(R+R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_resolve_short_optJscCs!|jdgidd6gdS(Ns	--verboseiR~(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_resolve_long_optOs
cCs+|jddgidd6dd6gdS(Ns	--verboses	--versioniR~R(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_resolve_long_optsTs(RRRTRRRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyR.s		
			tTestConflictOverridecBs,eZdZdZdZdZRS(cCsvtdt|_|jjd|jjddddddd	d
|jjdddddd
ddd	ddS(NRSRs-ns	--dry-runR^R|R}tdry_runRsdon't do anythingR3Rmi*sdry run mode(RRR RR(R((s./usr/local/lib/python2.7/test/test_optparse.pyRTZscCsB|jjd}|j|jdg|j|jdgdS(Ns	--dry-runs-n(R RR#RR(RR((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_override_optsdscCs|jdgddS(Ns-hsXOptions:
  -h, --help     show this help message and exit
  -n, --dry-run  dry run mode
(RJ(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_override_helpiscCs!|jdgidd6gdS(Ns-ni*R(R+(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_conflict_override_argsps
(RRRTRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRYs	
		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
tTestHelpcBskeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZRS(cCs|jd|_dS(NiP(tmake_parserR (R((s./usr/local/lib/python2.7/test/test_optparse.pyRTscCstddddddddd	td
ddddd
ddddtdddddddddg}tj$}t||d<td|SWdQXdS(Ns-aRCRR}RtmetavartAPPLERsthrow APPLEs at baskets-bs--booRcRtNUMseshout "boo!" NUM times (in order to frighten away all the evil spirits that cause trouble and mayhem)s--fooR^RR[s*store FOO in the foo list for later fooingtCOLUMNSR(RRtEnvironmentVarGuardR,R(RtcolumnsR(tenv((s./usr/local/lib/python2.7/test/test_optparse.pyRscCst|tjkr?|jjtj}|j|d}ntj}z3t	j
jddtjd<|jdg|Wd|tj(XdS(NtreplaceR[sbar.pyis-h(
RCRDtUnicodeTypeR t
_get_encodingR?R@tencodeRRRRRJ(RR<R>R((s./usr/local/lib/python2.7/test/test_optparse.pytassertHelpEqualss
cCs|jtdS(N(Rt_expected_help_basic(R((s./usr/local/lib/python2.7/test/test_optparse.pyt	test_helpscCs!|jjd|jtdS(NsUsage: %prog [options](R t	set_usageRR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_help_old_usagescCs d|jj_|jtdS(Ni(R Rtshort_firstRt_expected_help_long_opts_first(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_help_long_opts_firstscCs?tj-}d|d<t|j_|jtWdQXdS(Nt80R(RRRR RRt_expected_help_title_formatter(RR((s./usr/local/lib/python2.7/test/test_optparse.pyttest_help_title_formatters
cCsB|jd|_|jt|jd|_|jtdS(Ni<i(RR Rt_expected_help_short_linest_expected_very_help_short_lines(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_wrap_columnss
cCsEtdt|_|jjdddddd}|j|dS(NRSs-aR^R|Ruolé!uKOptions:
  -h, --help  show this help message and exit
  -a          olé!
(RRR RR(Rtexpect((s./usr/local/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((s./usr/local/lib/python2.7/test/test_optparse.pyttest_help_unicode_descriptionscCs|jjdt|jdd}|jddddd|jj|d	}|j|d
|j_|j|ddS(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|Rs
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_descriptionRRR^Rtepilog(RR_R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_help_description_groupss			
(
RRRTRRRRRRRRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRs			
							
	tTestMatchAbbrevcBseZdZdZRS(cCs9|jtdidd6dd6dd6dd6ddS(Ns--fs--fozs--foos--fie(R#R
R(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_match_abbrevEs

cCsDd}idd6dd6dd6}|jt||fdtddS(Ns--fs--fozs--foos--fies,ambiguous option: --f (--fie, --foo, --foz?)(RR9R
R
(RRtwordmap((s./usr/local/lib/python2.7/test/test_optparse.pyttest_match_abbrev_errorMs
(RRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRDs	tTestParseNumbercBs,eZdZdZdZdZRS(cCs<t|_|jjddt|jjddtdS(Ns-nRCs-l(RR RRctlong(R((s./usr/local/lib/python2.7/test/test_optparse.pyRTVscCsT|jtdtfittjd|jtdtfittjddS(NRs!invalid literal for int().*: '?'?t0xOoopss)invalid literal for long().*: '?0xOoops'?(R9RRcRtretcompileR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_parse_num_fail[scCs|jtdtd|jtdtd|jtdtd|jtdtd|jtd	td
|jtdtddS(
NRit0x10it0XAl
t010lt0b11it0bl(R#RRcR(R((s./usr/local/lib/python2.7/test/test_optparse.pyttest_parse_num_okescCs|jddddgidd6dd6g|jdd	d
gidd6dd6g|jd
gd|jdgd|jddgddS(Ns-nRs-lt0x20i*Ri 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((s./usr/local/lib/python2.7/test/test_optparse.pyttest_numeric_optionsms(RRRTRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyRUs		
	cCstjtdS(N(Rtrun_unittestR(((s./usr/local/lib/python2.7/test/test_optparse.pyt	test_mainzst__main__iiiQ(HR?RRRRDtunittestRRRtoptparseRRRRRRRR	R
RRR
RRCRR.t	ExceptionRRtTestCaseRRRR{RRRRRRRRRR"R'R2RCRLRTRXR[RiRzRRRRRRRRRRRRRRRRRRRR(((s./usr/local/lib/python2.7/test/test_optparse.pyt<module>	spL|O"	
3*N#:"+65
+'
!{%	

Zerion Mini Shell 1.0