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.219.228.61
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_argparse.pyo
�
?��cc@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
m
Z
de
fd��YZddlm
Z
dejfd��YZdefd	��YZd
efd��YZdefd
��YZdefd��YZd�Zde	jfd��YZdefd��YZefZedei�Zdefd��YZdefd��YZdefd��YZdefd��YZdefd��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��YZ+d6efd7��YZ,d8efd9��YZ-d:efd;��YZ.d<efd=��YZ/d>efd?��YZ0d@efdA��YZ1dBefdC��YZ2dDefdE��YZ3dFefdG��YZ4dHefdI��YZ5dJefdK��YZ6dLefdM��YZ7dNefdO��YZ8dPefdQ��YZ9dRefdS��YZ:dTefdU��YZ;dVefdW��YZ<dXefdY��YZ=dZefd[��YZ>d\efd]��YZ?d^efd_��YZ@d`efda��YZAdbefdc��YZBddefde��YZCdfefdg��YZDdhefdi��YZEdjefdk��YZFdlefdm��YZGdnefdo��YZHdpefdq��YZIdrefds��YZJdtefdu��YZKdvefdw��YZLdxefdy��YZMdzefd{��YZNd|efd}��YZOd~efd��YZPd�efd���YZQd�efd���YZRd�efd���YZSd�efd���YZTd�efd���YZUd�efd���YZVd�efd���YZWd�efd���YZXd�efd���YZYd�efd���YZZd�efd���YZ[d�efd���YZ\d�efd���YZ]d�efd���YZ^d�efd���YZ_d�efd���YZ`d�efd���YZad�efd���YZbd�efd���YZcd�efd���YZdd�efd���YZed�efd���YZfd�efd���YZgd�eefd���YZhd�eefd���YZid�efd���YZjd�efd���YZkd�eefd���YZld�eefd���YZmd�eefd���YZnd�efd���YZoejpeqed��o�ejr�d�kd��d�eefd���Y�Zsd�eefd���YZtd�efd���YZud�efd���YZvd�efd���YZwd�efd���YZxd�efd���YZyd�efd���YZzd�efd���YZ{d�efd���YZ|d�efd���YZ}d�efd���YZ~d�efd���YZd�eefd���YZ�d�eefd���YZ�d�eefd���YZ�d�eefd���YZ�d�eefd���YZ�d�eefd���YZ�d�eefd���YZ�d�eefd���YZ�d�efd���YZ�d�e�e~fd���YZ�d�e�e�fd���YZ�d�e�e�fd���YZ�d�e�e�fd���YZ�d�e�e�fd���YZ�d�e�e�fd���YZ�d�e�e�fd���YZ�d�e�e�fd���YZ�d�efd���YZ�d�efd��YZ�defd��YZ�defd��YZ�efZe�dei�Z�de�fd��YZ�de�fd	��YZ�d
e�fd��YZ�de�fd
��YZ�de�fd��YZ�de�fd��YZ�de�fd��YZ�de�fd��YZ�de�fd��YZ�de�fd��YZ�de�fd��YZ�de�fd��YZ�de�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-��YZ�d.e�fd/��YZ�d0e�fd1��YZ�d2e�fd3��YZ�d4e�fd5��YZ�d6e�fd7��YZ�d8e�fd9��YZ�d:e�fd;��YZ�d<e�fd=��YZ�d>e�fd?��YZ�d@e�fdA��YZ�dBe�fdC��YZ�dDe�fdE��YZ�dFe�fdG��YZ�dHe�fdI��YZ�dJe�fdK��YZ�dLe�fdM��YZ�dNefdO��YZ�dPefdQ��YZ�dRefdS��YZ�dTefdU��YZ�dVefdW��YZ�dXefdY��YZ�dZefd[��YZ�d\efd]��YZ�d^efd_��YZ�d`efda��YZ�dbefdc��YZ�ddefde��YZ�dfefdg��YZ�dhefdi��YZ�djefdk��YZ�dl�Z�e�dmkr�e��ndS(ni����N(tStringIOtStdIOBuffercBseZRS((t__name__t
__module__(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRs(ttest_supporttTestCasecBseZd�Zd�ZRS(cCsQ||kr4dGHt|�GHt|�GH|GH|GHntt|�j||�dS(Nt(treprtsuperRtassertEqual(tselftobj1tobj2((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR	scCs-tj�}|jd�|j|j�dS(NtCOLUMNS(RtEnvironmentVarGuardtunsett
addCleanupt__exit__(R
tenv((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytsetUp s
(RRR	R(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRs		tTempDirMixincBs#eZd�Zd�Zd�ZRS(cCs2tj�|_tj�|_tj|j�dS(N(ttempfiletmkdtempttemp_dirtostgetcwdtold_dirtchdir(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR+scCs�tj|j�x_tj|jdt�D]E\}}}x3|D]+}tjtjj|j|�t	j
�q?Wq)Wtj|jt
�dS(Nttopdown(RRRtwalkRtFalsetchmodtpathtjointstattS_IWRITEtshutiltrmtreetTrue(R
troottdirstfilestname((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttearDown0s
(
-cCsTtjj|j|�}t|d��}|j|�WdQXtj|tj�dS(Ntw(	RR R!RtopentwriteRR"tS_IREAD(R
tfilenamet	file_pathtfile((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytcreate_readonly_file7s(RRRR+R3(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR)s		tSigcBseZd�ZRS(cOs||_||_dS(N(targstkwargs(R
R5R6((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt__init__?s	(RRR7(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR4=stNScBs2eZd�Zd�ZdZd�Zd�ZRS(cKs|jj|�dS(N(t__dict__tupdate(R
R6((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7FscCsRt|jj��}djg|D]}d|^q"�}dt|�j|fS(Ns, s%s=%rs%s(%s)(tsortedR9titemsR!ttypeR(R
tsorted_itemsttupt	kwarg_str((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt__repr__Is&cCst|�t|�kS(N(tvars(R
tother((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt__eq__PscCs||kS(N((R
RC((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt__ne__SsN(RRR7RAtNonet__hash__RDRE(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR8Ds
			tArgumentParserErrorcBseZdddd�ZRS(cCs>tj||||�||_||_||_||_dS(N(t	ExceptionR7tmessagetstdouttstderrt
error_code(R
RJRKRLRM((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7Ys
			N(RRRFR7(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRHWsc
Os]ttjt�s$ttjt�r1|||�Stj}tj}t�t_t�t_z�y�|||�}xptt|��D]\}t||�tjkr�t|||�nt||�tjkr�t|||�q�q�W|SWnWt	k
rAtj
�dj}tjj�}tjj�}	t
d||	|��nXWd|t_|t_XdS(Nit
SystemExit(t
isinstancetsysRLRRKtlistRBtgetattrtsetattrRNtexc_infotcodetgetvalueRH(
t
parse_argsR5R6t
old_stdoutt
old_stderrtresulttkeyRURKRL((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytstderr_to_parser_erroras,$
		
	tErrorRaisingArgumentParsercBs#eZd�Zd�Zd�ZRS(cOs"tt|�j}t|||�S(N(RR]RWR\(R
R5R6RW((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRW�scOs"tt|�j}t|||�S(N(RR]texitR\(R
R5R6R^((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR^�scOs"tt|�j}t|||�S(N(RR]terrorR\(R
R5R6R_((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR_�s(RRRWR^R_(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR]�s		tParserTesterMetaclasscBseZdZd�ZRS(s}Adds parser tests using the class attributes.

    Classes of this type should specify the following attributes:

    argument_signatures -- a list of Sig objects which specify
        the signatures of Argument objects to be created
    failures -- a list of args lists that should cause the parser
        to fail
    successes -- a list of (initial_args, options, remaining_args) tuples
        where initial_args specifies the string args to be parsed,
        options is a dict that should match the vars() of the options
        parsed out of initial_args, and remaining_args should be any
        remaining unparsed arguments
    cCs�|dkrdSt|d�s.t�|_nt|d�sIt|_nd�}d�}d�}d�}d�}d	tfd
��Y}	x>|||gD]-}
x$||gD]}|	||
|�q�Wq�WdS(NtParserTestCasetparser_signaturetparser_classcSs+x$|D]}|j|j|j�qWdS(s(Add all arguments directly to the parserN(tadd_argumentR5R6(tparsertargument_signaturestsig((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt	no_groups�s
cSs:|jd�}x$|D]}|j|j|j�qWdS(s4Add all arguments under a single group in the parsertfooN(tadd_argument_groupRdR5R6(ReRftgroupRg((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt	one_group�s
cSsJxCt|�D]5\}}|jd|�}|j|j|j�q
WdS(s0Add each argument in its own group to the parsersfoo:%iN(t	enumerateRjRdR5R6(ReRftiRgRk((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytmany_groups�scSs
|j|�S(s#Parse the args by passing in a list(RW(ReR5((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytlistargs�scSs<tj}|dg|t_z|j�SWd|t_XdS(s(Parse the args by defaulting to sys.argviN(RPtargvRW(ReR5told_sys_argv((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytsysargs�s
	tAddTestscBs,eZd�Zd�Zd�Zd�ZRS(cSs�||_||_|jj}|jj}x~|j|jgD]j}|j}|||f}dj|�}	|d�}
y
|	|
_Wntk
r�nXt||	|
�q=WdS(Nt_cSs||�dS(N((R
t	test_func((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytwrapper�s(t_add_argumentst_parse_argsRt
test_failuresttest_successesR!t	TypeErrorRS(R
t
tester_clst
add_argumentsRWtadd_arguments_nametparse_args_nameRvt	func_nametnamest	test_nameRw((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7�s			

cSsA|jj}|jj}|j||�}|j||j�|S(N(RbR5R6RcRxRf(R
ttesterR5R6Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt_get_parser�s
cSsO|j|�}x9|jD].}|j�}|j}|t|j|�qWdS(N(R�tfailurestsplittassertRaisesRHRW(R
R�Retargs_strR5traises((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRz�s
	cSsm|j|�}xW|jD]L\}}t|t�rC|j�}n|j||�}|j||�qWdS(N(R�t	successesROtstrR�RyR	(R
R�ReR5texpected_nst	result_ns((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR{�s(RRR7R�RzR{(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRt�s			(thasattrR4RbR]Rctobject(tclsR*tbasestbodydictRhRlRoRpRsRtR~RW((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7�s						-(RRt__doc__R7(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR`�sRatTestOptionalsSingleDashcBs�eZdZed�gZdddddgZdedd
�fdedd�fd	edd�fd
edd�fdedd�fgZRS(s1Test an Optional with a single-dash option strings-xtas--foos-x --foos-x -yRtxs-x as-xas-x -1s-1s-x-1N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�stTestOptionalsSingleDashCombinedcBs�eZdZeddd�eddddd�ed�gZd	d
ddd
ddddddgZdededd!dd!�fdede	dd!dd!�fdededd!dd	�fdededd!dd	�fdede	dd!dd	�fdede	dd!dd	�fdede	dd!dd	�fdede	dd!dd	�fdededddd!�fdededddd!�fdede	dddd	�fd ede	dddd	�fgZ
RS("s1Test an Optional with a single-dash option strings-xtactiont
store_trues-yyytstore_consttconsti*s-zR�s--foos-xas-x --foos-x -zs-z -xs-yxs-yz as-yyyxs-yyyzas-xyzaRR�tyyytzs-zas-z as-xzas-xz as-x -zas-x -z as-ys-x -yyy -zas-x -yyy -z aN(RRR�R4RfR�R8RRFR&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s$tTestOptionalsSingleDashLongcBs�eZdZed�gZddddddgZdedd�fd	edd�fd
edd�fdedd�fd
edd�fgZRS(sATest an Optional with a multi-character single-dash option strings-fooR�s--foos
-foo --foos-foo -ys-fooaRRis-foo as-foo -1s-1s-fo as-f aN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�0st&TestOptionalsSingleDashSubsetAmbiguouscBs"eZdZed�ed�ed�gZddddddd	gZd
eddddd
d�fdeddddd
d�fdeddddd
d�fdeddddd
d�fdeddddd
d�fdeddddd
d�fdeddddd
d�fgZRS(s=Test Optionals where option strings are subsets of each others-fs-foobars-foorabs-foos-fos-foo bs-foobs-foobas-fooraRtftfoobartfoorabs-f aR�s-fas-foatoas-fooatooas	-foobar as	-foorab aN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�>s!t TestOptionalsSingleDashAmbiguouscBs�eZdZed�ed�gZddddddd	gZd
edddd�fd
edddd�fdedddd�fdedddd�fdedddd�fdedddd�fdedddd�fgZRS(s7Test Optionals that partially match but are not subsetss-foobars-foorabs-fs-f as-fas-foas-foos-fos-foo bRR�R�s-foob aR�s-foor as-fooba as-foora as	-foobar as	-foorab aN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�NstTestOptionalsNumericcBs�eZdZeddd�gZddddddgZd	edd�fd
edd�fdedd�fdedd
�fgZRS(s(Test an Optional with a short opt strings-1tdesttoneR�s-1 --foos-1 -ys-1 -1s-1 -2Rs-1 as-1as-1-2s-2N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�^stTestOptionalsDoubleDashcBs�eZdZed�gZddddddgZdedd�fd	edd�fd
edd�fdedd�fd
edd�fgZRS(s1Test an Optional with a double-dash option strings--foos-fs-f aR�s--foo -xs--foo --barRRis--foo as--foo=as
--foo -2.5s-2.5s
--foo=-2.5N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�kst#TestOptionalsDoubleDashPartialMatchcBs�eZdZeddd�ed�gZddddd	d
gZdeded
d�fdeded
d�fdede	d
d�fdede	d
d�fdede	d
d�fdede	d
d�fgZ
RS(s7Tests partial matching with a double-dash option strings--badgerR�R�s--bats--bars--bs--bas--b=2s--ba=4s	--badge 5Rtbadgertbats--bat XtXs--bads--badgs--badgeN(RRR�R4RfR�R8RRFR&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�yst"TestOptionalsDoubleDashPrefixMatchcBs�eZdZeddd�ed�gZdddddgZd	ed
edd�fded
edd
�fded
edd
�fded
e	dd�fded
e	dd�fded
e	dd�fded
e	dd�fgZ
RS(s?Tests when one double-dash option string is a prefix of anothers--badgerR�R�s--bas--bars--bs--b=2s	--badge 5RR�tbas--ba XR�s--ba=Xs--bads--badgs--badgeN(RRR�R4RfR�R8RRFR&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��stTestOptionalsSingleDoubleDashc
BseZdZeddd�ed�eddddd�gZdd	d
ddd
gZdededddd�fdede	dddd�fdededd
dd�fdede	dd
dd�fdede	dddd�fdede	dddd�fgZ
RS(s<Test an Optional with single- and double-dash option stringss-fR�R�s--bars-bazR�R�i*s-fbars-fbazs-bazfs-b BtBRR�tbartbazs--ba Bs
-f --bar Bs-f -bs-ba -fN(RRR�R4RfR�R8RRFR&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s	t!TestOptionalsAlternatePrefixCharsc
Bs:eZdZeddde�Zeddd�ed�eddd	d
d�gZdd
ddddddddddgZdededd dd �fdede
dd dd �fdededddd �fdede
dddd �fdede
dd dd�fdede
dd dd�fgZRS(!s9Test an Optional with option strings with custom prefixestprefix_charss+:/tadd_helps+fR�R�s::bars/bazR�R�i*s--bars-fbars-b BR�s-fs--bar Bs-bazs-hs--helps+hs::helps/helpRR�R�R�s::ba Bs
+f ::bar Bs+f /bs/ba +fN(RRR�R4RRbRfR�R8RFR&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s	*t*TestOptionalsAlternatePrefixCharsAddedHelpc
Bs+eZdZeddde�Zeddd�ed�eddd	d
d�gZdd
dddddgZdede	dddd�fdededddd�fdede	dddd�fdededddd�fdededddd�fdededddd�fgZRS(s�When ``-`` not in prefix_chars, default operators created for help
       should use the prefix_chars in use rather than - or --
       http://bugs.python.org/issue9444R�s+:/R�s+fR�R�s::bars/bazR�R�i*s--bars-fbars-b BR�s-fs--bar Bs-bazRR�R�R�s::ba Bs
+f ::bar Bs+f /bs/ba +fN(RRR�R4R&RbRfR�R8RRFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s	t2TestOptionalsAlternatePrefixCharsMultipleShortArgscBs�eZdZeddde�Zeddd�eddd�eddd�gZd	d
ddd
gZdededede�fdede	dede�fdede	de	de�fdede	de	de	�fgZ
RS(s@Verify that Optionals must be called with their defined prefixesR�s+-R�s-xR�R�s+ys+zs-ws-xyzs+xs-ys+xyzRR�tyR�s+y -xs+yz -x(RRR�R4RRbRfR�R8R&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s	tTestOptionalsShortLongcBs�eZdZedddddd�gZddd	d
gZdede�fdede�fdede�fdede�fdede�fgZ	RS(
s<Test a combination of single- and double-dash option stringss-vs	--verboses-ns--noisyR�R�s
--x --verboses-NR�s-v xRtverbose(
RRR�R4RfR�R8RR&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��stTestOptionalsDestc	Bs�eZdZed�eddd�gZdgZdedddd�fd	edddd
�fdedddd
�fdedddd�fgZRS(s*Tests various means of setting destinations	--foo-bars--bazR�tzabbazR�s--foo-bar ftfoo_barR�s--baz gtgs--foo-bar h --baz ithRns--baz j --foo-bar ktktjN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s	tTestOptionalsDefaultcBs�eZdZed�eddd�gZdgZdedddd�fd	edddd�fd
edddd�fgZRS(s*Tests specifying a default for an Optionals-xs-ytdefaulti*R�RR�R�s-xxs-yyN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s	tTestOptionalsNargsDefaultcBsSeZdZed�gZddgZdedd�fdedd�fgZRS(s7Tests not specifying the number of args for an Optionals-xR�RR�s-x aN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s
tTestOptionalsNargs1cBs\eZdZeddd�gZddgZdedd�fdeddg�fgZRS(	s&Tests specifying 1 arg for an Optionals-xtnargsiR�RR�s-x aN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�&s
tTestOptionalsNargs3cBsneZdZeddd�gZddddddgZd	ed
d�fded
ddd
g�fgZRS(s'Tests specifying 3 args for an Optionals-xR�iR�s-x as-x a bsa -xsa -x bRR�s-x a b ctbtcN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�1s
tTestOptionalsNargsOptionalcBs�eZdZeddd�eddddd�eddddd	�ed
dddedddd
�gZdgZdedddddd	dd�fdedddddd	dd�fdedddddd	dd�fdedddddd	dd�fdedddddd	dd�fdedddddddd�fdedddddddd�fd
edddddd	dd�fdedddddd	dd�fg	Z	RS(s0Tests specifying an Optional arg for an Optionals-wR�t?s-xR�i*s-yR�tspams-zR=t42t84t2RR,R�R�R�iTs-w 2s-x 2s-y 2s-z 2iN(
RRR�R4tintRfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�<s'	$$$$$$$$tTestOptionalsNargsZeroOrMorec
BseZdZeddd�eddddd�gZdgZded	dd
d�fded	gd
d�fded	dgd
d�fded	dd
gd
d�fded	dd
g�fded	dd
dg�fded	dd
dd
g�fgZRS(s?Tests specifying args for an Optional that accepts zero or mores-xR�t*s-yR�R�R�RR�R�s-x as-x a bR�s-y as-y a bN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�Ss	tTestOptionalsNargsOneOrMorecBs�eZdZeddd�eddddd�gZddddd	gZd
edddd�fd
eddgdd�fdedddgdd�fdeddddg�fdedddddg�fgZRS(s>Tests specifying args for an Optional that accepts one or mores-xR�t+s-yR�R�R�sa -xsa -y bRR�R�s-x as-x a bR�s-y as-y a bN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�fstTestOptionalsChoicescBs�eZdZeddd�eddeded��gZddd	d
dgZded
ddd�fded
ddd�fded
ddd�fded
ddd�fded
ddd�fded
ddd�fgZ
RS(s,Tests specifying the choices for an Optionals-ftchoicestabcs-gR=iR�s-f ds-fads-gas-g 6RR�R�s-f as-f cR�s-g 0is-g 03is-fb -g4R�iN(RRR�R4R�trangeRfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�ws!tTestOptionalsRequiredcBs_eZdZeddede�gZddgZdedd�fd	edd
�fgZ	RS(s)Tests an optional action that is requireds-xR=trequiredR�Rs-x 1R�is-x42i*(
RRR�R4R�R&RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
tTestOptionalsActionStorecBsYeZdZeddd�gZddgZdedd
�fdedd	�fgZRS(s&Tests the store action for an Optionals-xR�tstoreR�sa -xRR�s-xfooRiN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
tTestOptionalsActionStoreConstcBs\eZdZedddde�gZdgZdedd�fdede�fgZ	RS(	s,Tests the store_const action for an Optionals-yR�R�R�R�RR�N(
RRR�R4R�RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
	tTestOptionalsActionStoreFalsecBs\eZdZeddd�gZdddgZdede�fdede�fgZ	RS(	s,Tests the store_false action for an Optionals-zR�tstore_falseR�s-zas-z aRR�(
RRR�R4RfR�R8R&RR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
tTestOptionalsActionStoreTruecBs\eZdZeddd�gZdddgZdede�fdede�fgZ	RS(	s+Tests the store_true action for an Optionals--appleR�R�R�s	--apple=bs	--apple bRtapple(
RRR�R4RfR�R8RR&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
tTestOptionalsActionAppendcBszeZdZeddd�gZddddgZdedd�fd	eddg�fd
edddg�fgZRS(
s'Tests the append action for an Optionals--bazR�tappendR�sa --bazs	--baz a bRR�s--baz as--baz a --baz bR�N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��st$TestOptionalsActionAppendWithDefaultcBs�eZdZedddddg�gZddddgZd	ed
dg�fded
ddg�fded
ddd
g�fgZRS(s'Tests the append action for an Optionals--bazR�R�R�R�R�sa --bazs	--baz a bRR�s--baz as--baz a --baz bR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��stTestOptionalsActionAppendConstc	Bs�eZdZedddde�eddddd�gZd	dd
ddgZd
edd�fdedeg�fdedededg�fgZ	RS(s-Tests the append_const action for an Optionals-bR�tappend_constR�s-cR�R�R�R�sa -cs-bxs-b xRs-b -cx -b -cyzR�tyzN(
RRR�R4RIRfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��st)TestOptionalsActionAppendConstWithDefaultc
Bs�eZdZeddddeddg�edddd	d
�gZdddd
dgZded
dg�fded
deg�fded
dededg�fgZRS(s-Tests the append_const action for an Optionals-bR�R�R�R�R�s-cR�R�R�R�sa -cs-bxs-b xRs-b -cx -b -cyzR�R�(	RRR�R4RIRfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��stTestOptionalsActionCountcBs_eZdZeddd�gZddddgZded	d�fded	d
�fgZRS(s&Tests the count action for an Optionals-xR�tcountR�s-x as-x bs	-x a -x bRR�iN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
tTestPositionalsNargsNonecBsDeZdZed�gZdddgZdedd�fgZRS(s,Test a Positional that doesn't specify nargsRiRs-xsa bR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�stTestPositionalsNargs1cBsMeZdZeddd�gZdddgZdeddg�fgZRS(s.Test a Positional that specifies an nargs of 1RiR�iRs-xsa bR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�stTestPositionalsNargs2cBsSeZdZeddd�gZddddgZdeddd	g�fgZRS(
s.Test a Positional that specifies an nargs of 2RiR�iRR�s-xsa b csa bR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�stTestPositionalsNargsZeroOrMorecBsqeZdZeddd�gZdgZdedg�fdeddg�fdedddg�fgZRS(	s0Test a Positional that specifies unlimited nargsRiR�R�s-xRR�sa bR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�$s	t%TestPositionalsNargsZeroOrMoreDefaultcBsweZdZeddddd�gZdgZdedd�fdeddg�fd	eddd
g�fgZRS(s>Test a Positional that specifies unlimited nargs and a defaultRiR�R�R�R�s-xRR�sa bR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�0s	tTestPositionalsNargsOneOrMorecBsbeZdZeddd�gZddgZdeddg�fdedddg�fgZRS(	s2Test a Positional that specifies one or more nargsRiR�R�Rs-xR�sa bR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�<s
tTestPositionalsNargsOptionalcBsYeZdZeddd�gZddgZdedd�fdedd�fgZRS(	sTests an Optional PositionalRiR�R�s-xsa bRR�N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�Gs
t#TestPositionalsNargsOptionalDefaultcBs_eZdZeddddd�gZddgZdedd�fd	edd	�fgZRS(
s1Tests an Optional Positional with a default valueRiR�R�R�i*s-xsa bRR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�Rs
t,TestPositionalsNargsOptionalConvertedDefaultcBsheZdZeddddedd�gZddd	gZd
edd�fdedd
�fgZRS(snTests an Optional Positional with a default value
    that needs to be converted to the appropriate type.
    RiR�R�R=R�R�s-xsa bs1 2Ri*t1i(	RRR�R4R�RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�]s
!tTestPositionalsNargsNoneNonecBsVeZdZed�ed�gZddddgZdedddd�fgZRS(	s-Test two Positionals that don't specify nargsRiR�Rs-xR�sa b csa bR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�lstTestPositionalsNargsNone1cBs_eZdZed�eddd�gZddddgZd	edddd
g�fgZRS(s6Test a Positional with no nargs followed by one with 1RiR�R�iRs--fooR�sa b csa bR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�vstTestPositionalsNargs2NonecBseeZdZeddd�ed�gZddddd	gZd
edddgdd�fgZRS(
s8Test a Positional with 2 nargs followed by one with noneRiR�iR�Rs--fooR�sa bsa b c dsa b cR�R�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��st"TestPositionalsNargsNoneZeroOrMorec	Bs�eZdZed�eddd�gZddgZdedddg�fdedddd	g�fd
edddd	dg�fgZRS(s>Test a Positional with no nargs followed by one with unlimitedRiR�R�R�Rs--fooR�sa bR�sa b cR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��st!TestPositionalsNargsNoneOneOrMorecBszeZdZed�eddd�gZdddgZdedddd	g�fd
edddd	dg�fgZRS(s@Test a Positional with no nargs followed by one with one or moreRiR�R�R�Rs--fooR�sa bR�sa b cR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
t TestPositionalsNargsNoneOptionalcBsqeZdZed�eddd�gZdddgZdedddd�fd	edddd
�fgZRS(s@Test a Positional with no nargs followed by one with an OptionalRiR�R�R�Rs--foosa b cR�sa bR�N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
t"TestPositionalsNargsZeroOrMoreNonecBs�eZdZeddd�ed�gZddgZdedgdd�fdeddgdd	�fd
eddd	gdd�fgZRS(s@Test a Positional with unlimited nargs followed by one with noneRiR�R�R�Rs--fooR�sa bR�sa b cR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��st!TestPositionalsNargsOneOrMoreNonecBszeZdZeddd�ed�gZdddgZdeddgdd	�fd
eddd	gdd�fgZRS(sBTest a Positional with one or more nargs followed by one with noneRiR�R�R�Rs--fooR�sa bR�sa b cR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
t TestPositionalsNargsOptionalNonecBsweZdZeddddd�ed�gZddd	gZd
edddd
�fdedd
dd�fgZRS(
sBTest a Positional with an Optional nargs followed by one with noneRiR�R�R�i*R�Rs--foosa b cR�sa bR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
$tTestPositionalsNargs2ZeroOrMorecBs�eZdZeddd�eddd�gZdddgZd	eddd
gdg�fdeddd
gddg�fgZRS(
s=Test a Positional with 2 nargs followed by one with unlimitedRiR�iR�R�Rs--fooR�sa bR�sa b cR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s
$tTestPositionalsNargs2OneOrMorecBskeZdZeddd�eddd�gZdddd	gZd
edddgddg�fgZRS(
s?Test a Positional with 2 nargs followed by one with one or moreRiR�iR�R�Rs--fooR�sa bsa b cR�R�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s$tTestPositionalsNargs2OptionalcBs�eZdZeddd�eddd�gZdddd	gZd
edddgdd�fdedddgdd
�fgZRS(s7Test a Positional with 2 nargs followed by one optionalRiR�iR�R�Rs--fooR�sa b c dsa bR�sa b cR�N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s
$tTestPositionalsNargsZeroOrMore1cBs�eZdZeddd�eddd�gZddgZdedgddg�fd	eddgdd
g�fdeddd
gddg�fgZRS(
s=Test a Positional with unlimited nargs followed by one with 1RiR�R�R�iRs--fooR�sa bR�sa b cR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s$tTestPositionalsNargsOneOrMore1cBs�eZdZeddd�eddd�gZdddgZd	eddgdd
g�fdeddd
gddg�fgZRS(
s?Test a Positional with one or more nargs followed by one with 1RiR�R�R�iRs--fooR�sa bR�sa b cR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s
$tTestPositionalsNargsOptional1cBs}eZdZeddd�eddd�gZdddgZd	edddd	g�fd
edd	ddg�fgZRS(
s?Test a Positional with an Optional nargs followed by one with 1RiR�R�R�iRs--foosa b cR�sa bR�N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRs
$t#TestPositionalsNargsNoneZeroOrMore1c	Bs�eZdZed�eddd�eddd�gZddd	gZd
edd	dgddg�fdedd	ddgdd
g�fgZRS(s=Test three Positionals: no nargs, unlimited nargs and 1 nargsRiR�R�R�R�iRs--fooR�sa bR�sa b cR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRs	!t"TestPositionalsNargsNoneOneOrMore1c	Bs�eZdZed�eddd�eddd�gZddd	d
gZdedd	dd
gddg�fd
edd	dd
dgddg�fgZRS(s?Test three Positionals: no nargs, one or more nargs and 1 nargsRiR�R�R�R�iRs--fooR�R�sa b cR�sa b c dtd(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRs	$t!TestPositionalsNargsNoneOptional1c	Bs�eZdZed�eddddd�eddd�gZd	d
dgZdedddddd
g�fdedddd
ddg�fgZRS(s;Test three Positionals: no nargs, optional narg and 1 nargsRiR�R�R�R�g�?R�iRs--fooR�sa bR�sa b cR�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR	.s	!t$TestPositionalsNargsOptionalOptionalcBs�eZdZeddd�eddddd�gZddgZd	edd
dd�fd
edd
dd�fdedd
dd�fgZRS(sTest two optional nargsRiR�R�R�R�i*s--foosa b cRR�sa bR�N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR
=st&TestPositionalsNargsOptionalZeroOrMorec
Bs�eZdZeddd�eddd�gZdgZdedd
dg�fdedddg�fd	edddd
g�fdedddd
dg�fgZRS(s1Test an Optional narg followed by unlimited nargsRiR�R�R�R�s--fooRR�sa bR�sa b cR�N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRLs$	t%TestPositionalsNargsOptionalOneOrMorec	Bs�eZdZeddd�eddd�gZddgZdedd
ddg�fd	edddd
g�fdedddd
dg�fgZRS(s3Test an Optional narg followed by one or more nargsRiR�R�R�R�Rs--fooR�sa bR�sa b cR�N(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRYs$tTestPositionalsChoicesStringcBsheZdZedded��gZdddddgZd	edd	�fd
edd
�fgZRS(s&Test a set of single-character choicesR�R�tabcdefgRs--fooR�R�tefR�R�(	RRR�R4tsetRfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR
es
tTestPositionalsChoicesIntcBsneZdZeddeded��gZddddd	gZd
edd�fdedd
�fgZ	RS(sTest a set of integer choicesR�R=R�iRs--fooR�R�Rt4it15i(
RRR�R4R�R�RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRps
!tTestPositionalsActionAppendcBsqeZdZeddd�eddddd�gZdddd	d
gZdedddd
gg�fgZRS(sTest the 'append' actionR�R�R�R�iRs--fooR�sa bsa b c dsa b cR�R�(RRR�R4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR{s
t"TestOptionalsNumericAndPositionalsc	Bs�eZdZeddd�eddddd�gZd	d
gZdeddde�fdeddde�fdeddde	�fd
eddde	�fgZ
RS(s;Tests negative number args when numeric options are presentR�R�R�s-4R�R�R�R�s-2s-315RR�s-4 aN(RRR�R4RfR�R8RFRR&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�st(TestOptionalsAlmostNumericAndPositionalsc
Bs�eZdZeddd�eddddd�gZd	gZd
eddde�fdeddde�fdeddde�fdeddde	�fd
eddde	�fgZ
RS(sBTests negative number args when almost numeric options are presentR�R�R�s-k4R�R�R�R�s-k3Rs-2R�s-k4 aN(RRR�R4RfR�R8RFRR&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s	t$TestEmptyAndSpaceContainingArgumentsc
BseZeddd�edddd�gZdgZdgedddd�fdgedddd�fd	gedd	dd�fddgedddd�fddgedddd�fdd	gedddd	�fd
gedddd�fdgedddd	�fgZRS(
R�R�R�s-ys--yyyR�R�Rsa badgers	-a badgers--yyy=a badgers--yyy=-a badgerN(RRR4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s	t TestPrefixCharacterOnlyArgumentsc
Bs.eZedd�Zeddddddd�ed	dd
dedd
�eddddd�gZddgZdeddd
d
de	�fdeddd
d
de	�fdeddd
d
de	�fdeddd
dde	�fdeddd
d
de
�fdeddd
d
de	�fgZRS(R�s-+t-R�R�R�R�R�R�R�R�R=R�i*s-+-R�R�R�s-ys+ -Rs- XR�s+ -3i����s- ===s===N(RRR4RbR�RfR�R8RFRR&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�stTestNargsZeroOrMorecBs�eZdZeddd�eddd�gZgZdedd
dg�fdedgdg�fdeddgdg�fd	eddgdd
g�fdedd
ddg�fdedgddg�fdedd
gddg�fgZRS(s?Tests specifying args for an Optional that accepts zero or mores-xR�R�R�RR�s-x aR�s	-x a -- bR�sa -xsa -x bN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s$tTestNargsRemaindercBs�eZdZed�eddd�ed�gZdddgZdedddgd	d�fd
edddgd	d�fdedddd
dddgd	d�fdedddddgd	d�fgZRS(s2Tests specifying a positional with nargs=REMAINDERR�R�R�s...s-zRs-z ZR�R�s-z Z XtZs
X A B -z ZtAR�s	X Y --footYs--fooN(	RRR�R4RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s'*tTestOptionLikecBs�eZdZedde�eddedd�eddd�gZdd	d
ddd
dddddddg
Zdedd%dd%dg�fdedddd%dg�fdedddd%ddg�fdedd%dddg�fdedd%dddg�fdedd%dddg�fd edd%ddddg�fdedd%dd%ddg�fd!edd"dd%ddg�fd#edd"dd%ddg�fd$edd%dd"ddg�fgZ	RS(&s.Tests options that may or may not be argumentss-xR=s-3R�R�R�R�R�s-y2.5s-xas-x -as-x -3s-x -3.5s-3 -3.5s-x -2.5s	-x -2.5 as-3 -.5sa x -1s-x -1 as-3 -1 aRR�s-x 2.5g@s-x 2.5 aR�s-3.5g�?s-3-.5g�s-3 .5sa -3.5sa -x 1g�?s-x 1 as-3 1 aN(
RRR�R4tfloatRfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s&		!!!!!tTestDefaultSuppressc
Bs�eZdZeddddej�eddddej�eddd	dej�gZd
gZde�fdedd�fd
eddddg�fdede	�fdeddde	�fdeddddgde	�fgZ
RS(s%Test actions with suppressed defaultsRiR�R�R�R�R�s--bazR�R�s-xRR�sa bR�R�sa --bazs	--baz a b(RRR�R4targparsetSUPPRESSRfR�R8R&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR!
s	tTestParserDefaultSuppressc
Bs�eZdZedej�Zeddd�eddd�eddd	�gZd
gZde	�fde	dd�fd
e	ddddg�fde	de
�fde	ddde
�fde	ddddgde
�fgZRS(s4Test actions with a parser-level default of SUPPRESStargument_defaultRiR�R�R�R�s--bazR�R�s-xRR�sa bR�R�sa --bazs	--baz a b(RRR�R4R"R#RbRfR�R8R&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR$s	tTestParserDefault42c
BseZdZedddd�Zeddd�eddd	�ed
dd�gZd
gZdedddddd�fdedddddd�fdeddddgdd�fd
eddddde�fdeddddde�fdeddddgde�fgZ	RS(s.Test actions with a parser-level default of 42R%i*tversions1.0RiR�R�R�R�s--bazR�R�s-xRR�R�sa bR�sa --bazs	--baz a b(
RRR�R4RbRfR�R8R&R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR&1s	!tTestArgumentsFromFilecBsdeZdZd�Zedd�Zed�ed�eddd�gZd	d
ddd
gZdeddddddg�fdedddddddg�fdeddddddg�fdeddddddg�fdedddddddg�fdedddddddg�fdd	ddgedd	ddddg�fgZ
RS(s"Test reading arguments from a filecCsctt|�j�dd	d
g}x:|D]2\}}t|d�}|j|�|j�q)WdS(Nthellos
hello world!
t	recursives-a
A
@hellotinvalids@no-such-path
R,(R)s
hello world!
(R*s-a
A
@hello(R+s@no-such-path
(RR(RR-R.tclose(R
t
file_textsR ttextR2((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRHs	
tfromfile_prefix_charst@s-aR�R�R�R�Rs-bR�s@invalids@missingsX YR�Rs
X -a A Y ZRRs@hello Xshello world!sX @hellos-a B @recursive Y ZsX @recursive Z -a BR�N(RRR�RR4RbRfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR(Es			!$!!$$tTestArgumentsFromFileConvertercBs~eZdZd�Zdefd��YZeZedd�Zeddd�gZ	gZ
d	edd
ddg�fgZRS(
s"Test reading arguments from a filecCs]tt|�j�dg}x:|D]2\}}t|d�}|j|�|j�q#WdS(NR)s
hello world!
R,(R)s
hello world!
(RR1RR-R.R,(R
R-R R.R2((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRks	
tFromFileConverterArgumentParsercBseZd�ZRS(ccs2x+|j�D]}|j�s%q
n|Vq
WdS(N(R�tstrip(R
targ_linetarg((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytconvert_arg_line_to_argsws(RRR6(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR2usR/R0R�R�R�s@hello XR)sworld!R�(
RRR�RR]R2RcR4RbRfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR1hs	
tTestFileTypeReprcBseZd�Zd�ZRS(cCs)tjd�}|jdt|��dS(Ntrs
FileType('r')(R"tFileTypeR	R(R
R=((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_r�scCs,tjdd�}|jdt|��dS(NtwbisFileType('wb', 1)(R"R9R	R(R
R=((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt	test_wb_1�s(RRR:R<(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7�s	tRFilecBs&eZiZd�ZdZd�ZRS(cCs
||_dS(N(R*(R
R*((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7�scCs||jkr|j|}n!|j�}|j|<|j�t|t�sa|jd�}n|j|jko||kSS(Ntascii(tseentreadR,ROR�tdecodeR*(R
RCR.((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRD�s
N(RRR?R7RFRGRD(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR=�s	t
TestFileTypeRcBseZdZd�Zeddej��eddejd��gZdddgZde	d	dded��fd
e	d	ed�ded��fde	d	ed�ded��fd
e	d	ej
dej
�fde	d	dded��fgZRS(s8Test the FileType option/argument type for reading filescCsstt|�j�xLddgD]>}ttjj|j|�d�}|j|�|j	�q W|j
d�dS(NRiR�R,treadonly(RRBRR-RR R!RR.R,R3(R
t	file_nameR2((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s!
s-xR=R�R8s-x barsnon-existent-file.txtRiR�s
-x foo barR�s
bar -x foos-x - -RCN(RRR�RR4R"R9RfR�R8RFR=RPtstdinR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRB�s		$$tTestFileTypeDefaultscBsbeZdZd�Zeddejd�dd�gZdgZde	d	e
d
��fgZRS(s<Test that a file is not created unless the default is neededcCsOtt|�j�ttjj|jd�d�}|jd�|j	�dS(NtgoodR,(
RRFRR-RR R!RR.R,(R
R2((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s!
s-cR=R8R�sno-file.txtRs-c goodR�RG(RRR�RR4R"R9RfR�R8R=R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRF�s
	$	tTestFileTypeRBc	Bs�eZdZd�Zeddejd��eddejd��gZddgZde	dd
ded��fd	e	ded�ded
��fde	ded�ded
��fde	dej
dej
�fgZRS(s8Test the FileType option/argument type for reading filescCsftt|�j�xLddgD]>}ttjj|j|�d�}|j|�|j	�q WdS(NRiR�R,(
RRHRR-RR R!RR.R,(R
RDR2((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s
!
s-xR=trbR�s-x barRiR�s
-x foo barR�s
bar -x foos-x - -N(RRR�RR4R"R9RfR�R8RFR=RPRER�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRH�s	$$tWFilecBs)eZe�Zd�ZdZd�ZRS(cCs
||_dS(N(R*(R
R*((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7�scCsp||jkr`d}d|jkr6|jd�}n|j|�|j�|jj|�n|j|jkS(NsCheck that file is writable.R�R>(R?tmodetencodeR.R,taddR*(R
RCR.((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRD�s

N(RRRR?R7RFRGRD(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRJ�s		tgeteuidisnon-root user requiredt
TestFileTypeWc	Bs�eZdZd�Zeddejd��eddejd��gZddgZdddgZde	d	dded��fd
e	d	ed�ded��fde	d	ed�ded��fd
e	d	ej
dej
�fgZRS(s8Test the FileType option/argument type for writing filescCs$tt|�j�|jd�dS(NRC(RRORR3(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRss-xR=R,R�s-x barRCRiR�s
-x foo barR�s
bar -x foos-x - -N(RRR�RR4R"R9RfR�R8RFRJRPRKR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRO�s	$$tTestFileTypeWBc	Bs�eZeddejd��eddejd��gZddgZdeddde	d��fdede	d�de	d��fd	ede	d�de	d��fd
ede
jde
j�fgZRS(s-xR=R;R�s-x barRiR�s
-x foo barR�s
bar -x foos-x - -N(
RRR4R"R9RfR�R8RFRJRPRKR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRPs$$tTestTypeCallablecBs�eZdZedde�edde�gZddddgZded	d
dd�fded	d
dd�fded	ddd�fgZ
RS(s,Test some callables as option/argument typess--eggsR=R�R�t42js--eggs as	--eggs 2is--eggs=42 42teggsi*gE@s--eggs 2j -- -1.5y@g��s1024.675g3333��@N(RRR�R4tcomplexR RfR�R8RFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRQ"stTestTypeUserDefinedcBs�eZdZdefd��YZedde�edde�gZgZdeded�ded	��fd
eded�ded��fgZ	RS(
s(Test a user-defined option/argument typetMyTypecBs eZd�ZdZd�ZRS(cCs
||_dS(N(tvalue(R
RW((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR76scCs(t|�|jft|�|jfkS(N(R=RW(R
RC((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRD;sN(RRR7RFRGRD(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRV4s	s-xR=R�sa -x bR�R�R�s-xf gR�R�(
RRR�RRVR4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRU1s$tTestTypeClassicClasscBs�eZdZdd
d��YZedde�edde�gZgZdeded�ded	��fd
eded�ded��fgZRS(sTest a classic class typetCcBs eZd�ZdZd�ZRS(cCs
||_dS(N(RW(R
RW((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7NscCs(t|�|jft|�|jfkS(N(R=RW(R
RC((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRDSsN(RRR7RFRGRD(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRYLs	s-xR=R�sa -x bR�R�R�s-xf gR�R�((	RRR�RYR4RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRXIs$tTestTypeRegistrationcBseZdZd�ZRS(s*Test a user-defined type by registering itcCs�d�}tj�}|jdd|�|jddd�|jddd�|j|jdj��tdddd��|j|jd	j��tdddd
��dS(NcSsd|S(Nsmy_type{%s}((tstring((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytget_my_typefsR=tmy_types-xR�R�R�s
my_type{1}s-x 1 42smy_type{42}(	R"tArgumentParsertregisterRdR	RWR�R8RF(R
R\Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttestds	(RRR�R`(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRZastTestActionUserDefinedcBs�eZdZdejfd��YZdejfd��YZedddded	ed
d�edded	e	d
dd
d�gZ
gZdedddd�fdedddd�fdedddd�fdedddd�fgZ
RS(s*Test a user-defined option/argument actiontOptionalActioncBseZdd�ZRS(cCs�yStdd�}|dkr*d|_n(|dkrBd|_ntd|��Wn1tk
r�tj�d	}td
|��nXt|d|�dS(
NR�g�?g�?g�?ig@iTs	value: %sisopt_action failed: %s(g�?g�?(g@(R8R�tAssertionErrorRPRTRHRS(R
Ret	namespaceRWt
option_stringR�te((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt__call__}s
N(RRRFRg(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRb{stPositionalActioncBseZdd�ZRS(cCs�yktdd�}|dkr*d|_n@|dkrBd|_n(|d
krZd|_ntd	|��Wn1tk
r�tj�d}td
|��nXt|d|�dS(NR�ii*iTg�?ig�?g�?s	value: %ssarg_action failed: %s(i*iT(i(i(R8R�RcRPRTRHRS(R
ReRdRWReR�Rf((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRg�s
N(RRRFRg(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRh�ss-sR�R�R�R=R�g�?R�R�R�is-s0.125g�?R�i*s
-s 0.625 1g�?is84 -s2g@iT(RRR�R"tActionRbRhR4R R�RfR�R8R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRaxstTestActionRegistrationcBs0eZdZdejfd��YZd�ZRS(s5Test a user-defined action supplied by registering ittMyActioncBseZdd�ZRS(cCst||jd|�dS(Nsfoo[%s](RSR�(R
ReRdtvaluesRe((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRg�sN(RRRFRg(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRk�scCs�tj�}|jdd|j�|jddd�|j|jdg�tdd��|j|jdg�tdd��dS(NR�t	my_actionR�R�sfoo[1]R�sfoo[42](R"R^R_RkRdR	RWR8(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR`�s
%(RRR�R"RiRkR`(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRj�stTestAddSubparserscBs�eZdZd�Zedd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�ZRS(sTest the add_subparsers methodcOs|jt||�dS(N(R�RH(R
R5R6((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytassertArgumentParserError�scCs�|rItddddd|�}|j|dddd	d
dd�n.tdddd�}|jd
d	d
dd�|jddtdd�|jdd�}|j|j�tdd�}|r�d|d<n|jd|�}|jddtdd�|jddddd�tdd�}|r:d|d<n|jd|�}|jddddd �|jd!dtd"d#dd$�tdd%�}	|r�d&|	d<n|jd'|	�}
|
jd(dtdd)�|
jd*d"d+dd,�|S(-NtprogtPROGtdescriptionsmain descriptionR�iiRiR�R�thelpsfoo helps--fooR�R=sbar helpscommand helps
1 descriptions1 helpR�s-wsw helpR�R�R�sx helps
2 descriptions2 helpR�s-yt123sy helpR�R�R�sz helps
3 descriptions3 helpt3ttst helptus...su help(	R]RdR tadd_subparsersRotdictt
add_parserR�RT(R
tsubparser_helpR�Ret
subparserstparser1_kwargstparser1tparser2_kwargstparser2tparser3_kwargstparser3((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s@"


cCs;tt|�j�|j�|_|jdt�|_dS(NR{(RRnRR�ReR&tcommand_help_parser(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRscCsLxEdddddddgD](}|j�}|j|jj|�qWdS(NRR�sa as0.5 as0.5 1s0.5 1 -ys0.5 2 -w(R�RoReRW(R
R�R5((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_parse_args_failures
scCs
|j|jjdj��tdtdddddd��|j|jjd	j��tdtdd
ddd
ddg��|j|jjdj��tdtdddddd��|j|jjdj��tdtddddddddddg��dS(Ns0.5 1 b -w 7RiR�g�?R,iR�R�s0.25 --foo 2 -y 2 3j -- -1jg�?R�R�R�y@y�s--foo 0.125 1 cg�?R�s-1.5 3 11 -- a --foo 7 -- bg��RviRwR�s--foot7s--(R	ReRWR�R8RR&RF(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_parse_argss"("cCsk|j|jjdj��tdtdddddd�gf�|j|jjd	j��tdtdddddd�d
gf�|j|jjdj��tdtdddddd�d
gf�|j|jjdj��tdtdddddd�d
dgf�|j|jjdj��tdtdddddd�ddddgf�dS(Ns0.5 1 b -w 7RiR�g�?R,iR�R�s0.5 -p 1 b -w 7s-ps0.5 1 b -w 7 -ps0.5 1 b -q -rs -w 7s-qs-rss0.5 -W 1 b -X Y -w 7 Zs-Ws-XRR(R	Retparse_known_argsR�R8R(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_parse_known_args$s(++.cCs�t�}|jddd�|jdd�}|jd�}|jd�|jtdtdddd	�|jd
j���dS(Ns--fooR�R�R�R�R�R�RiR�s1 2(	R]RdRxRzR	R8RRWR�(R
ReR|R~((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt	test_dest:s	
cCs?|j|jj�d�|j|jj�tjd��dS(Ns)usage: PROG [-h] [--foo] bar {1,2,3} ...
sJ            usage: PROG [-h] [--foo] bar {1,2,3} ...

            main description

            positional arguments:
              bar         bar help
              {1,2,3}     command help

            optional arguments:
              -h, --help  show this help message and exit
              --foo       foo help
            (R	Retformat_usagetformat_helpttextwraptdedent(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt	test_helpCscCsK|jdd�}|j|j�d�|j|j�tjd��dS(NR�s+:-s)usage: PROG [-h] [++foo] bar {1,2,3} ...
sJ            usage: PROG [-h] [++foo] bar {1,2,3} ...

            main description

            positional arguments:
              bar         bar help
              {1,2,3}     command help

            optional arguments:
              -h, --help  show this help message and exit
              ++foo       foo help
            (R�R	R�R�R�R�(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_help_extra_prefix_charsTs
cCsK|jdd�}|j|j�d�|j|j�tjd��dS(NR�s+:/s)usage: PROG [+h] [++foo] bar {1,2,3} ...
sJ            usage: PROG [+h] [++foo] bar {1,2,3} ...

            main description

            positional arguments:
              bar         bar help
              {1,2,3}     command help

            optional arguments:
              +h, ++help  show this help message and exit
              ++foo       foo help
            (R�R	R�R�R�R�(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt test_help_alternate_prefix_charshs
cCs?|j|jj�d�|j|jj�tjd��dS(Ns)usage: PROG [-h] [--foo] bar {1,2,3} ...
s�            usage: PROG [-h] [--foo] bar {1,2,3} ...

            main description

            positional arguments:
              bar         bar help
              {1,2,3}     command help
                1         1 help
                2         2 help
                3         3 help

            optional arguments:
              -h, --help  show this help message and exit
              --foo       foo help
            (R	R�R�R�R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_parser_command_helpzs
cCs�tdddd�}|jddddd	�|jd
dd�|jdd
dddd�}|jd�}|jd�}|j|j�d�|j|j�tjd��dS(NRpRqRrsmain descriptions--fooR�R�Rssfoo helpR�sbar helpttitletsubcommandsscommand helpsadditional textR�R�s'usage: PROG [-h] [--foo] bar {1,2} ...
s�            usage: PROG [-h] [--foo] bar {1,2} ...

            main description

            positional arguments:
              bar         bar help

            optional arguments:
              -h, --help  show this help message and exit
              --foo       foo help

            subcommands:
              command help

              {1,2}       additional text
            (	R]RdRxRzR	R�R�R�R�(R
ReR|R~R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_subparser_title_help�s		cCs�y|jj|j��Wn_tk
r{tj�d}|j|kret|�GHt|j�GHn|j|j|�nXdS(Ni(	ReRWR�RHRPRTRKRR	(R
R�t
expected_helpterr((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt_test_subparser_help�s
cCs|jdtjd��dS(Ns5.0 1 -hs            usage: PROG bar 1 [-h] [-w W] {a,b,c}

            1 description

            positional arguments:
              {a,b,c}     x help

            optional arguments:
              -h, --help  show this help message and exit
              -w W        w help
            (R�R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_subparser1_help�scCs|jdtjd��dS(Ns5.0 2 -hs#            usage: PROG bar 2 [-h] [-y {1,2,3}] [z [z ...]]

            2 description

            positional arguments:
              z           z help

            optional arguments:
              -h, --help  show this help message and exit
              -y {1,2,3}  y help
            (R�R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_subparser2_help�sN(RRR�RoRRFR�RR�R�R�R�R�R�R�R�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRn�s 	.												
	tTestPositionalsGroupscBs)eZdZd�Zd�Zd�ZRS(s@Tests that order of group positionals matches construction ordercCs�t�}|jd�|jd�}|jd�|jd�tdddddd�}|jdj��}|j||�dS(	NRiR�R�R�R�R�Rus1 2 3(R]RdRjR8RWR�R	(R
ReRktexpectedRZ((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nongroup_first�s	


cCs�t�}|jd�}|jd�|jd�|jd�tdddddd�}|jdj��}|j||�dS(	NtxxxRiR�R�R�R�Rus1 2 3(R]RjRdR8RWR�R	(R
ReRkR�RZ((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_group_first�s	


c	Cs�t�}|jd�}|jd�|jd�|jd�|jd�}|jd�tdddddd	dd
�}|jdj��}|j||�dS(NR�RiR�R�R�tfrellR�R�RuRs1 2 3 4(R]RjRdR8RWR�R	(R
ReRkR�RZ((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_interleaved_groups�s	



!(RRR�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s	
	
tTestParentParserscBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZRS(s5Tests that parsers can be created with parent parserscOs|jt||�dS(N(R�RH(R
R5R6((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRoscCs`tt|�j�tdt�|_|jjd�|jjd�}|jd�|jjd�tdt�|_|jjd�|jjd�|jjd�}|jd	�tdt�|_	|j	jd�tdt�|_
|j
jd�tdt�|_|jj�}|jd
dd�|jddd�t
jjtjd
�|_dS(NR�s--wR�s-yR�R�s-bR�s--ds-aR�R�i(RR�RR]Rtwxyz_parentRdRjtabcd_parenttw_parenttz_parenttab_mutex_parenttadd_mutually_exclusive_groupRR tbasenameRPRqtmain_program(R
tx_grouptc_groupRk((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRs(

c	CsMtd|jg�}|j|jdj��tdddddd��dS(	Ntparentss-y 1 2 --w 3R,RuR�R�R�R�(R]R�R	RWR�R8(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_single_parent scCs<|j|jj�td|jg�}|j|j�dS(NR�(t_test_mutex_abR�RWR](R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_single_parent_mutex%scCsG|jg}tdtd|�}td|g�}|j|j�dS(NR�R�(R�R]RR�RW(R
R�Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_single_granparent_mutex*scCs�|j|g�tdtdt��|j|dg�tdtdt��|j|dg�tdtdt��|j|ddg�|j|ddg�|j|dg�|j|ddg�|j|ddg�dS(NR�R�s-as-bs-c(R	R8RR&Ro(R
RW((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�0s%((cCsk|j|jg}td|�}|j|jdj��tdddddddd	d
ddd��dS(
NR�s--d 1 --w 2 3 4R�RuR�RR�R,R�R�R�R(R�R�R]R	RWR�R8RF(R
R�Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_multiple_parents:sc
Cs�|j|jg}td|�}|j|jdj��tdtdtdddddd	��|j
|jd
j��|j
|jdj��dS(NR�s
-a --w 2 3R�R�R,R�R�R�Rus
-a --w 2 3 -bs
-a -b --w 2 3(R�R�R]R	RWR�R8R&RRFRo(R
R�Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_multiple_parents_mutex@s(cCs,|jtjtjd|j|jg�dS(NR�(R�R"t
ArgumentErrorR^R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_conflicting_parentsJs	cCs,|jtjtjd|j|jg�dS(NR�(R�R"R�R^R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_conflicting_parents_mutexPs	c	CsY|j|jg}td|�}|j|jdj��tdddddd��dS(NR�s1 2R,R�R�R�(R�R�R]R	RWR�R8RF(R
R�Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_same_argument_name_parentsVscCs{t�}|j�}|jdd|jg�}|jd�|j|jdj��tddddd	d
dd��dS(NR�R�Rfsbar -b 1 --d 2 3 4R�RuR�R�RR�R(	R]RxRzR�RdR	RWR�R8(R
ReR|tabcde_parser((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_subparser_parents\s	
cCs6t�}|j�}|jg}|jdd|�}|jd�}|jd�|j|jg}|jdd|�}|jd�|j|jdj	��t
dtd	tdd
��|j|jdj	��t
dtd	tdd
dddddd
��|j|jdj	��|j|jdj	��dS(NRiR�R�R�R�Rfsfoo -a 4R�R�Rsbar -b  --w 2 3 4R,R�R�R�Rusfoo -a -b 4sbar -b -a 4(R]RxR�RzRjRdR�R	RWR�R8R&RRFRo(R
ReR|R�t
abc_parserR�twxyzabe_parser((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_subparser_parents_mutexds"	

.cCsk|j|jg}td|�}|j�}|j}|j|tjdj||rZdnd���dS(NR�sR            usage: {}{}[-h] [-b B] [--d D] [--w W] [-y Y] a z

            positional arguments:
              a
              z

            optional arguments:
              -h, --help  show this help message and exit
              -b B
              --w W

            c:
              --d D

            x:
              -y Y
        t R(	R�R�R]R�R�R	R�R�tformat(R
R�Retparser_helptprogname((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_parent_helpws	cCs�tdt�}|jdddd�}|jd�|jd�|j�}|jd�|jd	�td
|g�}|jt|jddd	dg�|j�}|j	}|j
|tjd
j
||r�dnd���dS(NR�R�R�Rrtgds-ws-xs-ys-zR�RRs	            usage: {}{}[-h] [-w W] [-x X] [-y Y | -z Z]

            optional arguments:
              -h, --help  show this help message and exit
              -y Y
              -z Z

            g:
              gd

              -w W
              -x X
        R�R(R]RRjRdR�R�RHRWR�R�R	R�R�R�(R
tparentR�tmReR�R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_groups_parents�s



	
(RRR�RoRR�R�R�R�R�R�R�R�R�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s 						
		
						t TestMutuallyExclusiveGroupErrorscBs#eZd�Zd�Zd�ZRS(cCs,t�}|j}|t|jdd�dS(NR�Ri(R]R�R|R�(R
ReR�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_invalid_add_argument_group�s		cCs�t�}|j�}|j}|j}|t|ddt�|t|d�|t|ddd�|t|ddd�|t|ddtj�dS(Ns--fooR�R�R�R�i(R]R�RdR�t
ValueErrorR&R"tPARSER(R
ReRkRdR�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_invalid_add_argument�s			cCs�tdd�}|j�}|jddd�|jddd�|j�}|jddd�|jd	dd�d
}|j|j�tj|��dS(NRpRqs--fooR�R�s--barR�s--soups--nutss�            usage: PROG [-h] [--foo | --bar] [--soup | --nuts]

            optional arguments:
              -h, --help  show this help message and exit
              --foo
              --bar
              --soup
              --nuts
              (R]R�RdR	R�R�R�(R
Retgroup1tgroup2R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s
(RRR�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s		tMEMixincBsPeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(cCsL|jdt�j}t}x*|jD]}|j|||j��q%WdS(NR�(t
get_parserRRWRHR�R�R�(R
RWR_targs_string((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_failures_when_not_required�scCsS|jdt�j}t}x1|jdgD]}|j|||j��q,WdS(NR�R(R�R&RWRHR�R�R�(R
RWR_R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_failures_when_required�scCsb|jdt�j}|j|j}x6|D].\}}||j��}|j||�q,WdS(NR�(R�RRWR�tsuccesses_when_not_requiredR�R	(R
RWR�R�R�t	actual_ns((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt test_successes_when_not_required�s
cCsU|jdt�j}x9|jD].\}}||j��}|j||�qWdS(NR�(R�R&RWR�R�R	(R
RWR�R�R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_successes_when_required�scCs>|jdt�j}|j}|j|�tj|��dS(NR�(R�RR�tusage_when_not_requiredR	R�R�(R
R�texpected_usage((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_usage_when_not_required�s	cCs>|jdt�j}|j}|j|�tj|��dS(NR�(R�R&R�tusage_when_requiredR	R�R�(R
R�R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_usage_when_required�s	cCsE|jdt�j}|j|j}|j|�tj|��dS(NR�(R�RR�R�RsR	R�R�(R
R�Rs((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_help_when_not_required�scCsE|jdt�j}|j|j}|j|�tj|��dS(NR�(R�R&R�R�RsR	R�R�(R
R�Rs((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_help_when_required	s(
RRR�R�R�R�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s							tTestMutuallyExclusiveSimplec	Bs�eZdd�ZddgZdedddd�fdedddd�fd	edddd
�fdedddd�fgZdedddd�fgZd
ZdZ	dZ
RS(cCsWtdd�}|jd|�}|jddd�|jddd	d
ddd�|S(
NRpRqR�s--barRssbar helps--bazR�R�R�Rsbaz help(R]R�Rd(R
R�ReRk((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�		s
s--bar X --baz Ys
--bar X --bazs--bar XR�R�R�s--bar X --bar ZRs--baz YRs--bazRs;        usage: PROG [-h] [--bar BAR | --baz [BAZ]]
        s;        usage: PROG [-h] (--bar BAR | --baz [BAZ])
        s�
        optional arguments:
          -h, --help   show this help message and exit
          --bar BAR    bar help
          --baz [BAZ]  baz help
        N(RRRFR�R�R8R�R�R�R�Rs(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�	stTestMutuallyExclusiveLongc
Bs�eZdd�ZdgZdedddddddd�fdedd	dddddd�fd
edddddddd�fdedddd	dddd�fgZdedddddddd�fgZd
ZdZ	dZ
RS(cCsqtdd�}|jddd�|jddd�|jd|�}|jd	dd
�|jddd�|S(
NRpRqs--abcdeRss
abcde helps--fghijs
fghij helpR�s--klmnos
klmno helps--pqrsts
pqrst help(R]RdR�(R
R�ReRk((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�,	ss--klmno X --pqrst Ys	--klmno XtabcdetfghijtklmnoR�tpqrsts--abcde Y --klmno XRs	--pqrst Xs--pqrst X --fghij YRsi    usage: PROG [-h] [--abcde ABCDE] [--fghij FGHIJ]
                [--klmno KLMNO | --pqrst PQRST]
    si    usage: PROG [-h] [--abcde ABCDE] [--fghij FGHIJ]
                (--klmno KLMNO | --pqrst PQRST)
    s�
    optional arguments:
      -h, --help     show this help message and exit
      --abcde ABCDE  abcde help
      --fghij FGHIJ  fghij help
      --klmno KLMNO  klmno help
      --pqrst PQRST  pqrst help
    N(RRRFR�R�R8R�R�R�R�Rs(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�*	s		$!$'*	t$TestMutuallyExclusiveFirstSuppressedcBs�eZd�ZdgZdeddde�fdeddde�fdedd
de�fgZd	edd
de�fgZ	d
Z
dZdZRS(cCsTtdd�}|jd|�}|jddtj�|jddddd	�|S(
NRpRqR�s-xRss-yR�R�sy help(R]R�RdR"R#(R
R�ReRk((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�W	s
s-x X -ys-x XR�R�R�s	-x X -x YRs-yRs&        usage: PROG [-h] [-y]
        s$        usage: PROG [-h] -y
        sx
        optional arguments:
          -h, --help  show this help message and exit
          -y          y help
        N(
RRR�R�R8R&RFRR�R�R�R�Rs(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�U	s		t#TestMutuallyExclusiveManySuppressedcBs�eZd�ZdddgZdedededd�fdedededd�fd	edededd
�fdedededd�fgZdedededd�fgZ	d
Z
ZdZRS(cCsstdd�}|jd|�}|j}|ddddtj�|ddd	dtj�|d
dtj�|S(NRpRqR�s--spamR�R�Rss--badgerR�s	--bladder(R]R�RdR"R#(R
R�ReRkRM((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�x	s	s--spam --badgers--badger --bladder Bs--bladder B --spams--spamR�R�tbladders--badgers--bladder BR�s
--spam --spamRs!        usage: PROG [-h]
        s[
        optional arguments:
          -h, --help  show this help message and exit
        N(
RRR�R�R8R&RFRR�R�R�R�Rs(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�v	s	
	$$
t*TestMutuallyExclusiveOptionalAndPositionalc
Bs�eZd�ZdddddgZdededdd	d
�fdededdd	d
�fd
ededdd	d
g�fd
ededdd	d
ddg�fgZdededdd	d
�fgZ	dZ
dZdZRS(cCsptdd�}|jd|�}|jddddd�|jd	dd
�|jddd
dddd�|S(NRpRqR�s--fooR�R�RstFOOs--spamtSPAMR�R�R�R�R�tBADGER(R]R�Rd(R
R�ReRk((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��	ss--foo --spam Ss
--spam S XsX --foosX Y Z --spam Ss	--foo X Ys--fooRiR�R�R�s--spam StSsX Y ZRRRsM        usage: PROG [-h] [--foo | --spam SPAM | badger [badger ...]]
        sM        usage: PROG [-h] (--foo | --spam SPAM | badger [badger ...])
        s�
        positional arguments:
          badger       BADGER

        optional arguments:
          -h, --help   show this help message and exit
          --foo        FOO
          --spam SPAM  SPAM
        N(
RRR�R�R8R&RFRR�R�R�R�Rs(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��	s			!-$
t#TestMutuallyExclusiveOptionalsMixedcBs�eZd�ZddddgZdedededed	ed
e�fdedededed	ed
e�fdedededed	ed
e�fd
edededed	ed
e�fdedededed	ed
e�fdedededed	ed
e�fgZdedededed	ed
e�fdedededed	ed
e�fdedededed	ed
e�fgZdZ	Z
dZRS(cCs�tdd�}|jddddd�|jd|�}|jd	dddd
�|jddddd�|jd
dddd�|jddddd�|S(NRpRqs-xR�R�Rssx helpR�s-asa helps-bsb helps-ysy helps-csc help(R]RdR�(R
R�ReRk((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��	ss-a -bs-b -cs-a -cs-a -b -cs-aR�R�R�R�R�s-bs-cs-a -xs-y -bs-x -y -cRs-xs-ys:        usage: PROG [-h] [-x] [-a] [-b] [-y] [-c]
        s�
        optional arguments:
          -h, --help  show this help message and exit
          -x          x help
          -a          a help
          -b          b help
          -y          y help
          -c          c help
        (RRR�R�R8R&RR�R�R�R�Rs(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��	s	
*****0**0

tTestMutuallyExclusiveInGroupcBs�eZd
d�ZddgZdedddd
�fdedd
dd�fgZd	edd
dd
�fgZd
ZdZ	dZ
RS(cCsctdd�}|jdddd�}|jd|�}|jdd	d
�|jdd	d�|S(
NRpRqR�sTitled groupRrsGroup descriptionR�s--barRssbar helps--bazsbaz help(R]RjR�Rd(R
R�Rettitled_grouptmutex_group((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��	s	s--bar X --baz Ys--baz X --bar Ys--bar XR�R�R�s--baz YRRs9        usage: PROG [-h] [--bar BAR | --baz BAZ]
        s9        usage: PROG [-h] (--bar BAR | --baz BAZ)
        s�
        optional arguments:
          -h, --help  show this help message and exit

        Titled group:
          Group description

          --bar BAR   bar help
          --baz BAZ   baz help
        N(RRRFR�R�R8R�R�R�R�Rs(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��	s
t1TestMutuallyExclusiveOptionalsAndPositionalsMixedcBsbeZd�ZdddgZdedddeded	d
de�fdedddeded	d
de�fd
edddeded	d
de�fdedddeded	d
de�fdedddeded	d
de�fgZd
edddeded	d
de�fdedddeded	d
de�fgZ	dZ
ZdZRS(cCs�tdd�}|jddd�|jddddd	�|jd
|�}|jddd
dd�|jddddd�|jddddd�|S(NRpRqR�Rssx helps-yR�R�sy helpR�R�R�R�sa helps-bsb helps-csc help(R]RdR�(R
R�ReRk((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�
ssX A -bs-b -cs-c X AsX AR�RR�R�R�R�R�sX -bsX -csX A -ysX -y -bsX -ys6        usage: PROG [-h] [-y] [-b] [-c] x [a]
        s
        positional arguments:
          x           x help
          a           a help

        optional arguments:
          -h, --help  show this help message and exit
          -y          y help
          -b          b help
          -c          c help
        N(
RRR�R�R8RRFR&R�R�R�R�Rs(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�
s	
****0*0
tMEPBasecBseZdd�ZRS(cCs@tt|�jd|�}td|jdtd|g�}|S(NR�RpR�R�(RR�R�R]RpR(R
R�R�Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�H
sN(RRRFR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�F
st&TestMutuallyExclusiveGroupErrorsParentcBseZRS((RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�O
st!TestMutuallyExclusiveSimpleParentcBseZRS((RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�T
stTestMutuallyExclusiveLongParentcBseZRS((RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�Y
st*TestMutuallyExclusiveFirstSuppressedParentcBseZRS((RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�^
st)TestMutuallyExclusiveManySuppressedParentcBseZRS((RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�c
st0TestMutuallyExclusiveOptionalAndPositionalParentcBseZRS((RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�h
st)TestMutuallyExclusiveOptionalsMixedParentcBseZRS((RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�m
st7TestMutuallyExclusiveOptionalsAndPositionalsMixedParentcBseZRS((RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�r
stTestSetDefaultscBsGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(c	Cst�}|jdd�|jdddd�|jtdddddd�|jg��|jtdddddd�|jgt���|jtdddddd�|jgtdd���|jtdddddd�|jgtdddd���dS(	NR�RiR�R�R�iR�i(R]tset_defaultsR	R8RW(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_set_defaults_no_args|
s	cCs\t�}|jdddd�|jddd�|jtdddd�|jg��|jtdddd�|jgt���|jtdddd�|jgtdd���|jtdd	dd�|jd
j���|jtdd	dd�|jd
j�t���|jtdd	dd�|jd
j�tdd���dS(NR�RiR�R�s-xR�txfooxR�R�s-x 1(R]R�RdR	R8RWR�(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_set_defaults_with_args�
s	cCsvt�}|jdd�|j�}|jd�}|jdd�|jtdddd�|jdj���dS(NR�RiR�R�R�(R]R�RxRzR	R8RWR�(R
ReR|tparser_a((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_set_defaults_subparsers�
s	cCsWtdt�}|jdd�td|g�}|jtdd�|jg��dS(NR�R�RiR�(R]RR�R	R8RW(R
R�Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_set_defaults_parents�
scCsjtj�}|j�jd�}|jdd�|jdd�|jtdd�|jdg��dS(NR�Riii(R"R^RxRzR�R	R8RW(R
Retxparser((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt)test_set_defaults_on_parent_and_subparser�
s
c
Cst�}|jdddddddd�|jd	�|jd
dd�|jdd
d�|jdd
ddd�|jtdddddddd�|jg��|jdddddddd�|jtdddddddd�|jg��dS(NR,tWR�R�R�RR�Rs-ws-xR�tXXR�R�tZZtWWtYY(R]R�RdR	R8RW(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt&test_set_defaults_same_as_add_argument�
s	"
$"$c
Cst�}|jdddddddd�|jd	�}|jd
�|jddd
�|jddd�|jddddd�|jtdddd
dddd�|jg��|jdddddddd�|jtdddddddd�|jg��dS(NR,RR�R�R�RR�RRis-ws-xR�RR�R�RRR(R]R�RjRdR	R8RW(R
ReRk((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt,test_set_defaults_same_as_add_argument_group�
s	"
$"$(	RRR�R�R�R�RRR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�z
s	
						tTestGetDefaultcBseZd�ZRS(cCst�}|jd|jd��|jd|jd��|jd�|jd|jd��|jd|jd��|jddtdd�|jd|jd��|jd|jd��|jdd�|jd|jd��|jd|jd��dS(	NRiR�s--foos--barR=R�i*R�(R]R	RFtget_defaultRdR�R�(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_get_default�
s	
(RRR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR	�
stTestNamespaceContainsSimplecBseZd�Zd�ZRS(cCsRtj�}|jd|kt�|jd|kt�|jd|kt�dS(NRR�(R"t	NamespaceR	RR&(R
tns((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt
test_empty�
scCs�tjdddd�}|jd|kt�|jd|kt�|jd|kt�|jd|kt�|jd|kt�|jd|kt�dS(NR�iR�iRtxxR�(R"R
R	R&R(R
R((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_non_empty�
s(RRRR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�
s	tTestHelpFormattingMetaclasscBseZd�ZRS(cCsZ|dkrdSdtfd��Y}x-d	d
dgD]\}}||||�q6WdS(NtHelpTestCaseRtcBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cSs�||_||_xp|j|j|jgD]V}d|j|f}|d�}y
||_Wntk
rpnXt|||�q+WdS(Ns%s_%scSs||�dS(N((R
Rv((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_wrappers(tfunc_suffixtstd_namettest_formatt
test_printttest_print_fileRR|RS(R
t
test_classRRRvR�R((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7s			

cSstj|jj|jj�}x0t|dg�D]}|j|j|j�q1Wt|dg�}xS|D]K\}}|j|j|j�}x$|D]}|j|j|j�q�WqjWt|dg�}|r|j�}	x'|D]}
|	j	|
j|
j�q�Wn|S(NRftargument_group_signaturestsubparsers_signatures(
R"R^RbR5R6RRRdRjRxRz(R
R�Retargument_sigt
group_sigst	group_sigt
argument_sigsRktsubparsers_sigsR|t
subparser_sig((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s(	

cSs�t||j�}tj|�}||kr�t|�GHt|�GHx?t||�D]+\}}||krSd||fGHPqSqSWn|j||�dS(Nsfirst diff: %r %r(RRRR�R�RtzipR	(R
R�tparser_textt
expected_texttchar1tchar2((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt_test3scSs<|j|�}t|d|j�}|j||��dS(Ns	format_%s(R�RRRR((R
R�ReR�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR?scSs�|j|�}t|d|j�}tt|j�}tt|jt��z#|�tt|j�j�}Wdtt|j|�X|j||�dS(Nsprint_%s(	R�RRRRPRRSRRVR((R
R�Retprint_t
old_streamR$((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRDscSsX|j|�}t|d|j�}t�}||�|j�}|j||�dS(Nsprint_%s(R�RRRRRVR((R
R�ReR)tsfileR$((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRPs	
(RRR7R�R(RRR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRt
s					tusageRKRsR'RL(R,RK(RsRK(R'RL(R�(R�R*R�R�RtRR((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7sO(RRR7(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRsRtTestHelpBiggerOptionalsc	Bs�eZdZedddddddd�Zed	d
ddd
�eddd�eddd�eddd�gZgZdZedZdZ	RS(s;Make sure that argument help aligns when options are longerRpRqRrtDESCRIPTIONtepilogtEPILOGR's0.1s-xR�R�RssX HELPs--ysY HELPRisFOO HELPR�sBAR HELPs;        usage: PROG [-h] [-v] [-x] [--y Y] foo bar
        sb
        DESCRIPTION

        positional arguments:
          foo            FOO HELP
          bar            BAR HELP

        optional arguments:
          -h, --help     show this help message and exit
          -v, --version  show program's version number and exit
          -x             X HELP
          --y Y          Y HELP

        EPILOG
    s        0.1
        (
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR-bstTestShortColumnscBsKeZdZd�ZejZejZejZdZedZ	ej
Z
RS(s�Test extremely small number of columns.

    TestCase prevents "COLUMNS" from being too small in the tests themselves,
    but we don't want any exceptions thrown in such case. Only ugly representation.
    cCs0tj�}|jdd�|j|j�dS(NR
R(RRRRR(R
R((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�ss�        usage: PROG
               [-h]
               [-v]
               [-x]
               [--y Y]
               foo
               bar
        s�
        DESCRIPTION

        positional arguments:
          foo
            FOO HELP
          bar
            BAR HELP

        optional arguments:
          -h, --help
            show this
            help
            message and
            exit
          -v, --version
            show
            program's
            version
            number and
            exit
          -x
            X HELP
          --y Y
            Y HELP

        EPILOG
    (RRR�RR-RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR1�s					tTestHelpBiggerOptionalGroupsc	Bs�eZdZedddddddd�Zed	d
ddd
�eddd�eddd�eddd�gZeddd�eddd�eddddd�gfgZdZedZdZ	RS(s;Make sure that argument help aligns when options are longerRpRqRrR.R/R0R's0.1s-xR�R�RssX HELPs--ysY HELPRisFOO HELPR�sBAR HELPsGROUP TITLEsGROUP DESCRIPTIONR�sBAZ HELPs-zR�R�sZ HELPsN        usage: PROG [-h] [-v] [-x] [--y Y] [-z Z [Z ...]] foo bar baz
        s�
        DESCRIPTION

        positional arguments:
          foo            FOO HELP
          bar            BAR HELP

        optional arguments:
          -h, --help     show this help message and exit
          -v, --version  show program's version number and exit
          -x             X HELP
          --y Y          Y HELP

        GROUP TITLE:
          GROUP DESCRIPTION

          baz            BAZ HELP
          -z Z [Z ...]   Z HELP

        EPILOG
    s        0.1
        (
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR2�s!tTestHelpBiggerPositionalscBs�eZdZedddd�Zeddddd	�ed
dd�eddd
�eddd�gZgZdZedZdZ	RS(s4Make sure that help aligns when arguments are longerR,tUSAGERrR.s-xR�R�RssX HELPs--ysY HELPtekiekiekifekangsEKI HELPR�sBAR HELPs        usage: USAGE
        s 
        DESCRIPTION

        positional arguments:
          ekiekiekifekang  EKI HELP
          bar              BAR HELP

        optional arguments:
          -h, --help       show this help message and exit
          -x               X HELP
          --y Y            Y HELP
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR3�stTestHelpReformattingcBs�eZdZedddd�Zeddddd	�ed
dddd�gZed
dd�eddddd�gfgZdZedZdZ	RS(s>Make sure that text after short names starts on the first lineRpRqRrse   oddly    formatted
description

that is so long that it should go onto multiple lines when wrappeds-xtmetavarRRssoddly
    formatted -x helpR�R�s
normal y helpR�s'
    oddly formatted group

descriptions-aR�R�s` oddly 
formatted    -a  help  
    again, so long that it should be wrapped over multiple liness2        usage: PROG [-h] [-x XX] [-a] yyy
        s�
        oddly formatted description that is so long that it should go onto multiple
        lines when wrapped

        positional arguments:
          yyy         normal y help

        optional arguments:
          -h, --help  show this help message and exit
          -x XX       oddly formatted -x help

        title:
          oddly formatted group description

          -a          oddly formatted -a help again, so long that it should be wrapped
                      over multiple lines
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR6	s	tTestHelpWrappingShortNamescBs�eZdZeddddd�Zedddd	d
d�eddd
d	dd�gZed�edddd	dd�gfgZdZedZdZ	RS(s>Make sure that text after short names starts on the first lineRpRqRrsD
Dis-xR7RRssXHH HXiR�R�sYH YHtALPHASs-aR�R�sAHHH HHAi
s2        usage: PROG [-h] [-x XX] [-a] yyy
        s�
        D DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD
        DD DD DD DD D

        positional arguments:
          yyy         YH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH
                      YHYH YHYH YHYH YHYH YHYH YHYH YHYH YH

        optional arguments:
          -h, --help  show this help message and exit
          -x XX       XHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH
                      HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH HXXHH HX

        ALPHAS:
          -a          AHHH HHAAHHH HHAAHHH HHAAHHH HHAAHHH HHAAHHH HHAAHHH HHAAHHH
                      HHAAHHH HHAAHHH HHA
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR8=s	%tTestHelpWrappingLongNamesc	Bs�eZdZedddddddd�Zedd	d
ddd
d�edd	ddddd�gZed�edd	ddddd�edd	ddddd�gfgZdZedZdZ	RS(s<Make sure that text after long names starts on the next lineR,R4RrsD DiR'sV Vs-xR7R�iRssXH XHiR�sYH YHR9s-aRsAH AHR�sZH ZHs        usage: USAGE
        sr
        D DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD DD
        DD DD DD DD D

        positional arguments:
          yyyyyyyyyyyyyyyyyyyyyyyyy
                                YH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH
                                YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YHYH YH

        optional arguments:
          -h, --help            show this help message and exit
          -v, --version         show program's version number and exit
          -x XXXXXXXXXXXXXXXXXXXXXXXXX
                                XH XHXH XHXH XHXH XHXH XHXH XHXH XHXH XHXH XHXH XHXH
                                XHXH XHXH XHXH XHXH XHXH XHXH XHXH XHXH XHXH XH

        ALPHAS:
          -a AAAAAAAAAAAAAAAAAAAAAAAAA
                                AH AHAH AHAH AHAH AHAH AHAH AHAH AHAH AHAH AHAH AHAH
                                AHAH AHAH AHAH AHAH AHAH AHAH AHAH AHAH AHAH AH
          zzzzzzzzzzzzzzzzzzzzzzzzz
                                ZH ZHZH ZHZH ZHZH ZHZH ZHZH ZHZH ZHZH ZHZH ZHZH ZHZH
                                ZHZH ZHZH ZHZH ZHZH ZHZH ZHZH ZHZH ZHZH ZHZH ZH
        ss        V VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV VV
        VV VV VV VV V
        (
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR:es
#	)t
TestHelpUsagec
BseZdZedd�Zeddddd�eddd	dd
�eddd�eddddd
�eddddd�gZed�eddddd�eddddd�eddddd	�eddddd�gfgZdZedZdZ	RS(sTest basic usage messagesRpRqs-wR�R�RsR,s-xR�R�R�R�iR�R�Rks-yR�s-ziR�RRfs�        usage: PROG [-h] [-w W [W ...]] [-x [X [X ...]]] [-y [Y]] [-z Z Z Z]
                    a b b [c] [d [d ...]] e [e ...]
        s�
        positional arguments:
          a               a
          b               b
          c               c

        optional arguments:
          -h, --help      show this help message and exit
          -w W [W ...]    w
          -x [X [X ...]]  x

        group:
          -y [Y]          y
          -z Z Z Z        z
          d               d
          e               e
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR;�s 	!tTestHelpOnlyUserGroupscBs�eZdZeddde�ZgZed�eddd�eddd�gfed	�ed
dd
�eddd�gfgZd
ZedZ	dZ
RS(sTest basic usage messagesRpRqR�txxxxs-xRsR�R�tyyyyR�s-yR�s.        usage: PROG [-x X] [-y Y] a b
        sn
        xxxx:
          -x X  x
          a     a

        yyyy:
          b     b
          -y Y  y
        R(RRR�R4RRbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR<�s			tTestHelpUsageLongProgcBsseZdZeddd�Zeddd�eddd�ed	�ed
�gZgZdZedZd
Z	RS(s*Test usage messages where the prog is longRptPi<s-wR7Rs-xR�R�R�sz        usage: PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
               [-h] [-w W] [-x X] a b
        s�
        positional arguments:
          a
          b

        optional arguments:
          -h, --help  show this help message and exit
          -w W
          -x X
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR?�s	
t TestHelpUsageLongProgOptionsWrapcBs�eZdZeddd�Zedddd�eddd	d�ed
ddd�eddd
d�ed�ed�gZgZdZedZdZ	RS(sATest usage messages where the prog is long and the optionals wrapRpR@i<s-wR7Ris-xR�s-yRs-zRR�R�s        usage: PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
               [-h] [-w WWWWWWWWWWWWWWWWWWWWWWWWW] [-x XXXXXXXXXXXXXXXXXXXXXXXXX]
               [-y YYYYYYYYYYYYYYYYYYYYYYYYY] [-z ZZZZZZZZZZZZZZZZZZZZZZZZZ]
               a b
        s8
        positional arguments:
          a
          b

        optional arguments:
          -h, --help            show this help message and exit
          -w WWWWWWWWWWWWWWWWWWWWWWWWW
          -x XXXXXXXXXXXXXXXXXXXXXXXXX
          -y YYYYYYYYYYYYYYYYYYYYYYYYY
          -z ZZZZZZZZZZZZZZZZZZZZZZZZZ
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRA
s	t$TestHelpUsageLongProgPositionalsWrapcBspeZdZedddde�Zedd�edd�edd�gZgZd	Zed
Z	dZ
RS(sCTest usage messages where the prog is long and the positionals wrapRpR@i<R�R�iR�R�s�        usage: PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
               aaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbb
               ccccccccccccccccccccccccc
        s�
        positional arguments:
          aaaaaaaaaaaaaaaaaaaaaaaaa
          bbbbbbbbbbbbbbbbbbbbbbbbb
          ccccccccccccccccccccccccc
        R(RRR�R4RRbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRB'
s

tTestHelpUsageOptionalsWrapcBs�eZdZedd�Zedddd�edddd�ed	dd
d�edddd�ed
�ed�ed�gZgZdZedZdZ	RS(s,Test usage messages where the optionals wrapRpRqs-wR7Ris-xR�s-yRs-zRR�R�R�s�        usage: PROG [-h] [-w WWWWWWWWWWWWWWWWWWWWWWWWW] [-x XXXXXXXXXXXXXXXXXXXXXXXXX]
                    [-y YYYYYYYYYYYYYYYYYYYYYYYYY] [-z ZZZZZZZZZZZZZZZZZZZZZZZZZ]
                    a b c
        sD
        positional arguments:
          a
          b
          c

        optional arguments:
          -h, --help            show this help message and exit
          -w WWWWWWWWWWWWWWWWWWWWWWWWW
          -x XXXXXXXXXXXXXXXXXXXXXXXXX
          -y YYYYYYYYYYYYYYYYYYYYYYYYY
          -z ZZZZZZZZZZZZZZZZZZZZZZZZZ
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRC@
s		
tTestHelpUsagePositionalsWrapcBs�eZdZedd�Zed�ed�ed�edd�edd�ed	d�gZgZd
ZedZdZ	RS(
s.Test usage messages where the positionals wrapRpRqs-xs-ys-zR�iR�R�s�        usage: PROG [-h] [-x X] [-y Y] [-z Z]
                    aaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbb
                    ccccccccccccccccccccccccc
        s
        positional arguments:
          aaaaaaaaaaaaaaaaaaaaaaaaa
          bbbbbbbbbbbbbbbbbbbbbbbbb
          ccccccccccccccccccccccccc

        optional arguments:
          -h, --help            show this help message and exit
          -x X
          -y Y
          -z Z
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRDf
s			

t%TestHelpUsageOptionalsPositionalsWrapcBs�eZdZedd�Zedddd�edddd�ed	dd
d�edd�edd�ed
d�gZgZdZedZdZ	RS(s<Test usage messages where the optionals and positionals wrapRpRqs-xR7R�is-yRs-zRR�R�R�s        usage: PROG [-h] [-x XXXXXXXXXXXXXXXXXXXXXXXXX] [-y YYYYYYYYYYYYYYYYYYYYYYYYY]
                    [-z ZZZZZZZZZZZZZZZZZZZZZZZZZ]
                    aaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbb
                    ccccccccccccccccccccccccc
        se
        positional arguments:
          aaaaaaaaaaaaaaaaaaaaaaaaa
          bbbbbbbbbbbbbbbbbbbbbbbbb
          ccccccccccccccccccccccccc

        optional arguments:
          -h, --help            show this help message and exit
          -x XXXXXXXXXXXXXXXXXXXXXXXXX
          -y YYYYYYYYYYYYYYYYYYYYYYYYY
          -z ZZZZZZZZZZZZZZZZZZZZZZZZZ
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRE�
s

tTestHelpUsageOptionalsOnlyWrapcBsxeZdZedd�Zedddd�edddd�ed	dd
d�gZgZdZedZd
Z	RS(s@Test usage messages where there are only optionals and they wrapRpRqs-xR7R�is-yRs-zRs�        usage: PROG [-h] [-x XXXXXXXXXXXXXXXXXXXXXXXXX] [-y YYYYYYYYYYYYYYYYYYYYYYYYY]
                    [-z ZZZZZZZZZZZZZZZZZZZZZZZZZ]
        s�
        optional arguments:
          -h, --help            show this help message and exit
          -x XXXXXXXXXXXXXXXXXXXXXXXXX
          -y YYYYYYYYYYYYYYYYYYYYYYYYY
          -z ZZZZZZZZZZZZZZZZZZZZZZZZZ
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRF�
st TestHelpUsagePositionalsOnlyWrapcBsleZdZeddde�Zedd�edd�edd�gZgZdZed	Z	d
Z
RS(sBTest usage messages where there are only positionals and they wrapRpRqR�R�iR�R�s~        usage: PROG aaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbb
                    ccccccccccccccccccccccccc
        s�
        positional arguments:
          aaaaaaaaaaaaaaaaaaaaaaaaa
          bbbbbbbbbbbbbbbbbbbbbbbbb
          ccccccccccccccccccccccccc
        R(RRR�R4RRbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRG�
s

tTestHelpVariableExpansionc
BseZdZedd�Zeddedd�eddd	d
ddd
dd�eddddd�edd
ddddgdddd�eddd�edd
ddd�gZed�ed dd!�ed"d
d#dd$�gfgZd%Zed&Z	d'Z
RS((s:Test that variables are expanded properly in help messagesRpRqs-xR=Rss"x %(prog)s %(default)s %(type)s %%s-yR�R�R�i*R�tXXXs y %(prog)s %(default)s %(const)ss--fooR�R�s$foo %(prog)s %(default)s %(choices)ss--barR�iiR7tBBBs!bar %(prog)s %(default)s %(dest)sR�sspam %(prog)s %(default)sR�g�?sbadger %(prog)s %(default)sRks-asa %(prog)s %(default)ss-bi����sb %(prog)s %(default)ssw        usage: PROG [-h] [-x X] [-y] [--foo {a,b,c}] [--bar BBB] [-a A] [-b B]
                    spam badger
        s�
        positional arguments:
          spam           spam PROG None
          badger         badger PROG 0.5

        optional arguments:
          -h, --help     show this help message and exit
          -x X           x PROG None int %
          -y             y PROG 42 XXX
          --foo {a,b,c}  foo PROG None a, b, c
          --bar BBB      bar PROG baz bar

        group:
          -a A           a PROG None
          -b B           b PROG -1
        R(RRR�R4RbR�RfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRH�
s&!	!t&TestHelpVariableExpansionUsageSuppliedcBsEeZdZedddd�ZgZgZdZedZdZ	RS(s@Test that variables are expanded properly when usage= is presentRpRqR,s%(prog)s FOOs         usage: PROG FOO
        s[
        optional arguments:
          -h, --help  show this help message and exit
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRKst$TestHelpVariableExpansionNoArgumentscBsAeZdZeddde�ZgZgZdZeZ	dZ
RS(s;Test that variables are expanded properly with no argumentsRpRqR�s        usage: PROG
        R(RRR�R4RRbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRLstTestHelpSuppressUsagecBsbeZdZedddej�Zeddd�eddd�gZgZd	Z	d
Z
d
ZRS(s3Test that items can be suppressed in usage messagesRpRqR,s--fooRssfoo helpR�s	spam helps�        positional arguments:
          spam        spam help

        optional arguments:
          -h, --help  show this help message and exit
          --foo FOO   foo help
        R(RRR�R4R"R#RbRfRRsR,R'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRM*stTestHelpSuppressOptionalcBsfeZdZeddde�Zeddej�eddd�gZgZ	dZ
e
d	Zd
ZRS(s?Test that optional arguments can be suppressed in help messagesRpRqR�s--fooRsR�s	spam helps!        usage: PROG spam
        sA
        positional arguments:
          spam  spam help
        R(
RRR�R4RRbR"R#RfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRN?stTestHelpSuppressOptionalGroupcBs~eZdZedd�Zeddd�eddd�gZed�ed	dej�gfgZd
Z	e	dZ
dZRS(
s<Test that optional groups can be suppressed in help messagesRpRqs--fooRssfoo helpR�s	spam helpRks--bars2        usage: PROG [-h] [--foo FOO] spam
        s�
        positional arguments:
          spam        spam help

        optional arguments:
          -h, --help  show this help message and exit
          --foo FOO   foo help
        R(RRR�R4RbRfR"R#RR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyROSs'tTestHelpSuppressPositionalcBs`eZdZedd�Zeddd�eddej�gZgZdZ	e	dZ
d	ZRS(
sATest that positional arguments can be suppressed in help messagesRpRqs--fooRssfoo helpR�s-        usage: PROG [-h] [--foo FOO]
        sz
        optional arguments:
          -h, --help  show this help message and exit
          --foo FOO   foo help
        R(RRR�R4RbR"R#RfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRPmstTestHelpRequiredOptionalcBsTeZdZedd�Zeddedd�gZgZdZedZ	d	Z
RS(
s.Test that required options don't look optionalRpRqs--fooR�Rssfoo helps+        usage: PROG [-h] --foo FOO
        sz
        optional arguments:
          -h, --help  show this help message and exit
          --foo FOO   foo help
        R(RRR�R4RbR&RfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRQ�stTestHelpAlternatePrefixCharscBsreZdZeddddde�Zedddd	d
�eddd	d
�gZgZdZedZ	dZ
RS(s:Test that options display with different prefix charactersRpRqR�s^;R�s^^fooR�R�Rssfoo helps;bs;;barsbar helps-        usage: PROG [^^foo] [;b BAR]
        sq
        optional arguments:
          ^^foo              foo help
          ;b BAR, ;;bar BAR  bar help
        R(RRR�R4RRbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRR�stTestHelpNoHelpOptionalcBsceZdZeddde�Zeddd�eddd�gZgZd	Zed
Z	dZ
RS(s=Test that the --help argument can be suppressed help messagesRpRqR�s--fooRssfoo helpR�s	spam helps-        usage: PROG [--foo FOO] spam
        s�
        positional arguments:
          spam       spam help

        optional arguments:
          --foo FOO  foo help
        R(RRR�R4RRbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRS�stTestHelpVersionOptionalcBsceZdZedddd�Zeddd�eddd	�gZgZd
ZedZdZ	RS(
s@Test that the --version argument can be suppressed help messagesRpRqR's1.0s--fooRssfoo helpR�s	spam helps7        usage: PROG [-h] [-v] [--foo FOO] spam
        s
        positional arguments:
          spam           spam help

        optional arguments:
          -h, --help     show this help message and exit
          -v, --version  show program's version number and exit
          --foo FOO      foo help
        s        1.0
        (
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRT�s	tTestHelpNonecBsQeZdZedd�Zed�ed�gZgZdZedZdZ	RS(s1Test that no errors occur if no help is specifiedRpRqs--fooR�s2        usage: PROG [-h] [--foo FOO] spam
        s�
        positional arguments:
          spam

        optional arguments:
          -h, --help  show this help message and exit
          --foo FOO
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRU�s	tTestHelpTupleMetavarcBs�eZdZedd�Zeddddddd�eddddd
dd�eddddddd�eddddddd �gZgZdZedZdZ	RS(!s"Test specifying metavar as a tupleRpRqs-wRsR,R�R�R7tW1tW2s-xR�R�tX1tX2s-yR�itY1tY2tY3s-zR�R�tZ1s]        usage: PROG [-h] [-w W1 [W2 ...]] [-x [X1 [X2 ...]]] [-y Y1 Y2 Y3] [-z [Z1]]
        s�
        optional arguments:
          -h, --help        show this help message and exit
          -w W1 [W2 ...]    w
          -x [X1 [X2 ...]]  x
          -y Y1 Y2 Y3       y
          -z [Z1]           z
        R(RWRX(RYRZ(R[R\R](R^(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRV�s!tTestHelpRawTextcBs�eZdZedddejdd�Zeddd�ed	dd
�gZeddd�ed
dd�gfgZdZ	e	dZ
dZRS(sTest the RawTextHelpFormatterRpRqtformatter_classRrs7Keep the formatting
    exactly as it is written

here
s--fooRss-    foo help should also
appear as given hereR�s	spam helpR�s?    This text
  should be indented
    exactly like it is here
s--barsbar helps>        usage: PROG [-h] [--foo FOO] [--bar BAR] spam
        s�
        Keep the formatting
            exactly as it is written

        here

        positional arguments:
          spam        spam help

        optional arguments:
          -h, --help  show this help message and exit
          --foo FOO       foo help should also
                      appear as given here

        title:
              This text
            should be indented
              exactly like it is here

          --bar BAR   bar help
        R(RRR�R4R"tRawTextHelpFormatterRbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR_s	tTestHelpRawDescriptioncBs�eZdZedddejdd�Zeddd�ed	dd
�gZeddd�ed
dd�gfgZdZ	e	dZ
dZRS(sTest the RawTextHelpFormatterRpRqR`Rrs7Keep the formatting
    exactly as it is written

here
s--fooRss4  foo help should not
    retain this odd formattingR�s	spam helpR�s?    This text
  should be indented
    exactly like it is here
s--barsbar helps>        usage: PROG [-h] [--foo FOO] [--bar BAR] spam
        s�
        Keep the formatting
            exactly as it is written

        here

        positional arguments:
          spam        spam help

        optional arguments:
          -h, --help  show this help message and exit
          --foo FOO   foo help should not retain this odd formatting

        title:
              This text
            should be indented
              exactly like it is here

          --bar BAR   bar help
        R(RRR�R4R"tRawDescriptionHelpFormatterRbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRbAs	tTestHelpArgumentDefaultscBs�eZdZedddejdd�Zeddd�edd	d
dd�eddd
�eddddddd�gZeddd�eddedddd�gfgZ	dZ
e
dZdZRS(s&Test the ArgumentDefaultsHelpFormatterRpRqR`Rrs--fooRss)foo help - oh and by the way, %(default)ss--barR�R�sbar helpR�s	spam helpR�R�R�R�twoodensbadger helpR�s--bazR=i*sbaz helpsO        usage: PROG [-h] [--foo FOO] [--bar] [--baz BAZ] spam [badger]
        s�
        description

        positional arguments:
          spam        spam help
          badger      badger help (default: wooden)

        optional arguments:
          -h, --help  show this help message and exit
          --foo FOO   foo help - oh and by the way, None
          --bar       bar help (default: False)

        title:
          description

          --baz BAZ   baz help (default: 42)
        R(
RRR�R4R"tArgumentDefaultsHelpFormatterRbRfR�RR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRdqs	!'tTestHelpVersionActioncBs]eZdZedddd�Zedddddd�gZgZd	Zed
ZdZ	RS(s,Test the default help for the version actionRpRqRrs-Vs	--versionR�R's3.6s&        usage: PROG [-h] [-V]
        s�
        description

        optional arguments:
          -h, --help     show this help message and exit
          -V, --version  show program's version number and exit
        R(
RRR�R4RbRfRR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRg�stTestHelpSubparsersOrderingcBsaeZdZedddddd�ZgdD]Zede�^q.Zd
ZedZdZ	RS(s5Test ordering of subcommands in help matches the codeRpRqRrsdisplay some subcommandsR's0.1R�R�R�RRfR*s6        usage: PROG [-h] [-v] {a,b,c,d,e} ...
        s�
        display some subcommands

        positional arguments:
          {a,b,c,d,e}

        optional arguments:
          -h, --help     show this help message and exit
          -v, --version  show program's version number and exit
        s        0.1
        (R�R�R�RRf(
RRR�R4RbR*RR,RsR'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRh�s	
t"TestHelpSubparsersWithHelpOrderingcBs�eZdZedddddd�ZdddddfZgeD]!\ZZedede�^qCZdZ	e	dZdZ
RS(s5Test ordering of subcommands in help matches the codeRpRqRrsdisplay some subcommandsR's0.1R�sa subcommand helpR�sb subcommand helpR�sc subcommand helpRsd subcommand helpRfse subcommand helpR*Rss6        usage: PROG [-h] [-v] {a,b,c,d,e} ...
        s�
        display some subcommands

        positional arguments:
          {a,b,c,d,e}
            a            a subcommand help
            b            b subcommand help
            c            c subcommand help
            d            d subcommand help
            e            e subcommand help

        optional arguments:
          -h, --help     show this help message and exit
          -v, --version  show program's version number and exit
        s        0.1
        (R�sa subcommand help(R�sb subcommand help(R�sc subcommand help(Rsd subcommand help(Rfse subcommand help(RRR�R4Rbtsubcommand_dataR*RsRR,R'(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRi�s		+tTestInvalidArgumentConstructorscBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZRS(s-Test a bunch of invalid Argument constructorscOs)tj�}|jt|j||�dS(N(R"R^R�R|Rd(R
R5R6Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytassertTypeError�scOs)tj�}|jt|j||�dS(N(R"R^R�R�Rd(R
R5R6Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytassertValueError�scCsP|jddd�|jddd�|jddd�|jddi�dS(	Ns-xR�s-ytcallbackRit
callback_argstcallback_kwargs((RlRF(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_invalid_keyword_argumentsscCs5|j�x$ddgD]}|jd|�qWdS(NR�R�R�(Rl(R
R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_missing_destination
s
cCs|jd�|jd�dS(Ns--s---(Rm(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_invalid_option_stringss
cCs0|jddd�|jddttf�dS(Ns--fooR=R�(RmR�R (R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_invalid_typescCs�|jddd�|jddd�|jddd�tj�}y|jddd�WnStk
r�tj�d	}d
}d||f}|j|t|�k|�nXdS(
Ns-xR�RiR�s--fooR�R�s
store-trueisunknown actionsexpected %r, found %r(R�R�(	RmR"R^RdR�RPRTt
assertTrueR�(R
ReRfR�tmsg((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_invalid_actions
cCs�tj�}|jdd�y|jddd�WnStk
r�tj�d}d}d||f}|j|t|�k|�nXdS(NR�RiR�R�is+dest supplied twice for positional argumentsexpected %r, found %r(R"R^RdR�RPRTRuR�(R
ReRfR�Rv((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_multiple_dest$s
cCsoxhdddddgD]Q}xHtdt�tdd�td	d
�gD]}|jdd||�qGWqWdS(
NR�R�R�R�R�R=R�R�R�tabs-xR�(RyR�Rl(R
R�tattrs((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_no_argument_actions/s
cCsPxIdddgD]8}|jdddd|�|jddd	d|�qWdS(
NR�R�R�s-xR�RiR�R�R�(Rl(R
R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt!test_no_argument_no_const_actions6sc
Cs�x�ddgD]�}|jdddd|�|jdddd|�xUdd	d
gD]D}|jdddd|d|�|jdddd|d|�qUWq
WdS(
NR�R�s-xR�iR�R�iR�R�R�Ri(Rm(R
R�R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt#test_more_than_one_argument_actions@s
cCs4x-ddgD]}|jdddd|�q
WdS(NR�R�s-xR�R�R�(Rl(R
R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_required_const_actionsNscCsL|jddd�|jddddd�|jddddtj�dS(NtcommandR�tparsersRpRqRc(RlR"R^(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt"test_parsers_action_missing_paramsTscCs|jddt�dS(NRiR�(RlR&(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_required_positionalZsc
s�dtfd��Y�dtf�fd��Y}tj�}|j�|jdd|d�d��|j�|jd	d|d�d��dS(
NtSuccesscBseZRS((RR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�_sRics#eZe�fd�Zd�ZRS(cs:|dkr6|�kr6|�kr3���q3q6ndS(NR�((R
toption_stringsR�R�R�R�(R�(s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR7dsc_sdS(N((R
R5R6((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRgos(RRRR7Rg((R�(s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRibss--spamR�R�R�R�(RIR�R"R^R�Rd(R
RiRe((R�s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_user_defined_action]s(RRR�RlRmRqRrRsRtRwRxR{R|R}R~R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRk�s 							
			
				tTestActionsReturnedcBseZd�Zd�ZRS(cCs|tj�}|jd�}|j|jd�|jdd�}|j|jd�|jdd�}|j|jd�dS(	Ns--fooRis-bs--barR�s-xs-yR�(R"R^RdR	R�(R
ReR�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�~scCs�tj�}|jddddddddtd	d
dgdd
dddd�}|j|jd�|j|jd�|j|jd�|j|jt�|j|j	d
dg�|j|j
d
�|j|jd�|j|jd�dS(Ns--fooR�R�R�i*R�iTR=R�iiRsR�R7tBARR�R�(
R"R^RdR�R	R�R�R�R=R�RsR7R�(R
ReR�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt	test_misc�s(RRR�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�|s		tTestConflictHandlingcBs#eZd�Zd�Zd�ZRS(cCs|jttjdd�dS(Ntconflict_handlerRi(R�R�R"R^(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt
test_bad_type�scCs\tj�}|jd�|jtj|jd�|jd�|jtj|jd�dS(Ns-xs--spam(R"R^RdR�R�(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_conflict_error�s


cCs�tj}|dddd�}|jddd�|jddd�|j|j�tjd	��|jd
dd�|jd
dd
�|j|j�tjd��dS(NRpRqR�tresolves-xRssOLD XsNEW Xs�            usage: PROG [-h] [-x X]

            optional arguments:
              -h, --help  show this help message and exit
              -x X        NEW X
            s--spamR7tOLD_SPAMtNEW_SPAMs�            usage: PROG [-h] [-x X] [--spam NEW_SPAM]

            optional arguments:
              -h, --help       show this help message and exit
              -x X             NEW X
              --spam NEW_SPAM
            (R"R^RdR	R�R�R�(R
R�Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_resolve_error�s	
(RRR�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s			tTestOptionalsHelpVersionActionscBsqeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
RS(s!Test the help and version actionscOsJy|||�Wntk
r/tj�dSX|jt|||�dS(Ni(RHRPRTR�(R
tfuncR5R6((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt
_get_error�s

cCs2|j|j�|j|j|j��j�dS(N(R	R�R�RWR�RK(R
ReR�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytassertPrintHelpExit�s	cCs2|j|j�|j|j|j��j�dS(N(R	tformat_versionR�RWR�RL(R
ReR�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytassertPrintVersionExit�s	cGs|jt|j|�dS(N(R�RHRW(R
ReR5((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyRo�scCsStdd�}|j|d�|j|d�|j|d�|j|d�dS(NR's1.0s-hs--helps-vs	--version(R]R�R�(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_version�s
cCsDtdddd�}|j|jdg�j}|jd|�dS(NRptPPPR's%(prog)s 3.5s-vsPPP 3.5
(R]R�RWRLR	(R
ReRv((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_version_format�scCsYtdtdd�}|j|d�|j|d�|j|d�|j|d�dS(NR�R's1.0s-hs--helps-vs	--version(R]RRoR�(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_version_no_help�s
cCsWtdd�}|jddddd�|j|jdg�j}|jd|�dS(NRpRIs-VR�R's%(prog)s 3.7sXXX 3.7
(R]RdR�RWRLR	(R
ReRv((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_version_action�scCsStdt�}|j|d�|j|d�|j|d�|j|d�dS(NR�s-hs--helps-vs	--version(R]RRo(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_no_help�s
cCsst�}|jddd�|jddd�|j|d�|j|d�|j|d�|j|d�dS(Ns-xR�Rss-yR's-vs	--version(R]RdR�R�Ro(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_alternate_help_version�s	cCs�tdd�}|jddd�|jd�dddd	d
g}|ddg}x|D]w}x|D]}d
||f}qhW|j||d�|j||d�|j||d�|j||d�q[WdS(NR's1.0s-xR�R�R�RRis-x barsbaz -xs--bad-optionsfoo bar bazs	%s %%s %ss-hs--helps-vs	--version(R]RdR�R�(R
Retvalid_prefixestvalid_suffixestprefixtsuffixR�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt!test_help_version_extra_argumentss


(RRR�R�R�R�RoR�R�R�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s											tTestStringscBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(s3Test str()  and repr() on Optionals and PositionalscCs1x*ttgD]}|j||�|�q
WdS(N(R�RR	(R
tobjt
result_stringR�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytassertStringEqual scCshtjddddgddddd	d
ddd
dddgdddd�}d}|j||�dS(NR�s--foos-as-bR�R�R=R�R�R�R�i*R�iiiRstHELPR7tMETAVARs�Action(option_strings=['--foo', '-a', '-b'], dest='b', nargs='+', const=None, default=42, type='int', choices=[1, 2, 3], help='HELP', metavar='METAVAR')(R"RiR�(R
toptionR[((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt
test_optional$s		cCsctjdgdddtddddd	d
ddgdd
dd�}dt}|j||�dS(NR�R�R�R=R�R�R�g@R�g�?g�?RssH HH HR7sMV MV MVs�Action(option_strings=[], dest='x', nargs='?', const=None, default=2.5, type=%r, choices=[0.5, 1.5, 2.5], help='H HH H', metavar='MV MV MV')(R"RiR R�(R
targumentR[((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt
test_argument4s		cCs2tjdddd�}d}|j||�dS(NRii*R�R�sNamespace(bar='spam', foo=42)(R"R
R�(R
RR[((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_namespaceDscCs3tjdd�}dtj}|j||�dS(NRpRqs�ArgumentParser(prog='PROG', usage=None, description=None, version=None, formatter_class=%r, conflict_handler='error', add_help=True)(R"R^t
HelpFormatterR�(R
ReR[((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_parserIs
(RRR�R�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s				t
TestNamespacecBs#eZd�Zd�Zd�ZRS(cCsdtj�}|jtt|d�tjdddd�}|j|jd�|j|jd�dS(NR�R�i*R�R�(R"R
R�tAttributeErrorRRR	R�R�(R
R((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_constructorWs
cCs�tjdddd�}tjdddd�}tjdd�}tjdd�}|j||�|j||�|j||�|j||�|j||�|j||k�|j||k�|j||k�|j||k�dS(NR�iR�i(R"R
R	tassertNotEqualRu(R
tns1tns2tns3tns4((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt
test_equality_scCsNtjdddd�}|j|jd�t�|j|jd�t�dS(NR�iR�i(R"R
tassertIsRDRFtNotImplementedRE(R
R((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt#test_equality_returns_notimplemetedos(RRR�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�Us		tTestEncodingcBs#eZd�Zd�Zd�ZRS(cCsNtjj|�\}}|d7}tj|dd��}|j�WdQXdS(Ns.pyR8tutf8(RR tsplitexttcodecsR-R@(R
R RuR�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt_test_module_encoding|s
cCs|jtj�dS(N(R�R"t__file__(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_argparse_module_encoding�scCs|jt�dS(N(R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt"test_test_argparse_module_encoding�s(RRR�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�zs		tTestArgumentErrorcBseZd�ZRS(cCs2d}tjd|�}|jt|�|�dS(Ns
my error here(R"R�RFR	R�(R
RvR_((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_argument_error�s(RRR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��stTestArgumentTypeErrorcBseZd�ZRS(cCs�d�}tdddt�}|jdd|�y|jdg�Wn:tk
r�d}tj�d	j}|j||�nX|j	�dS(
NcSstjd��dS(Nsspam!(R"tArgumentTypeError(R[((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��sRpRqR�R�R=RIs-usage: PROG x
PROG: error: argument x: spam!
i(
R]RRdRWRHRPRTRLR	tfail(R
R�ReR�Rv((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_argument_type_error�s	
(RRR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��stTestTypeFunctionCallOnlyOncecBseZd�ZRS(csf�fd�}tj�}|jdd|dd�|jdj��}�jtdd�|�dS(	Ncs�j|d�dS(Nsspam!t
foo_converted(R	(tstring_to_convert(R
(s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��ss--fooR=R�R�s--foo spam!RiR�(R"R^RdRWR�R	R8(R
R�ReR5((R
s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt!test_type_function_call_only_once�s
(RRR�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��stTestTypeFunctionCalledOnDefaultcBs,eZd�Zd�Zd�Zd�ZRS(cs`�fd�}tj�}|jdd|dd�|jg�}�jtdd�|�dS(Ncs�j|d�dS(NiR�(R	(tint_to_convert(R
(s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��ss--fooR=R�iRi(R"R^RdRWR	R8(R
R�ReR5((R
s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt/test_type_function_call_with_non_string_default�s
cCsZd�}tj�}|jdd|dd�|jg�}|jtdd�|�dS(NcSsdS(NR�((R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��ss--fooR=R�t0RiR�(R"R^RdRWR	R8(R
R�ReR5((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt+test_type_function_call_with_string_default�s
	cCsZd�}tj�}|jdd|dd�|jg�}|jtdd�|�dS(NcSs|dS(NR�((tstr_to_convert((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytextend�ss--testR=R�R�R`s**(R"R^RdRWR	R8(R
R�ReR5((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt)test_no_double_type_conversion_of_default�s
	c
CsWtj�}|jddddtdgdd�|jg�}|j|jg�dS(Ns--testR�R`R=R�R�R�(R"R^RdR�RWR	R`(R
ReR5((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_issue_15906�s

(RRR�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s		
	tTestParseKnownArgscBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCstj�}|jd�dS(N((R"R^RW(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_arguments_tuple�scCstj�}|jg�dS(N(R"R^RW(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_arguments_list�scCs*tj�}|jd�|jd�dS(NR�(R�(R"R^RdRW(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_arguments_tuple_positional�s
cCs-tj�}|jd�|jdg�dS(NR�(R"R^RdRW(R
Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_arguments_list_positional�s
cCsgtj�}|jd�|jdj��\}}|jtdd�|�|jddg|�dS(Ns--foos--foo F --bar --bazRitFs--bars--baz(R"R^RdR�R�R	R8(R
ReR5textras((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_optionalss

cCs�tj�}|jddddddt�|jddd	�|jd
�ddd
dddg}|j|�\}}|jtdddtd
d�|�|jdd
dg|�dS(Ns-vR�R�R�iR=s--spamR�R�R�R�RYs--fooRuRtviR�(R"R^RdR�R�R	R8R&(R
ReRqR5R�((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt
test_mixed	s
%(RRR�R�R�R�R�R�(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR��s					tTestAddArgumentMetavarcBs�eZdZd�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�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1RS(0s,length of metavar tuple does not match nargscCs)tj�}|jdd|d|�dS(Ns--fooR�R7(R"R^Rd(R
R�R7Re((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytdo_test_no_exceptionsc
Cs^tj�}|jt�� }|jdd|d|�WdQX|j|jjd|j�dS(Ns--fooR�R7i(	R"R^R�R�RdR	t	exceptionR5tEXPECTED_MESSAGE(R
R�R7Retcm((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pytdo_test_exception scCs|jdddd�dS(NR�R7R�(R�RF(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_None_metavar_string(scCs|jdddt��dS(NR�R7(R�RFttuple(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_None_metavar_length0+scCs|jdddd�dS(NR�R7R�(R�(R�RF(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_None_metavar_length1.scCs|jdddd�dS(NR�R7R�R�(R�R�(R�RF(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_None_metavar_length21scCs|jdddd�dS(NR�R7R�R�Ru(R�R�Ru(R�RF(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_None_metavar_length34scCs|jdddd�dS(NR�R�R7R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt"test_nargs_optional_metavar_string9scCs|jdddt��dS(NR�R�R7(R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt#test_nargs_optional_metavar_length0<scCs|jdddd�dS(NR�R�R7R�(R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt#test_nargs_optional_metavar_length1?scCs|jdddd�dS(NR�R�R7R�R�(R�R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt#test_nargs_optional_metavar_length2BscCs|jdddd�dS(NR�R�R7R�R�Ru(R�R�Ru(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt#test_nargs_optional_metavar_length3EscCs|jdddd�dS(NR�R�R7R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt$test_nargs_zeroormore_metavar_stringJscCs|jdddt��dS(NR�R�R7(R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt%test_nargs_zeroormore_metavar_length0MscCs|jdddd�dS(NR�R�R7R�(R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt%test_nargs_zeroormore_metavar_length1PscCs|jdddd�dS(NR�R�R7R�R�(R�R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt%test_nargs_zeroormore_metavar_length2SscCs|jdddd�dS(NR�R�R7R�R�Ru(R�R�Ru(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt%test_nargs_zeroormore_metavar_length3VscCs|jdddd�dS(NR�R�R7R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt#test_nargs_oneormore_metavar_string[scCs|jdddt��dS(NR�R�R7(R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt$test_nargs_oneormore_metavar_length0^scCs|jdddd�dS(NR�R�R7R�(R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt$test_nargs_oneormore_metavar_length1ascCs|jdddd�dS(NR�R�R7R�R�(R�R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt$test_nargs_oneormore_metavar_length2dscCs|jdddd�dS(NR�R�R7R�R�Ru(R�R�Ru(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt$test_nargs_oneormore_metavar_length3gscCs|jdddd�dS(NR�s...R7R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt#test_nargs_remainder_metavar_stringlscCs|jdddt��dS(NR�s...R7(R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt$test_nargs_remainder_metavar_length0oscCs|jdddd�dS(NR�s...R7R�(R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt$test_nargs_remainder_metavar_length1rscCs|jdddd�dS(NR�s...R7R�R�(R�R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt$test_nargs_remainder_metavar_length2uscCs|jdddd�dS(NR�s...R7R�R�Ru(R�R�Ru(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt$test_nargs_remainder_metavar_length3xscCs|jdddd�dS(NR�sA...R7R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt test_nargs_parser_metavar_string}scCs|jdddt��dS(NR�sA...R7(R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt!test_nargs_parser_metavar_length0�scCs|jdddd�dS(NR�sA...R7R�(R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt!test_nargs_parser_metavar_length1�scCs|jdddd�dS(NR�sA...R7R�R�(R�R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt!test_nargs_parser_metavar_length2�scCs|jdddd�dS(NR�sA...R7R�R�Ru(R�R�Ru(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt!test_nargs_parser_metavar_length3�scCs|jdddd�dS(NR�iR7R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_1_metavar_string�scCs|jdddt��dS(NR�iR7(R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_1_metavar_length0�scCs|jdddd�dS(NR�iR7R�(R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_1_metavar_length1�scCs|jdddd�dS(NR�iR7R�R�(R�R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_1_metavar_length2�scCs|jdddd�dS(NR�iR7R�R�Ru(R�R�Ru(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_1_metavar_length3�scCs|jdddd�dS(NR�iR7R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_2_metavar_string�scCs|jdddt��dS(NR�iR7(R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_2_metavar_length0�scCs|jdddd�dS(NR�iR7R�(R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_2_metavar_length1�scCs|jdddd�dS(NR�iR7R�R�(R�R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_2_metavar_length2�scCs|jdddd�dS(NR�iR7R�R�Ru(R�R�Ru(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_2_metavar_length3�scCs|jdddd�dS(NR�iR7R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_3_metavar_string�scCs|jdddt��dS(NR�iR7(R�R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_3_metavar_length0�scCs|jdddd�dS(NR�iR7R�(R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_3_metavar_length1�scCs|jdddd�dS(NR�iR7R�R�(R�R�(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_3_metavar_length2�scCs|jdddd�dS(NR�iR7R�R�Ru(R�R�Ru(R�(R
((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_nargs_3_metavar_length3�s(2RRR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRRRRRRRRR	R
RRR
RRRRRRR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s`																																														tTestImportStarcBseZd�Zd�ZRS(cCs.x'tjD]}|jtt|��q
WdS(N(R"t__all__RuR�(R
R*((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR`�scCslgtt�j�D]0\}}|jd�stj|�s|^q}|jt|�ttj��dS(NRu(	RBR"R<t
startswithtinspecttismoduleR	R;R(R
R*RWR<((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt'test_all_exports_everything_but_modules�s
(RRR`R(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s	tTestWrappingMetavarcBseZd�Zd�ZRS(cCs/td�|_d}|jjdd|�dS(Nt9this_is_spammy_prog_with_a_long_name_sorry_about_the_names<http[s]://example:1234>s--proxyR7(R]ReRd(R
R7((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�scCs,|jj�}|j|tjd��dS(Ns(            usage: this_is_spammy_prog_with_a_long_name_sorry_about_the_name
                   [-h] [--proxy <http[s]://example:1234>]

            optional arguments:
              -h, --help            show this help message and exit
              --proxy <http[s]://example:1234>
            (ReR�R	R�R�(R
t	help_text((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyttest_help_with_metavar�s(RRRR(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyR�s		cCsKtjdtfdtf��tjt�WdQXit_t�t_dS(Ns7The "version" argument to ArgumentParser is deprecated.s/The (format|print)_version method is deprecated(	Rtcheck_warningstDeprecationWarningtrun_unittestRR=R?RRJ(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt	test_main�s
	t__main__(�R�RRR$R"RPR�RtunittestR"RRR`RRR�RR4R8RIRHR\R^R]R=R`R�RaR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRRRRRRRR	R
RRR
RRRRRRRRRR!R$R&R(R1R7R=RBRFRHRJtskipIfR�RNRORPRQRURXRZRaRjRnR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R	RRRR-R1R2R3R6R8R:R;R<R?RARBRCRDRERFRGRHRKRLRMRNRORPRQRRRSRTRURVR_RbRdRgRhRiRkR�R�R�R�R�R�R�R�R�R�R�R�RRR"R(((s9/usr/local/python-2.7/lib/python2.7/test/test_argparse.pyt<module>s�
	 q	











##$	C�'�&0#+!$-*(-	^Z	#7.4(6,$&"$.
10(.�-V8%1*�	
© 2025 GrazzMean