KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21572/root/usr/lib64/python2.4/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib64/python2.4/test/test_optparse.pyo
m
=5Dc@s\dkZdkZdkZdkZdklZdklZdklZdk	l
Z
lZlZl
Z
lZlZlZlZlZlZlZlZlZlZlZyeefWnej
odZ\ZZnXdefdYZd	efd
YZdeifdYZ d
e fdYZ!de fdYZ"de fdYZ#de fdYZ$hdd<dd<ddd<dddd<Z%dZ&defdYZ'de fdYZ(d e fd!YZ)d"e fd#YZ*d$e fd%YZ+d&e fd'YZ,d(e fd)YZ-d*e fd+YZ.d,e fd-YZ/d.e fd/YZ0d0e fd1YZ1d2e fd3YZ2d4e fd5YZ3d6e fd7YZ4d8e fd9YZ5d:e fd;YZ6d<e fd=YZ7d>e fd?YZ8d@e fdAYZ9dBe fdCYZ:dDe fdEYZ;dFe fdGYZ<dHe<fdIYZ=dJe<fdKYZ>dLe fdMYZ?dNZ@dOZAdPZBdQZCdRe fdSYZDdTe fdUYZEdVZFdWZGdXZHeIdYjoeiJndS([N(sStringIO(spprint(stest_support(smake_optionsOptionsIndentedHelpFormattersTitledHelpFormattersOptionParsersOptionContainersOptionGroups
SUPPRESS_HELPsSUPPRESS_USAGEsOptionErrorsOptionConflictErrorsBadOptionErrorsOptionValueErrorsValuess
_match_abbreviitInterceptedErrorcBs#tZddddZdZRS(NcCs||_||_||_dS(N(t
error_messagetselftexit_statustexit_message(RRRR((t*/usr/lib64/python2.4/test/test_optparse.pyt__init__!s		cCs|ip|ipdS(Nsintercepted error(RRR(R((Rt__str__)s(t__name__t
__module__tNoneRR(((RR stInterceptingOptionParsercBs tZdddZdZRS(NicCstd|d|dS(NRR(Rtstatustmsg(RRR
((Rtexit-scCstd|dS(NR(RR
(RR
((Rterror0s(RR	R
RR(((RR,stBaseTestcBsDtZdZdZdZdddZdZdZRS(NcCsb|ii|\}}t|}|i||dt
|i||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.N(Rtparsert
parse_argstargstoptionstpositional_argstvarstoptdicttassertEqualt
expected_optstlocalstexpected_positional_args(RRRRRRR((Rt
assertParseOK5scCs|djo
f}n|djo
h}ny|||Wn?|j
o3}t|}|i	||dt|SnX|idtdS(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_output -- output we expect to see

        Returns the exception raised for further testing.
        sjexpected exception message:
'''%(expected_message)s'''
actual exception message:
'''%(actual_message)s'''
snexpected exception %(expected_exception)s not raised
called %(func)r
with args %(args)r
and kwargs %(kwargs)r
N(
RR
tkwargstfunctexpected_exceptionterrtstrtactual_messageRRtexpected_messageRtfail(RRRRRR#R R"((RtassertRaisesSs



		cCsPy|ii|Wn(tj
o}|i|i|nX|i	ddS(s
        Assert the parser fails with the expected message.  Caller
        must ensure that self.parser is an InterceptingOptionParser.
        sexpected parse failureN(
RRRtcmdline_argsRR RRtexpected_outputtassertFalse(RR&R'R ((RtassertParseFailsicCsti}y@z tt_|ii|Wdtii}|t_XWnKt
j
o?}|i|||i|i||i|i|nX|iddS(s7Assert the parser prints the expected output on stdout.Nsexpected parser.exit()(tsyststdouttsave_stdouttStringIORRRR&tgetvaluetoutputRR RR'Rtexpected_statusRtexpected_errorR((RR&R'R0R1R,R R/((RtassertOutputs	cGs|i||dt|dS(s4Assert that TypeError is raised when executing func.N(RR%RRR
t	TypeErrorR#(RRR#R((RtassertTypeErrorscCs@|i}||jo#|id|d|dndS(Nshelp text failure; expected:
"s	"; got:
"s"
(Rtformat_helptactual_helpt
expected_helpRtfailureException(RRR7R6((Rt
assertHelps
(	RR	RR%R)R
R2R4R9(((RR4s		1		tTestOptionCheckscBstZdZghdZdZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZdZdZdZdZdZdZdZdZRS(NcCstdt|_dS(Ntusage(tOptionParsertSUPPRESS_USAGERR(R((RtsetUpscCs|it||t|dS(N(RR%tmake_optionRRtOptionErrorR#(RR#RR((RtassertOptionErrorscCs|itddS(Ns+at least one option string must be supplied(RR4R?(R((Rttest_opt_string_emptys	cCs|iddgdS(Ns?invalid option string 'b': must be at least two characters longtb(RRA(R((Rttest_opt_string_too_shorts	cCs|iddgdS(NsOinvalid short option string '--': must be of the form -x, (x any non-dash char)s--(RRA(R((Rttest_opt_string_short_invalids	cCs|iddgdS(NsJinvalid long option string '---': must start with --, followed by non-dashs---(RRA(R((Rttest_opt_string_long_invalids	cCs,|iddghdd<dd<dS(Ns.option -b: invalid keyword arguments: foo, bars-btfootbar(RRAR
(R((Rttest_attr_invalids	cCs#|iddghdd<dS(Ns option -b: invalid action: 'foo's-btactionRG(RRA(R((Rttest_action_invalids	cCsB|iddghdd<|iddghdt<dS(Ns%option -b: invalid option type: 'foo's-bttypeRGs'option -b: invalid option type: 'tuple'(RRAttuple(R((Rttest_type_invalids		cCs,|iddghdd<dd<dS(Ns4option -b: must not supply a type for action 'count's-bRJtcountRLtint(RRA(R((Rttest_no_type_for_actions	cCs&|idddghdd<dS(Ns@option -b/--bad: must supply a list of choices for type 'choice's-bs--badRLtchoice(RRA(R((Rttest_no_choices_lists	cCsBtdi}|id|ddghdd<dd<dS(	NtsBoption -b/--bad: choices must be a list of strings ('%s' supplied)s-bs--badRLRRtchoicessbad choices(RLRttypenameRRA(RRV((Rttest_bad_choices_lists
	cCs,|iddghdd<dd<dS(Ns1option -b: must not supply choices for type 'int's-bRLRPRUtbad(RRA(R((Rttest_no_choices_for_types	cCs,|iddghdd<dd<dS(Ns:option -b: 'const' must not be supplied for action 'store's-bRJtstoretconsti(RRA(R((Rttest_no_const_for_actions	cCs,|iddghdd<dd<dS(Ns:option -b: 'nargs' must not be supplied for action 'count's-bRJROtnargsi(RRA(R((Rttest_no_nargs_for_actions	cCs,|iddghdd<dd<dS(Ns'option -b: callback not callable: 'foo's-bRJtcallbackRG(RRA(R((Rttest_callback_not_callable	s	cCsdS(N((R((RtdummyscCs8|iddghdd<d|i<dd<dS(NsAoption -b: callback_args, if supplied, must be a tuple: not 'foo's-bRJR_t
callback_argsRG(RRARa(R((Rttest_callback_args_no_tuples	cCs8|iddghdd<d|i<dd<dS(NsBoption -b: callback_kwargs, if supplied, must be a dict: not 'foo's-bRJR_tcallback_kwargsRG(RRARa(R((Rttest_callback_kwargs_no_dicts	cCs,|iddghdd<dd<dS(Ns<option -b: callback supplied ('foo') for non-callback options-bRJRZR_RG(RRA(R((Rttest_no_callback_for_action"s	cCs,|iddghdd<dd<dS(Ns9option -b: callback_args supplied for non-callback options-bRJRZRbRG(RRA(R((Rt test_no_callback_args_for_action(s	cCs,|iddghdd<dd<dS(Ns;option -b: callback_kwargs supplied for non-callback options-bRJRZRdRG(RRA(R((Rt"test_no_callback_kwargs_for_action.s	(RR	R>RARBRDRERFRIRKRNRQRSRWRYR\R^R`RaRcReRfRgRh(((RR:s,																				tTestOptionParsercBsbtZdZdZdZdZdZdZdZdZ	d	Z
d
ZRS(Nc	CsWt|_|iidddddddd|iid	d
ddddddS(
Ns-vs	--verboses-ns--noisyRJt
store_truetdesttverboses-qs--quiets--silenttstore_false(R<RRt
add_option(R((RR>5s
cCs|i|iidddS(Nsnot an Option instance: None(RR4RRnR
(R((Rttest_add_option_no_Option<scCs |i|iiddddS(Nsinvalid arguments(RR4RRnR
(R((Rt!test_add_option_invalid_arguments@scCs|iid}|it|t|i|iddg|i|i	ddg|i|i
d|i|iddS(Ns-vs-ns	--verboses--noisyRjRl(RRt
get_optiontopt1tassert_t
isinstancetOptionRt_short_optst
_long_optsRJRk(RRr((Rttest_get_optionDscCs||iid}|iid}|iid}|iid}|i||jo|jo
|jndS(Ns-vs	--verboses-ns--noisy(RRRqRrtopt2topt3topt4Rs(RR{RrRzRy((Rttest_get_option_equalsLs
cCs6|i|iid|i|iiddS(Ns-vs	--verbose(RRsRt
has_option(R((Rttest_has_optionSscCs|i|iiddj|i|iiddj|i|iiddj|i|iiddj|i|iid|i|iid|i|iid|i|iid|i|iid|i|iiddS(Ns-vs	--verboses-ns--noisys-qs--silent(RRsRRqR
tfailIfR}(R((Rtassert_removedWscCs|iid|idS(Ns-n(RRt
remove_optionR(R((Rttest_remove_short_optescCs|iid|idS(Ns	--verbose(RRRR(R((Rttest_remove_long_optiscCs#|i|iiddtddS(NRGsno such option 'foo'(sfoo(RR%RRR
t
ValueError(R((Rttest_remove_nonexistentms(RR	R>RoRpRxR|R~RRRR(((RRi4s									tTestOptionValuescBstZdZdZRS(NcCsdS(N((R((RR>rscCst}|it|h|i|h|i|hdd<|i|dhdd<dd<}td|}|it|||i|||i|hdd<|i|h|i|d|i|gdS(NRGRHRTtbazi*tdefaults(tValuestvaluesRRRtassertNotEqualtdict(RRR((Rttest_basicsus	(RR	R>R(((RRqs	tTestTypeAliasescBstZdZdZRS(NcCst|_dS(N(R<RR(R((RR>scCs|iiddt|iiddt|iiddd|i|iidid|i|iidid|i|iididdS(Ns-xRLs-ss-tR!RPtstring(RRRnRPR!tassertEqualsRqRL(R((Rttest_type_aliasess(RR	R>R(((RRs	tstmi<thtdicCsoy=|diot|Snt|d t|dSWn+tj
o}td||fnXdS(Nisoption %s: invalid duration: %r(tvaluetisdigitRPt_time_unitsRt
IndexErrortOptionValueErrortopt(toptionRRR((Rt_check_durationstDurationOptioncBs1tZeidZeieiZeed<RS(Ntduration(R(RR	RutTYPEStcopytTYPE_CHECKERR(((RRs
tTestDefaultValuescBs5tZdZdZdZdZdZRS(NcCst|_|iidddt|iidddd|iidd	d
dd|iidd	d
|iid
dd|iid|iidddhdt<dd<dd<dd<dd<dd<|_dS(Ns-vs	--verbosetdefaults-qs--quietRkRls-nRLRPi%s-ms-sRGs-ts-utnRRtttu(R<RRRntTrueR
texpected(R((RR>scCs |i|ii|idS(N(RRRtget_default_valuesR(R((Rttest_basic_defaultsscCs[|iidddd|iihdd<dd<|i|ii|idS(NRi*Ri(RRtset_defaultsRtupdateRR(R((Rttest_mixed_defaults_posts"cCs|iidddd|iiddd|iid|iihdd<dd<|i|ii|i|iid|iiddd|iihdd<|i|ii|idS(	Ntxtbarftytblahs-xRtfrobs-y(
RRRRnRRRRRR
(R((Rttest_mixed_defaults_pres"cCst|i_|iiddddd|iiddddd|iidd	|iihd
d<dd<dd
<|i|ii	|i|ii
t|iihd
d<dd<dd	<|i|ii	|idS(Ns-dRLRRi,s-et6mRt42Rteihi*(RRRtoption_classRnRRRRRtset_process_default_valuestFalse(R((Rttest_process_defaults++(RR	R>RRRR(((RRs
				
tTestProgNamecBs2tZdZdZdZdZdZRS(s]
    Test that %prog expands to the right thing in usage, version,
    and help strings.
    cCs|i|i|dS(N(RRRt	get_usagetexpected_usage(RRR((RtassertUsagescCs|i|i|dS(N(RRRtget_versiontexpected_version(RRR((Rt
assertVersionscCsti}zstiidddtid<tddd}d}|i
|||i|d	|i||d
dWd|ti(XdS(NRGRHsbaz.pyisusage: %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*targvt	save_argvtostpathtjoinR<RRRRRR9(RRRR((Rttest_default_prognames
	cCsstdddddd}|id|idd	}|i|||i|d
|i||ddS(NtprogtthingyRs	%prog 0.1R;s
%prog arg args-hs	--versionsusage: thingy arg arg
s
thingy 0.1s
(R<RRRRRRR9(RRR((Rttest_custom_prognames	

(RR	t__doc__RRRR(((RRs
			tTestExpandDefaultscBsbtZdZdZdZdZdZdZdZdZ	d	Z
d
ZRS(NcCsHtdd|_d|_d|_|id|_|id|_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]
(R<RRthelp_prefixt	file_helptexpected_help_filetexpected_help_none(R((RR>s
		cCs<|iiddddd|i|i|i|idS(Ns-fs--fileRsfoo.txtthelp(RRRnRR9R(R((Rttest_option_defaults
cCsI|iiddd|i|iidd|i|i|idS(Ns-fs--fileRtfilesfoo.txt(RRRnRtset_defaultR9R(R((Rttest_parser_default_1s
cCsI|iiddd|i|iidd|i|i|idS(Ns-fs--fileRRsfoo.txt(RRRnRRR9R(R((Rttest_parser_default_2s
cCs6|iiddd|i|i|i|idS(Ns-fs--fileR(RRRnRR9R(R((Rttest_no_default#s
cCs<|iiddddd|i|i|i|idS(Ns-fs--fileRR(RRRnR
RR9R(R((Rttest_default_none_1(s
cCsI|iiddd|i|iidd|i|i|idS(Ns-fs--fileRR(RRRnRRR
R9R(R((Rttest_default_none_2.s
cCsP|iidddd|iidd|id}|i|i|dS(Ns-ps--probRs1blow up with probability PROB [default: %default]tprobf0.42999999999999999sF  -p PROB, --prob=PROB  blow up with probability PROB [default: 0.43]
(RRRnRRR7R9(RR7((Rttest_float_default4s


cCsH|iiddddddd|ii_|i|i|idS(Ns-fs--fileRsfoo.txtRs#read from FILE [default: *DEFAULT*]s	*DEFAULT*(RRRnt	formattertdefault_tagR9R(R((Rttest_alt_expand=s

cCsR|iiddddddd|ii_|id}|i|i|dS(Ns-fs--fileRsfoo.txtRsread from %default files0  -f FILE, --file=FILE  read from %default file
(	RRRnR
RRRR7R9(RR7((Rttest_no_expandDs

(RR	R>RRRRRRRRR(((RRs										tTestStandardcBstZdZdZdZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(NcCsXtdddtddddddtd	d
dg}tdtd
||_dS(Ns-aRLRs-bs--booRPRktboos--fooRJtappendR;toption_list(R?RRR=RR(RR((RR>Qs<	cCs|idgddS(Ns-as-a option requires an argument(RR)(R((Rttest_required_valueYscCs|iddgddS(Ns-bt5xs&option -b: invalid integer value: '5x'(RR)(R((Rttest_invalid_integer\scCs|idgddS(Ns--boo13sno such option: --boo13(RR)(R((Rttest_no_such_option`scCs|idgddS(Ns--boo=x5s)option --boo: invalid integer value: 'x5'(RR)(R((Rttest_long_invalid_integercscCs2|ighdd<dd<dd<gdS(NtaRRG(RRR
(R((Rt
test_emptygscCsD|iddddghdd<dd<dddg<gdS(	Ns-aRTs
--foo=blahs--foo=RRRGR(RRR
(R((Rt"test_shortopt_empty_longopt_appendjs$cCsJ|idddddghdd<dd<ddddg<gdS(	Ns--fooRHRTs--foo=xRRRGR(RRR
(R((Rttest_long_option_appendos'cCs5|idghdd<dd<dd<gdS(Ns-abcRtbcRRG(RRR
(R((Rttest_option_argument_joinedvscCs8|iddghdd<dd<dd<gdS(Ns-at34RRRG(RRR
(R((Rttest_option_argument_split{scCs5|idghdd<dd<dd<gdS(Ns-b34RRi"RG(RRR
(R((Rt#test_option_argument_joined_integerscCs8|iddghdd<dd<dd<gdS(Ns-bs-5RRiRG(RRR
(R((Rt+test_option_argument_split_negative_integerscCs5|idghdd<dd<dd<gdS(Ns--boo=13RRi
RG(RRR
(R((Rt test_long_option_argument_joinedscCs8|iddghdd<dd<dd<gdS(Ns--boot111RRioRG(RRR
(R((Rttest_long_option_argument_splitscCs;|iddghdd<dd<ddg<gdS(Ns	--foo=bars-axyzRtxyzRRGRH(RRR
(R((Rttest_long_option_short_options!cCs;|iddghdd<dd<ddg<gdS(Ns--f=bars-axyzRRRRGRH(RRR
(R((Rttest_abbrev_long_options!cCsG|iig\}}|ii}|it|t|dS(N(	RRRRRRRRR(RRRR((Rt
test_defaultsscCsd|iiddddddddihdd<d	d<i}|id
gd|dS(Ns--fozRJRZRLRRkRGs, s--foos--f=barsambiguous option: --f (%s?)(RRRnRR
tkeyst
possibilitiesR)(RR((Rttest_ambiguous_options
'cCsD|iddddghdd<dd<ddg<gfdS(Ns-aRs--fooRHRRRG(RRR
(R((Rt test_short_and_long_option_splits!cCsG|idddddghdd<dd<d	d
dg<gdS(Ns	--foo=bars-bt123s--fooRRRi{RGRH(RRR
(R((Rt*test_short_option_split_long_option_appends$cCsA|idddghdd<dd<dd<dgfdS(Ns-aRGRHRR(RRR
(R((Rt*test_short_option_split_one_positional_argscCsG|iddddghdd<dd<dd<ddgfdS(Ns-as--RGRHRR(RRR
(R((Rt$test_short_option_consumes_separatorscCsG|iddddghdd<dd<dd<ddgfdS(	Ns-abs--s--fooRHRRCRRG(RRR
(R((Rt&test_short_option_joined_and_separatorscCsD|iddddghdd<dd<ddg<dgdS(	Ns-abt-s--fooRHRRCRRG(RRR
(R((Rt*test_invalid_option_becomes_positional_args!cCsJ|iddddddghdd<dd	<d
ddg<gdS(Ns-b3s-bt5s	--foo=bars--fooRRRiRGRH(RRR
(R((Rttest_no_append_versus_appends$cCs8|iddghdd<dd<dd<gdS(Ns-as-b3RRRG(RRR
(R((Rt&test_option_consumes_optionlike_strings(RR	R>RRRRRRRRRRRRRRRRRRRRRRRR	R
(((RRPs4																									tTestBoolcBs5tZdZdZdZdZdZRS(Nc	CsRtddddddddtd	d
ddddg}td||_dS(
Ns-vs	--verboseRJRjRkRlRRTs-qs--quietRmR(R?RR<RR(RR((RR>scCs |ighdd<gdS(NRlRT(RR(R((Rttest_bool_defaults	cCsU|idghdd<g\}}ttdo|i|itjndS(Ns-qRliR(	RRRRthasattrt__builtins__t
failUnlessRlR(RRR((Rttest_bool_falses
cCsU|idghdd<g\}}ttdo|i|itjndS(Ns-vRliR(	RRRRR
RRRlR(RRR((Rttest_bool_trues
cCs)|idddghdd<gdS(Ns-qvqs-qs-vRli(RR(R((Rttest_bool_flicker_on_and_offs(RR	R>RRRR(((RRs
				t
TestChoicecBs,tZdZdZdZdZRS(NcCsGtdt|_|iiddddddddd	d
dgdS(NR;s-cRJRZRLRRRkRUtonettwotthree(RR=RRRn(R((RR>scCs,|idddghdd<dgdS(Ns-cRRRR(RR(R((Rttest_valid_choicescCs|idddgddS(Ns-ctfourtabcsEoption -c: invalid choice: 'four' (choose from 'one', 'two', 'three')(RR)(R((Rttest_invalid_choicescCs^|iiddddddg|iid}|i|id|i|iddS(	Ns-ds	--defaultRURtfivetsixRRRZ(RRRnRqRRRLRJ(RR((Rttest_add_choice_options
(RR	R>RRR(((RRs			t	TestCountcBstZdZdZdZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZRS(Nc	Cstdt|_tddddd|_|ii|i|iiddd	dd|iid
dddddd
ddS(NR;s-vRJRORkRls	--verboseRLRPs-qs--quiettstore_constR[i(RR=RRR?tv_optRn(R((RR>scCs |ighdd<gdS(NRl(RRR
(R((RRscCs#|idghdd<gdS(Ns-vRli(RR(R((Rttest_count_onescCs#|idghdd<gdS(Ns-vvvRli(RR(R((Rttest_count_threescCs)|idddghdd<gdS(Ns-vRli(RR(R((Rttest_count_three_apart!scCs&|iddghdd<gdS(Ns-vvvs--verbose=2Rli(RR(R((Rttest_count_override_amount$scCs)|idddghdd<gdS(Ns-vvvs--verbose=2s-qRli(RR(R((Rttest_count_override_quiet'scCs,|iddddghdd<gdS(Ns-vvvs--verbose=2s-qs-vRli(RR(R((Rttest_count_overriding*scCs,|idddghdd<dgdS(Ns--quiett3s-vRli(RR(R((Rttest_count_interspersed_args.scCs<|ii|idddghdd<ddgdS(Ns--quietR's-vRli(RRtdisable_interspersed_argsR(R((Rttest_count_no_interspersed_args3s
cCs|iddgddS(Ns-q3s-vsno such option: -3(RR)(R((Rttest_count_no_such_option9scCs|iddgddS(Ns	--quiet=3s-vs$--quiet option does not take a value(RR)(R((Rttest_count_option_no_value<scCs3|iidd|ighdd<gdS(NRli(RRRR(R((Rttest_count_with_default@scCs?|iidd|iddddghdd<gdS(NRlis-vvvs--verbose=2s-qs-vi(RRRR(R((Rttest_count_overriding_defaultDs(RR	R>RR!R"R#R$R%R&R(R*R+R,R-R.(((RRs													tTestMultipleArgscBs5tZdZdZdZdZdZRS(NcCsAtdt|_|iidddddddd	d
ddS(NR;s-ps--pointRJRZR]iRLtfloatRktpoint(RR=RRRn(R((RR>JscCs8|iddddddghdd<ddgdS(NRGs-pt1s2.5s-4.3RR1f1.0f2.5f-4.2999999999999998(f1.0f2.5f-4.2999999999999998(RR(R((Rttest_nargs_with_positional_argsOscCs<|idddddghdddd	f<dgdS(
Ns--points-1s2.5s-0RR1f-1.0f2.5f0.0(RR(R((Rttest_nargs_long_optTscCs |iddddgddS(Ns-ps1.0t2xs3.5s-option -p: invalid floating-point value: '2x'(RR)(R((Rttest_nargs_invalid_float_valueYscCs|idddgddS(Ns--points1.0s3.5s#--point option requires 3 arguments(RR)(R((Rttest_nargs_required_values^s(RR	R>R3R4R6R7(((RR/Is
				tTestMultipleArgsAppendcBs,tZdZdZdZdZRS(NcCsltdt|_|iidddddddd	d
d|iidd
ddddddd
ddS(NR;s-ps--pointRJRZR]iRLR0RkR1s-fs--fooRiRPRG(RR=RRRn(R((RR>cs
cCsG|idddddddghdd<d	ddg<dgdS(Ns-ft4s-3Rs--fooR2t666R1RGiiii(ii(ii(RRR
(R((Rttest_nargs_appendjscCs|idgddS(Ns-f4,3s-f option requires 2 arguments(RR)(R((Rt!test_nargs_append_required_valuesoscCs2|iddghdd<ddg<gdS(Ns--foo=3R9R1RGii(ii(RRR
(R((Rttest_nargs_append_simpless(RR	R>R;R<R=(((RR8bs			tTestVersioncBstZdZdZRS(NcCsmtdtdd|_ti}z9tii	ti
ddtid<|idgdWd|ti(XdS(	NR;Rs	%prog 0.1RGRHis	--versionsbar 0.1
(RR=RRR*RRRRRtcurdirR2(RR((Rttest_versionys	
"cCs)tdt|_|idgddS(NR;s	--versionsno such option: --version(RR=RRR)(R((Rttest_no_versions(RR	R@RA(((RR>xs	
tTestConflictingDefaultscBs)tZdZdZdZdZRS(s4Conflicting default values: the last one should win.c
Cs1tdtdddddddg|_dS(	NRs-vRJRjRkRlRi(R<R?RR(R((RR>scCsB|iiddddddd|ighdd<gdS(Ns-qRJRmRkRlRi(RRRnR(R((Rttest_conflict_defaults
cCsB|iiddddddd|ighdd<gdS(Ns-qRJRmRkRlR(RRRnR
R(R((Rttest_conflict_default_nones
(RR	RR>RCRD(((RRBs		tTestOptionGroupcBs>tZdZdZdZdZdZdZRS(NcCstdt|_dS(NR;(R<R=RR(R((RR>scCs^t|id}|ii||iddddd|idghdd<gdS(	NtSpams--spamRJRjRsspam spam spam spamtspami(tOptionGroupRRtgrouptadd_option_groupRnR(RRI((Rt!test_option_group_create_instances

cCs|i|iidddS(Ns!not an OptionGroup instance: None(RR4RRJR
(R((Rttest_add_group_no_groupscCs |i|iiddddS(Nsinvalid arguments(RR4RRJR
(R((Rt test_add_group_invalid_argumentsscCsDt|id}t|_|i|ii|fdtddS(NRFs"invalid OptionGroup (wrong parser)(	RHRRRIR<R%RJR
R(RRI((Rttest_add_group_wrong_parserscCsX|iiddd}|id|iddd|i|iid|dS(NsGroup 2tdescriptionsSome more optionstBacons--baconRLRP(RRRJRIt	set_titleRnRstget_option_group(RRI((Rttest_group_manipulates

(RR	R>RKRLRMRNRS(((RREs					tTestExtendAddTypescBsBtZdZdefdYZdZdZdZRS(NcCs]tdtd|i|_|iidddddd|iidd	dd
dd
dS(NR;Rs-aRLRRkRs-fs--fileR(RR=RtMyOptionRRnR
(R((RR>s	RUcBs:tZdZeidZeieiZeed<RS(NcCsRtii|ptd|n(tii|ptd|n|S(Ns%s: file does not exists%s: not a regular file(RRtexistsRRtisfile(RRR((Rt
check_files
R(sfile(RR	RXRuRRR(((RRUs	
cCs^ttidi|idtidghdti<dd<gtitidS(Ntws--files-afooRRRG(topenttest_supporttTESTFNtcloseRRRtunlink(R((Rttest_extend_files
cCs'|idtidgdtidS(Ns--files-afoos%s: file does not exist(RR)R[R\(R((Rttest_extend_file_nonexistentscCsGtiti|idtidgdtititidS(Ns--files-afoos%s: not a regular file(RtmkdirR[R\RR)trmdir(R((Rttest_file_irregulars(RR	R>RuRUR_R`Rc(((RRTs
			tTestExtendAddActionscBs9tZdZdefdYZdZdZRS(Nc	Cs=|iddddddddg}td	||_dS(
Ns-as--appleRJtextendRLRRktappleR(RRURR<R(RR((RR>sRUcBs8tZeidZeidZeidZdZRS(NRecCs\|djo,|id}|i|gi|n ti	|||||||dS(NRet,(
RJRtsplittlvalueRtensure_valueRkReRuttake_actionRRR(RRJRkRRRRRi((RRks

(sextend(sextend(sextend(RR	RutACTIONSt
STORE_ACTIONSt
TYPED_ACTIONSRk(((RRUs


cCs/|iddghddddg<gdS(Ns	-afoo,bars--apple=blahRfRGRHR(RR(R((Rttest_extend_add_actionsc	Cs8|iddddghdddddg<gdS(	Ns-aRGs-abars--apple=x,yRfRHRR(RR(R((Rttest_extend_add_action_normals(RR	R>RuRURoRp(((RRds	
	tTestCallbackcBs,tZdZdZdZdZRS(NcCs^tddddd|itddddd|idddd	g}td
||_dS(Ns-xRJR_s-fs--fileRLRRktfilenameR(R?R
Rtprocess_optRR<R(RR((RR>s	cCsJ|djo|i|idg|i|ig|i||ij|i|dj|it|ihdd<d|i_
n|djo|i|idg|i|idg|i||ij|i|d|it|ihdd<dd<t|i|i|n|id|dS(	Ns-xRri*s--files-fRGRs!Unknown option %r in process_opt.(RRRRRvRwRstparser_RRR
RRRtsetattrRkR$(RRRRRt((RRss
"
+cCs/|iddghdd<dd<gdS(Ns-xs
--file=fooRrRGRi*(RR(R((Rt
test_callback$scCsatdt}|id|idddddddd	d
dd}|i||dS(
NR;s-hs-ts--testRJR_cCsdS(N(R
(((Rt<lambda>0sRLRRRGs%options:
  -t TEST, --test=TEST  foo
(R<R=RRRnR7RR9(RRR7((Rttest_callback_help)s

(RR	R>RsRvRx(((RRqs	
		tTestCallbackExtraArgscBs#tZdZdZdZRS(NcCsUtddddd|iddtfddd	d
dgg}td||_dS(
Ns-ps--pointRJR_RbiRLRRktpointsRR(R?Rt
process_tupleRPRR<R(RR((RR>9s
	cCs|i|d|i|tj|djo|i|dn"|djo|i|dntt	||i
d}t|i
|ii|dS(Nis-ps1,2,3s--points4,5,6Rg(RRtlenRsRLRPRRRMtmapRhtgetattrRtRRRkR(RRRRRtR|RL((RR{@s

c	Cs/|idddghdddg<gdS(
Ns-p1,2,3s--points4,5,6Rziiiiii(iii(iii(RR(R((Rttest_callback_extra_argsLs(RR	R>R{R(((RRy8s		tTestCallbackMeddleArgscBs,tZdZdZdZdZRS(NcCsdg}tdddD].}|tt|ddd|iddq~}td||_	dS(NiiRJR_RktthingsR(
t_[1]trangeRR?R!Rt	process_nRR<R(RRRR((RR>Rs2cCst|d}|i}t||jo|id||fn|ii	|ig}|it
|d|!|ii||d|5dS(Nis$Expected %d arguments for %s option.i(RPRR]RttrargsR|RR$RRjRRkRRMtlargs(RRRRRtR]RRk((RRYs	c	Cs>|iddddddghdd
dg<dd	gdS(Ns-1RGs-3RHRtquxRii(sfoo(sbarsbazR(RR(R((Rttest_callback_meddle_argsdscCs/|idddghddg<dgdS(Ns-2RGs--Ri(sfoos--(RR(R((Rt#test_callback_meddle_args_separatoris(RR	R>RRR(((RRQs			tTestCallbackManyArgscBs#tZdZdZdZRS(NcCsjtddddddd|iddtd	d
ddddd|iddg}td
||_dS(Ns-as--appleRJR_R]iRLRs-bs--bobiRPR(R?Rtprocess_manyRR<R(RR((RR>os'cCs|djo|i|dnd|djo|i|dnC|djo|i|dn"|djo|i|dndS(Ns-aRGRHs--appletdingtdongs-biiis--bobifi*i(sfoosbar(RR(iii(ifi*i(RRRR(RRRRRt((RRvs



cCsS|iddddddddd	d
ddd
dghdd<dd<gdS(Ns-aRGRHs--appleRRs-bR2t2R's--bobs-666Rt0Rftbob(RRR
(R((Rttest_many_argss3(RR	R>RR(((RRns		
tTestCallbackCheckAbbrevcBs#tZdZdZdZRS(NcCs/t|_|iidddd|idS(Ns	--foo-barRJR_(R<RRRntcheck_abbrev(R((RR>scCs|i|ddS(Ns	--foo-bar(RRR(RRRRR((RRscCs|idghgdS(Ns--foo(RR(R((Rttest_abbrev_callback_expansions(RR	R>RR(((RRs		tTestCallbackVarArgscBsGtZdZdZdZdZdZdZdZRS(NcCsstdddddddtdd	d
ddtdd
d	dd|iddg}tdtd||_dS(Ns-aRLRPR]iRkRs-bRJRjRCs-cs
--callbackR_tcR;R(R?Rt
variable_argsRRR=R(RR((RR>s?	cCs|i|djd}g}|i}x|o|d}|d djot|djp5|d djo)t|djo|ddjoPq+|i	||d=q+Wt
|i|i
|dS(Niis--iR(RRsRR
tdoneRRtargR|RRuRRRk(RRRRRRRR((RRs	
Y
cCsG|idddddghdd<d	d<d
ddg<gdS(Ns-a3s-5s
--callbackRGRHRiiRCR(ii(RRR
(R((Rttest_variable_argss$cCsP|iddddddghdd<dt<d	dddg<dgdS(
Ns-ct37s--txxxs-bthelloRRCR(RRR
R(R((Rt%test_consume_separator_stop_at_options'cCsM|idddddghdd<dd<ddddg<dgdS(	NRs-cRGRRHRRCR(RRR
(R((Rt%test_positional_arg_and_variable_argss'cCs>|idddghdd<dt<ddg<gdS(Ns-cRGs-bRRCR(RRR
R(R((Rttest_stop_at_options!cCs |iddddgddS(Ns-cR's-5s-asno such option: -5(RR)(R((Rttest_stop_at_invalid_options(	RR	R>RRRRRR(((RRs						tConflictBasecBstZdZdZRS(Nc	Cs@tddddddddg}td	td
||_dS(Ns-vs	--verboseRJRORkRlRsincrement verbosityR;R(R?RRR=RR(RR((RR>s	cCsd|i_dS(Ni(RRtshow_version(RRRRR((RRs(RR	R>R(((RRs	tTestConflictcBs2tZdZdZdZdZdZRS(s9Use the default conflict resolution for Optik 1.2: error.cCsc|i|d
hdd<d|i<dd<td}|i|id|i|id	dS(Ns-vs	--versionRJR_Rsshow versions5option -v/--version: conflicting option string(s): -vs conflicting option string(s): -vs-v/--version(s-vs	--version(	RR%RRtOptionConflictErrorR RR
t	option_id(RRR ((Rtassert_conflict_errors
-	cCs|i|iidS(N(RRRRn(R((Rttest_conflict_errorscCs&t|id}|i|idS(NsGroup 1(RHRRRIRRn(RRI((Rttest_conflict_error_groupscCs#|i|iiddtddS(NRGs'invalid conflict_resolution value 'foo'(sfoo(RR%Rtset_conflict_handlerR
R(R((Rttest_no_such_conflict_handlers(RR	RRRRR(((RRs
			tTestConflictResolvecBs>tZdZdZdZdZdZdZRS(Nc	CsIti||iid|iiddddd|idddS(Ntresolves-vs	--versionRJR_Rsshow version(RR>RRRRnR(R((RR>s
cCs|iid}|iid}|iid}|i||j|i||j	|i|idg|i|i	dg|i|idg|i|i	g|i|idgdS(Ns-vs	--verboses	--version(
RRRqR tverbose_opttversion_optRsRRwRv(RR RR((Rttest_conflict_resolvescCs|idgddS(Ns-hs}options:
  --verbose      increment verbosity
  -h, --help     show this help message and exit
  -v, --version  show version
(RR2(R((Rttest_conflict_resolve_helpscCs,|idghdd<dd<gdS(Ns-vRlRi(RRR
(R((Rttest_conflict_resolve_short_opt	scCs#|idghdd<gdS(Ns	--verboseRli(RR(R((Rttest_conflict_resolve_long_optscCs/|iddghdd<dd<gdS(Ns	--verboses	--versionRliR(RR(R((Rttest_conflict_resolve_long_optss(RR	R>RRRRR(((RRs		
			tTestConflictOverridecBs,tZdZdZdZdZRS(NcCsvtdt|_|iid|iiddddddd	d
|iidddddd
ddd	ddS(NR;Rs-ns	--dry-runRJRjRktdry_runRsdon't do anythingRR[i*sdry run mode(RR=RRRRn(R((RR>s
cCsB|iid}|i|idg|i|idgdS(Ns	--dry-runs-n(RRRqRRRvRw(RR((Rttest_conflict_override_opts#scCs|idgddS(Ns-hsXoptions:
  -h, --help     show this help message and exit
  -n, --dry-run  dry run mode
(RR2(R((Rttest_conflict_override_help(scCs#|idghdd<gdS(Ns-nRi*(RR(R((Rttest_conflict_override_args/s(RR	R>RRR(((RRs	
		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
tTestHelpcBsYtZdZdZdZdZdZdZdZdZ	d	Z
RS(
NcCs|id|_dS(NiP(Rtmake_parserR(R((RR>hscCstddddddddd	td
ddddd
ddddtdddddddddg}t|tid<td|S(Ns-aRLRRkRtmetavartAPPLERsthrow APPLEs at baskets-bs--booRPRtNUMseshout "boo!" NUM times (in order to frighten away all the evil spirits that cause trouble and mayhem)s--fooRJRRGs*store FOO in the foo list for later fooingtCOLUMNSR(R?RR!tcolumnsRtenvironR(RRR((RRks$!cCsOti}z3tiiddtid<|idg|Wd|ti(XdS(NRGsbar.pyis-h(	R*RRRRRRR2R'(RR'R((RtassertHelpEqualszs
cCs|itdS(N(RRt_expected_help_basic(R((Rt	test_helpscCs!|iid|itdS(Nsusage: %prog [options](RRt	set_usageRR(R((Rttest_help_old_usagescCs d|ii_|itdS(Ni(RRRtshort_firstRt_expected_help_long_opts_first(R((Rttest_help_long_opts_firstscCs t|i_|itdS(N(tTitledHelpFormatterRRRRt_expected_help_title_formatter(R((Rttest_help_title_formatterscCs#|id|_|itdS(Ni<(RRRRt_expected_help_short_lines(R((Rttest_wrap_columnsscCs_|iidt|idd}|iddddd|ii||id	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-gRJRjRs
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.
(RRtset_descriptionRHRIRnRJR(RRI((Rttest_help_description_groupss	(RR	R>RRRRRRRR(((RRgs									tTestMatchAbbrevcBstZdZdZRS(NcCsA|itdhdd<dd<dd<dd<ddS(Ns--fs--fozs--foos--fie(RRt
_match_abbrevR
(R((Rttest_match_abbrevs*cCscd}hdd<dd<dd<}di|i}|it||fdt	d|dS(Ns--fs--fozs--foos--fies, sambiguous option: --f (%s?)(
RR
twordmapRRRRR%RtBadOptionError(RRRR((Rttest_match_abbrev_errors
!(RR	RR(((RRs	cCsOtit}g}t|D]*}|ido|t||qq~S(NtTest(	R*tmodulesRtmodRtdirtnamet
startswithR~(RRR((Rt_testclassess
cCs:ti}x'tD]}|iti|qW|S(N(tunittestt	TestSuitetsuiteRt	testclasstaddTestt	makeSuite(RR((RRs

cCstitdS(N(R[t	run_suiteR(((Rt	test_mainst__main__(ii(KR*RRRt	cStringIOR-tpprintRR[toptparseR?RutIndentedHelpFormatterRR<tOptionContainerRHt
SUPPRESS_HELPR=R@RRRRRRRt	NameErrort	ExceptionRRtTestCaseRR:RiRRRRRRRRRRRRR/R8R>RBRERTRdRqRyRRRRRRRRRRRRRRRRRRtmain(CR[RRRRRR:RRRqRyRRRRRRRRRRRuRiRRRRRRRRdRRR<RR8RRRRR*RRR>RR/RRHRRRRER@RRR-RRBRRRR?R=RRRRT((Rt?sp				


a|=6	
3*N%:"'66
+
U			


Anon7 - 2021