config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/test/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/test/test_minidom.pyc

hRc@s6ddkZddkZddkZddkZddklZddklZddkZddk	Zddk
Zddk	lZlZl
Z
lZddk	lZedjoeidZneZeiieiiedeid	Z[d
dZdZd
ZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-d Z.d!Z/d"Z0d#Z1d$Z2d%Z3d&Z4d'Z5d(Z6d)Z7d*Z8d+Z9d,Z:d-Z;d.Z<d/Z=d0Z>d1Z?d2Z@d3ZAd4ZBd5ZCd6ZDd7ZEd8ZFd9ZGd:ZHd;ZId<ZJd=ZKd>ZLd?ZMd@ZNdAZOdBZPdCZQdDZRdEZSdFZTdGZUdHZVdIZWdJZXdKZYdLZZdMZ[dNZ\dOZ]dPZ^dQZ_dRZ`dSZadTZbdUZcdVZddWZedXZfdYZgdZZhd[Zid\Zjdd]Zld^Zmd_Znd`ZodaZpdbZqdcZrddZsdeZtdfZudgZvdhZwdiZxdjZydkZzdlZ{dmZ|dnZ}doddpYZ~dqZdrZdsZdtZduZdvZdwZdxZdyZdzZd{Zd|Zd}Zd~ZeiZeigZyeiWnej
odZnXdZxeD]ZeidoeeZyeeWqeiedGeGHeiieieieeidGHhe_qXqmqmWeo#dGHxeD]ZdeGHqWndS(iN(tStringIO(tverbose(tparsetNodetDocumenttparseString(tgetDOMImplementationt__main__ittesttxmltTestcCs|pd|GHtndS(NsFailed (t	Exception(Rttestname((s-/usr/local/lib/python2.5/test/test_minidom.pytconfirms	cCs?tttti}|itt|tdS(N(	RRtopenttstfiletreadtunlinkR
t
isinstanceR(tdom((s-/usr/local/lib/python2.5/test/test_minidom.pyttestParseFromFiles
cCs?tt}t|id|iidj|idS(NtLI(RRR
tgetElementsByTagNametdocumentElementR(R((s-/usr/local/lib/python2.5/test/test_minidom.pyttestGetElementsByTagName#scCstd}|i}|id}|id}|i||tt|idjo|iidjo|id|jov|iid|jo]|id|joI|iid|jo0|i	|jo |i
|jo|idjd|id}|i|dtt|idjo|iidjo|id|jov|iid|jo]|id|joI|iid|jo0|i
|jo |i
|jo|id	jd|id
}|i||tt|idjo|iidjo|id|jov|iid|jo]|id|joI|iid|jo0|i|jo |i
|jo|idjd|idS(
Ns<doc><foo/></doc>itelementiis<doc><element/><foo/></doc>s0testInsertBefore -- node properly placed in treeis%<doc><element/><foo/><element/></doc>tbaris+<doc><element/><foo/><bar/><element/></doc>(RRt
childNodest
createElementtinsertBeforeR
tlentlengthtitemt
firstChildt	lastChildttoxmltNonetpreviousSiblingtnextSiblingR(Rtroottelemtnelemtnelem2((s-/usr/local/lib/python2.5/test/test_minidom.pyttestInsertBefore)sP	
cCstd}|id}|id}|id}|id}|ii||i}|i||i||i|||||||fS(Ns<doc/>toriginaltfooRtbat(RtcreateTextNodeRtappendChildtcreateDocumentFragment(Rtorigtc1tc2tc3tfrag((s-/usr/local/lib/python2.5/test/test_minidom.pyt_create_fragment_test_nodesSs


cCst\}}}}}}|ii|dtt|ii||||fjd|i|it\}}}}}}|ii||tt|ii||||fjd|i|idS(NsinsertBefore(<fragment>, None)sinsertBefore(<fragment>, orig)(R7RRR$R
ttupleRR(RR2R3R4R5R6((s-/usr/local/lib/python2.5/test/test_minidom.pyttestInsertBeforeFragment`s$

$
cCsmtt}|ii|idt|iididjt|iididj|i	dS(NuHellois#commenttHello(
RRRR0t
createCommentR
RtnodeNametdataR(R((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAppendChildos
cCsnt\}}}}}}|ii|tt|ii||||fjd|i|idS(NsappendChild(<fragment>)(R7RR0R
R8RR(RR2R3R4R5R6((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAppendChildFragmentvs$
cCsxt\}}}}}}|ii|||itt|ii|||fjd|i|idS(NsreplaceChild(<fragment>)(R7RtreplaceChildRR
R8R(RR2R3R4R5R6((s-/usr/local/lib/python2.5/test/test_minidom.pyttestReplaceChildFragment~s
!
cCsXt}|id}|id}y|i|Wntiij
onXdGH|i|y|i||Wntiij
onXdGHy|i||Wntiij
onXdGH|i	}y|i
|Wntiij
onXdGHy|i|Wntiij
onXdGH|i||idS(NRttexts0dom.appendChild didn't raise HierarchyRequestErrs:NamedNodeMap.setNamedItem didn't raise HierarchyRequestErrs<NamedNodeMap.setNamedItemNS didn't raise HierarchyRequestErr(
RRR/R0R	RtHierarchyRequestErrRR@t
attributestsetNamedItemtsetNamedItemNSR(RR(RBtnodemap((s-/usr/local/lib/python2.5/test/test_minidom.pyttestLegalChildrens@	
	
cCst}|id}|i}d|d<|id}t|i|jdt|i|jdt|idjdt|idjd|i	|i	dS(	NRRR-is-NamedNodeMap.__setitem__() sets ownerDocuments,NamedNodeMap.__setitem__() sets ownerElements%NamedNodeMap.__setitem__() sets values)NamedNodeMap.__setitem__() sets nodeValue(
RRRDR R
t
ownerDocumenttownerElementtvaluet	nodeValueR(RR(tattrsta((s-/usr/local/lib/python2.5/test/test_minidom.pyttestNamedNodeMapSetItems		

cCsOtt}t||i|idt|idi|idS(NR-i(RRR
R0R;RR(R((s-/usr/local/lib/python2.5/test/test_minidom.pyttestNonZeros

cCstt}|idS(N(RRR(R((s-/usr/local/lib/python2.5/test/test_minidom.pyt
testUnlinkscCs:t}|i|idt|i|idS(Ntabc(RR0RR
RR(R((s-/usr/local/lib/python2.5/test/test_minidom.pyttestElements	
cCstd}|i}|iddt|idjd|id}t|i|jdt|i|ijd|idS(Ns<abc/>tspamtjam2s<abc spam="jam2"/>ttestAAAs!setAttribute() sets ownerDocuments setAttribute() sets ownerElement(	RRtsetAttributeR
R#tgetAttributeNodeRIRJR(RtelRN((s-/usr/local/lib/python2.5/test/test_minidom.pyRVs	cCs\td}|i}|idd|iddt|idjd|idS(Ns<abc/>RTtjamRUs<abc spam="jam2"/>ttestAAB(RRRWR
R#R(RRY((s-/usr/local/lib/python2.5/test/test_minidom.pyR[s	cCs*t}|i|id}|iddt|iddjt|ididj|iddt|iddjt|ididjtt|idj|iddt|iddjt|ididjtt|idj|i	dS(NRRtdeftghitjkltmnoitnewval(
RR0RRWR
tgetAttributeRDRKRR(Rtchild((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAddAttrs	cCst}|i|id}tt|idj|iddtt|idj|id=tt|idj|idS(NRRiR\R]i(RR0RR
RRDRWR(RRb((s-/usr/local/lib/python2.5/test/test_minidom.pyttestDeleteAttrs	
cCs~t}|i|id}|iddtt|idj|idtt|idj|idS(NRRR\R]ii(	RR0RRWR
RRDtremoveAttributeR(RRb((s-/usr/local/lib/python2.5/test/test_minidom.pyttestRemoveAttrs	
cCst}|i|idd}|iddd|idddtt|idj|iddtt|id	j|idS(
Nshttp://www.python.orgs
python:abcshttp://www.w3.orgsxmlns:pythonspython:abcattrR-itabcattri(	RR0tcreateElementNStsetAttributeNSR
RRDtremoveAttributeNSR(RRb((s-/usr/local/lib/python2.5/test/test_minidom.pyttestRemoveAttrNSs	cCst}|i|id}|iddtt|idj|id}|i|tt|idjo|iddj|i
dS(NR-RTRZii(RR0RRWR
RRDRXtremoveAttributeNodeR$R(RRbtnode((s-/usr/local/lib/python2.5/test/test_minidom.pyttestRemoveAttributeNodes	
cCstd}|i}|iddtt|idj|idd|idtt|idjoT|ididjo=|ididjo&|i	ddjo|i
did|id<tt|idjoR|ididjo;|ididjo$|i	ddjo|idi|iddtt|idjo|ididjon|ididjoW|i	ddjoA|ididjo*|ididjo|i	ddjd	|id<tt|idjo|ididjon|ididjoW|i	ddjoA|idid	jo*|idid	jo|i	dd	j|idS(
Ns<abc/>RTRZitbamthamtspam2itbam2(
RRRWR
RRDtsetIdAttributeRKRLRaRXtisIdR(RRY((s-/usr/local/lib/python2.5/test/test_minidom.pyttestChangeAttr$sD	


cCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestGetAttrListJscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestGetAttrValuesMscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestGetAttrLengthOscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestGetAttributeQscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestGetAttributeNSSscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestGetAttributeNodeUscCsd}t|}|idd}tt|djoa|didjoM|didjo9|didjo%|didjo|didj|i	dS(NsR<foo xmlns:minidom='http://pyxml.sf.net/minidom'>
    <minidom:myelem/>
    </foo>shttp://pyxml.sf.net/minidomtmyelemiitminidomsminidom:myelem(
RtgetElementsByTagNameNSR
RtnamespaceURIt	localNametprefixttagNameR<R(tdRtelems((s-/usr/local/lib/python2.5/test/test_minidom.pyttestGetElementsByTagNameNSWscCs,|i||}tt|djdS(Ni(R~R
R(tdoctnsuritlnametnodelist((s-/usr/local/lib/python2.5/test/test_minidom.pyt5get_empty_nodelist_from_elements_by_tagName_ns_helperescCs|td}t|ddt|ddt|ddtd}t|ddt|ddt|d	d
dS(Ns<doc/>s"http://xml.python.org/namespaces/at	localnamet*tsplats3<doc xmlns="http://xml.python.org/splat"><e/></doc>shttp://xml.python.org/splats	not-theres#http://somewhere.else.net/not-therete(RR(R((s-/usr/local/lib/python2.5/test/test_minidom.pyt+testGetEmptyNodeListFromElementsByTagNameNSis




cCsWt}|i|id}t|}t|}t||j|idS(NRR(RR0RtreprtstrR
R(RRYtstring1tstring2((s-/usr/local/lib/python2.5/test/test_minidom.pyttestElementReprAndStrzs	cCsWt}|i|id}t|}t|}t||j|idS(Nuabc(RR0RRRR
R(RRYRR((s-/usr/local/lib/python2.5/test/test_minidom.pyt_testElementReprAndStrUnicodes	cCsst}|i|idd}t|}t|}t||jt|iddj|idS(Nuhttp://www.slashdot.orgu	slash:abcs	slash:abci(RR0RhRRR
tfindR(RRYRR((s-/usr/local/lib/python2.5/test/test_minidom.pyt_testElementReprAndStrUnicodeNSs	cCs]t}|i|id}|idd}tt|t|j|idS(NuabcRRR\(RR0RRWR
RRR(RRYRm((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAttributeReprs
	cCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestTextNodeReprscCs<d}t|}|i}|it||jdS(Ns <?xml version="1.0" ?><a b="c"/>(RR#RR
(RRtdomstr((s-/usr/local/lib/python2.5/test/test_minidom.pyttestWriteXMLs

cCsNd}t|}|idd}|it||iddjdS(Ns"<?xml version="1.0" ?>
<a b="c"/>
tnewls
s
(RttoprettyxmlRR
treplace(RRR((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAltNewlines

cCstd}|ii}t|idjo|idjo|idjo|iti	jow|i
djog|ioYt
|idjoC|idjo3|idjo#|idjo|itiijdS(Ns<e><?mypi 	
 data 	
 ?></e>tmypisdata 	
 i(RRR!R
ttargetR=R<tnodeTypeRtPROCESSING_INSTRUCTION_NODERDR$t
hasChildNodesRRR"RRR	RtEMPTY_NAMESPACE(Rtpi((s-/usr/local/lib/python2.5/test/test_minidom.pyttestProcessingInstructionscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestProcessingInstructionReprscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestTextReprscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyt
testWriteTextscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestDocumentElementscCsetd}|id}y|i|Wntiij
onXdGH|i|idS(Ns<doc/>textrasFFailed to catch expected exception when adding extra document element.(RRR0R	RRCR(RR(((s-/usr/local/lib/python2.5/test/test_minidom.pyttestTooManyDocumentElementss
cCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestCreateElementNSscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestCreateAttributeNSscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyt	testParsescCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestParseStringscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestCommentscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAttrListItemscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAttrListItemsscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAttrListItemNSscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAttrListKeysscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAttrListKeysNSscCstd}|i}|i}|id}|id}t|i|y|idWntii	j
onXdS(Ns<doc a=''/>RN(
RRRDRXtremoveNamedItemR
t
isSameNodeR	RtNotFoundErr(RRRMta1ta2((s-/usr/local/lib/python2.5/test/test_minidom.pyttestRemoveNamedItems		cCstd}|i}|i}|idd}|idd}t|i|y|iddWntii	j
onXdS(Ns.<doc xmlns:a='http://xml.python.org/' a:b=''/>shttp://xml.python.org/tb(
RRRDtgetAttributeNodeNStremoveNamedItemNSR
RR	RR(RRRMRR((s-/usr/local/lib/python2.5/test/test_minidom.pyttestRemoveNamedItemNSs		cCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAttrListValuesscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAttrListLengthscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAttrList__getitem__scCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestAttrList__setitem__scCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestSetAttrValueandNodeValuescCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestParseElementscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestParseAttributes	scCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestParseElementNamespacesscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestParseAttributeNamespaces
scCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestParseProcessingInstructionsscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestChildNodesscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestFirstChildscCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pyttestHasChildNodesscCsrtd\}}tt|idjo3|iidjo |idjo|idjd|idS(Nis<doc attr="value"/>ttestCloneElementShallow(	t_setupCloneElementR
RRRt
parentNodeR$R#R(Rtclone((s-/usr/local/lib/python2.5/test/test_minidom.pyRscCsrtd\}}tt|idjo3|iidjo |idjo|idjd|idS(Nis<doc attr="value"><foo/></doc>ttestCloneElementDeep(	RR
RRRRR$R#R(RR((s-/usr/local/lib/python2.5/test/test_minidom.pyR scCstd}|i}|i|}t||d|odpdd|_|_|idd|idd	||fS(
Ns<doc attr='value'><foo/></doc>ttestCloneElementtDeeptShallowtMODIFIEDtattrs	NEW VALUEtaddedtVALUE(RRt	cloneNodet!_testCloneElementCopiesAttributesRR<RW(tdeepRR'R((s-/usr/local/lib/python2.5/test/test_minidom.pyR)s	c
Cs|i}|i}|i}|i}|i|it||jdxtt|D]}|i|}|i|}	t||	j	oI|i|	ijo6|i|	ijo#|i	|	i	jo|i
|	i
jdt|	i|jdqdWdS(Ns(clone of element has same attribute keyss3clone of attribute node has proper attribute valuess'clone of attribute node correctly owned(RDtkeystsortR
trangeRR RKRLRRRJ(
te1te2Rtattrs1tattrs2tkeys1tkeys2tiRR((s-/usr/local/lib/python2.5/test/test_minidom.pyR5s&		

cCs2td}|id}t|djddS(Ns<?xml version='1.0'?>
<!-- comment --><!DOCTYPE doc [
<!NOTATION notation SYSTEM 'http://xml.python.org/'>
]>
<doc attr='value'/>isFtestCloneDocumentShallow: shallow cloning of documents makes no sense!(RRR
R$(Rtdoc2((s-/usr/local/lib/python2.5/test/test_minidom.pyttestCloneDocumentShallowIscCs#td}|id}t|i|p
|i|dtt|it|ijdt|iiti	jdt|ii
i|dt|ii|id|idj	oSt|iiti
jdt|ii
i|t|ii|indS(	Ns<?xml version='1.0'?>
<!-- comment --><!DOCTYPE doc [
<!NOTATION notation SYSTEM 'http://xml.python.org/'>
]>
<doc attr='value'/>is4testCloneDocumentDeep: document objects not distincts8testCloneDocumentDeep: wrong number of Document childrens:testCloneDocumentDeep: documentElement not an ELEMENT_NODEs@testCloneDocumentDeep: documentElement owner is not new documents;testCloneDocumentDeep: documentElement should not be shareds7testCloneDocumentDeep: doctype not a DOCUMENT_TYPE_NODE(RRR
RRRRRRtELEMENT_NODERItdoctypeR$tDOCUMENT_TYPE_NODE(RR((s-/usr/local/lib/python2.5/test/test_minidom.pyttestCloneDocumentDeepUs" cCst}|id}t|dj	o|i|ijo|i|ijo|i|ijo|i|ijot|i	t|i	jov|i	i
t|i	djoTt|it|ijo5|ii
t|idjot|idjxt
t|i	D]}|i	i
|}|i	i
|}t|i|o|i|o|i|ijoo|i|ijo\|i|ijoI|i|ijo6|i|ijo#|i|ijo|i|ijq"Wxt
t|iD]}|ii
|}|ii
|}t|i|oG|i|o6|i|ijo#|i|ijo|i|ijqWdS(Nii(tcreate_nonempty_doctypeRR
R$R<tnametpublicIdtsystemIdRtentitiesR t	notationsRRRtnotationNametencodingtactualEncodingtversion(RRRtsetcetsntcn((s-/usr/local/lib/python2.5/test/test_minidom.pyttestCloneDocumentTypeDeepOknsD	""cCs2t}|iid}t|djddS(NittestCloneDocumentTypeDeepNotOk(tcreate_doc_with_doctypeRRR
R$(RR((s-/usr/local/lib/python2.5/test/test_minidom.pyRs	cCst}|id}t|dj	o|i|ijo|i|ijo|i|ijo|i|ijoqt|i	djo[|i	i
ddjoBt|idjo,|ii
ddjot|idjdS(Ni(
RRR
R$R<RRRRRR RR(RR((s-/usr/local/lib/python2.5/test/test_minidom.pyttestCloneDocumentTypeShallowOks	cCs2t}|iid}t|djddS(Nit!testCloneDocumentTypeShallowNotOk(RRRR
R$(RR((s-/usr/local/lib/python2.5/test/test_minidom.pyRs	cCs\td}td}y|i||Wntiij
onXt|ddS(Ns<doc/>s4: expected NotSupportedErr when importing a document(Rt
importNodeR	RtNotSupportedErrR(RttestNametdoc1R((s-/usr/local/lib/python2.5/test/test_minidom.pytcheck_import_documentscCstdddS(NittestImportDocumentShallow(R(((s-/usr/local/lib/python2.5/test/test_minidom.pyRscCstdddS(NittestImportDocumentDeep(R(((s-/usr/local/lib/python2.5/test/test_minidom.pyRscCstidd|S(NR(RtcreateDocumentR$(R((s-/usr/local/lib/python2.5/test/test_minidom.pytcreate_doc_without_doctypescCstiddd}g|i_g|i_tiii	ddd}|iii
|tiiidddd}d|_d|_
d|_|iii
||S(	NRsmy-notations"http://xml.python.org/notations/mys	my-entitys!http://xml.python.org/entities/mys1.0sutf-8sus-ascii(RtcreateDocumentTypeR$Rt_seqRR	RR}tNotationtappendtEntityRRR(Rtnotationtentity((s-/usr/local/lib/python2.5/test/test_minidom.pyRs					cCsCt}t|}||iid_||iid_|S(Ni(RR	RR RIR(RR((s-/usr/local/lib/python2.5/test/test_minidom.pyRs
	cCsWt}t}y|i|id}Wntiij
onXtddS(Nis7testImportDocumentTypeShallow: expected NotSupportedErr(RR	RRR	RRR(tsrcRtimported((s-/usr/local/lib/python2.5/test/test_minidom.pyttestImportDocumentTypeShallows		cCsWt}t}y|i|id}Wntiij
onXtddS(Nis4testImportDocumentTypeDeep: expected NotSupportedErr(RR	RRR	RRR(RRR((s-/usr/local/lib/python2.5/test/test_minidom.pyttestImportDocumentTypeDeeps		cCstd}|iid}|dj	pt|i|}t|i|t|i|t|idj|dt|i	i|i	|dt|i
|ddS(Ns<doc attr='value'/>Rs: ownerElement should be Nones: ownerDocument does not matchs.: cloned attribute must have specified == True(RRRXR$tAssertionErrorRR
RRJRIt	specified(RRRRR((s-/usr/local/lib/python2.5/test/test_minidom.pytcheck_clone_attributes	cCstdddS(NittestCloneAttributeShallow(R(((s-/usr/local/lib/python2.5/test/test_minidom.pyRscCstdddS(NittestCloneAttributeDeep(R(((s-/usr/local/lib/python2.5/test/test_minidom.pyRscCsktd}|i}|itijpt|i|}t|i|ijo|i	|i	jdS(Ns<?target data?><doc/>(
RR!RRRRRR
RR=(RRRRR((s-/usr/local/lib/python2.5/test/test_minidom.pytcheck_clone_pis	cCstdddS(NittestClonePIShallow(R(((s-/usr/local/lib/python2.5/test/test_minidom.pyRscCstdddS(NittestClonePIDeep(R(((s-/usr/local/lib/python2.5/test/test_minidom.pyRscCsKtd}|i}|i|id|i|idtt|idjo|iidjd|itt|idjo6|iidjo#|i	|i
jo|i	idjd|itd}|i}|i|id	|itt|id
jo|iid
jd|idS(Ns<doc/>tfirsttsecondistestNormalize -- preparationitfirstsecondstestNormalize -- resulttis*testNormalize -- single empty node removed(
RRR0R/R
RRRt	normalizeR!R"R=R(RR'((s-/usr/local/lib/python2.5/test/test_minidom.pyt
testNormalizes*	

	
cCsPtd}|i}d|id_|it|ididjddS(Ns<o><i/>t</o>R iis)Final child's .nextSibling should be None(RRRRLR!R
R&R$(RRm((s-/usr/local/lib/python2.5/test/test_minidom.pyttestBug1433694)s	
cCstd}|i}|i\}}}t|i|joM|idjo=|i|jo-|i|jo|idjo
|i|jd|idS(Ns<doc><?pi?>text?<elm/></doc>ttestSiblings(RRRR
R&R%R$R(RR'RRBtelm((s-/usr/local/lib/python2.5/test/test_minidom.pyR$1s	cCstd}|i}|id}|i\}}|id}t|i|jo=|i|jo-|i|jo|i|jo
|i|jd|idS(Ns3<doc><elm1><elm2/><elm2><elm3/></elm2></elm1></doc>ittestParents(RRRR
RR(RR'telm1telm2atelm2btelm3((s-/usr/local/lib/python2.5/test/test_minidom.pyR&?s	

cCstd}|i}|d}t|d|idjox|iddjob|iid|idjoB|iid|idjo"|iidiiddjd|idS(Ns<doc><e/><e/></doc>iistest NodeList.item()(RRR
R R$R(Rtchildrentdocelem((s-/usr/local/lib/python2.5/test/test_minidom.pyttestNodeListItemNs	
  !cCsddkl}|i}|i|idh|id|idh|id|id|id|id|i|i}|i	}|i
\}}}|i
d}t|idjom|i|jo]|i|joM|i|jo=|i|jo-|idjo|idjo
|idjdt|i|jo=|i|jo-|i|jo|i|jo
|i|jd|idS(	Ni(tpulldomRRBtsubelmistestSAX2DOM - siblingsstestSAX2DOM - parents(txml.domR.tSAX2DOMt
startDocumenttstartElementt
characterst
endElementtendDocumenttdocumentRRR
R%R$R&RR(R.tsax2domRR'ttext1R'ttext2ttext3((s-/usr/local/lib/python2.5/test/test_minidom.pyttestSAX2DOMZs:






		
cCstd}t|idjo)|iddjo|iddjdytd}Wntj
onXd	GH|idS(
Ns<foo>&#x20ac;</foo>u$<?xml version="1.0" ?><foo>€</foo>sutf-8s4<?xml version="1.0" encoding="utf-8"?><foo>€</foo>siso-8859-15s8<?xml version="1.0" encoding="iso-8859-15"?><foo></foo>s"testEncodings - encoding EURO SIGNs0<franais>Comment a va ? Trs bien ?</franais>s;parsing with bad encoding should raise a UnicodeDecodeError(RR
R#tUnicodeDecodeErrorR(R((s-/usr/local/lib/python2.5/test/test_minidom.pyt
testEncodings~stUserDataHandlercBseZdZdZRS(icCs7|i||d||i|ddd|_dS(Ni(tsetUserDataR$tcalled(tselft	operationtkeyR=Rtdst((s-/usr/local/lib/python2.5/test/test_minidom.pythandles(t__name__t
__module__RARF(((s-/usr/local/lib/python2.5/test/test_minidom.pyR?scCst}|id}t|iddj|idddt|iddj|iddd|idddt|iddjt|iddj|idddt|iddjt|iddjt}|idd||id}t|io)|iddjo|iddj|i	|i	|i	dS(NRR-iRi
i(
RRR
tgetUserDataR$R@R?RRAR(Rtnthandlertc((s-/usr/local/lib/python2.5/test/test_minidom.pyttestUserDatas*		


cCstd}|i}|i}|id}|i|tiid}t|idjo|i	djo|i
djo|itiijo|i
djov|idjof|iddjoP|idi|o7|di|o#|ii|o|ii||i|dd}t|idjo|i	djo|i
djo|idjo|i
djo|idjo|iddjop|iddjoZ|idi|oA|iddi|o%|di|o|di||i|dd}t|idjo|i	djo|i
d	jo|idjo|i
d
jo|idjo|iddjo|iddjo|iddjos|idddjoZ|idi|oA|idd	i|o%|di|o|di||i|tiid}t|idjo|i	djo|i
djo|itiijo|i
djo|idjo|iddjo|iddjoo|iddjoY|iddjoC|idddjo*|idi|o|di|y|i|ddWntiij
onXd
GHt|||idS(Ns<doc a='v'/>RNRtvshttp://xml.python.org/nsRLshttp://xml.python.org/ns2sp:dRtpRtxmlnssexpected NamespaceErr(shttp://xml.python.org/nsRL(shttp://xml.python.org/ns2R(RRRDt
renameNodeR	RRR
RR<RR$RRRKRXRRIRJRtNamespaceErrt checkRenameNodeSharedConstraintsR(RR(tattrmapR((s-/usr/local/lib/python2.5/test/test_minidom.pyttestRenameAttributes		

cCs4td}|i}|i|tiid}t|idjoV|idjoF|i	djo6|itiijo |idjo|i
i||i|dd}t|idjoP|idjo@|i	djo0|idjo |idjo|i
i||i|dd}t|idjoP|idjo@|i	djo0|idjo |idjo|i
i||i|tiid	}t|id	joV|id	joF|i	djo6|itiijo |idjo|i
i|t|||idS(
Ns<doc/>RNshttp://xml.python.org/nsRshttp://xml.python.org/ns2sp:cRLROR(RRRQR	RRR
RR<RR$RRRIRRSR(RR(((s-/usr/local/lib/python2.5/test/test_minidom.pyttestRenameElements@	
c
Csy|i|ddWntiij
onXdGHtd}y|i|tiidWntiij
onXdGHdS(Nshttp://xml.python.org/nss	xmlns:foosexpected NamespaceErrs<doc/>R-sexpected WrongDocumentErr(RQR	RRRRRtWrongDocumentErr(RRmR((s-/usr/local/lib/python2.5/test/test_minidom.pyRS+scCstiiiitiidd}|id}y|i|tiidWntii	j
onXdGH|i
dS(NRtcommentR-s3expected NotSupportedErr when renaming comment node(R	RR}RRRR$R;RQRR(RRm((s-/usr/local/lib/python2.5/test/test_minidom.pyttestRenameOther<scCs6|i}t||jdt|t|fdS(Nslooking for %s, found %s(t	wholeTextR
R(Rmtstt((s-/usr/local/lib/python2.5/test/test_minidom.pytcheckWholeTextJs	cCstd}|i}|id}|itijptt|d|i|i	dt|d|i
|id|t|d|id}|i||i	d	}|i|t|dt|d	|i
d
}|i|||}t|dt|d	|idd}|i|||}t|dt|d	|i|t|d
t|d
dS(Ns<doc>a</doc>iRNRtabRLtcabRXRtxtytztcabd(RRRRRt	TEXT_NODERR]R0R/RtcreateCDATASectionR;RR@tcreateProcessingInstructiontremoveChild(RR(RBtsplitterR:R`((s-/usr/local/lib/python2.5/test/test_minidom.pyt
testWholeTextNs8	













cCs^td}|i}|i}t|i|jd|i||t|i|jddS(Ns<doc><e/></doc>sBefore replaceChild()sAfter replaceChild()(RRR!R
RR@(RR(R((s-/usr/local/lib/python2.5/test/test_minidom.pyttestPatch1094164rs		cCsd}|\}}}}}|id}t|dt|dtt|idj|\}}}}}|id}t|dt|dtt|idj|\}}}}}|id}t|dt|djot|idjdS(	NcSsutd}|i}|i}|i}|i}|i|id||i|id||||||fS(Ns<doc>a<e/>d</doc>RRL(RRR!R"R&RR/Re(RR(R9R:Rh((s-/usr/local/lib/python2.5/test/test_minidom.pytsetup~s				snew contentRiR_iR i(treplaceWholeTextR]R
RRR$(RkRR(R9RhR:RB((s-/usr/local/lib/python2.5/test/test_minidom.pyttestReplaceWholeText}s 	





cCstd}|i}|i}t|idjo|itii	jdi
}xO|D]G}|i|}|i}tt|do|itii	jqZWdS(Nsl<!DOCTYPE doc [
  <!ENTITY e1 SYSTEM 'http://xml.python.org/e1'>
  <!ENTITY e2 SYSTEM 'http://xml.python.org/e2'>
  <!ATTLIST doc id   ID       #IMPLIED 
                ref  IDREF    #IMPLIED 
                refs IDREFS   #IMPLIED 
                enum (a|b)    #IMPLIED 
                ent  ENTITY   #IMPLIED 
                ents ENTITIES #IMPLIED 
                nm   NMTOKEN  #IMPLIED 
                nms  NMTOKENS #IMPLIED 
                text CDATA    #IMPLIED 
    >
]><doc id='name' notid='name' text='splat!' enum='b'       ref='name' refs='name name' ent='e1' ents='e1 e2'       nm='123' nms='123 abc' />s+id notid text enum ref refs ent ents nm nmsR(
RRt
schemaTypeR
RR$t	namespaceR	RRtsplitRXthasattr(RR(R\tnamesRRN((s-/usr/local/lib/python2.5/test/test_minidom.pyttestSchemaTypes				cCstd}|i}|id}|id}t|iddjo|io|i|idt|i|ido|io|i|idt|i|ido*|i|ido|io|i|i	d}d|_
|i|t|iddjo6|i|ido|io|io|i|i|t
iidt|i|ido|idS(Ns<doc a1='v' a2='w'/>RRRNtwtan(RRRXR
tgetElementByIdR$RtRsRtcreateAttributeRKtsetAttributeNodeRQR	RR(RRRRta3((s-/usr/local/lib/python2.5/test/test_minidom.pyttestSetIdAttributes6	




	

cCsd}d}td|d|d}|i}|i|d}|i|d}t|iddjo|io|i|i|dt|i|ido|io|i|i|dt|i|ido*|i|id	o|io|i|i	|d}d|_
|i|t|i|id	t|it|it|it|iddj|i|t
iid
t|i|id	o|idS(Nshttp://xml.python.org/ns1shttp://xml.python.org/ns2s<doc xmlns:ns1='s
' xmlns:ns2='s' ns1:a1='v' ns2:a2='w'/>RRRNRtRu(RRRR
RvR$RttsetIdAttributeNSRtcreateAttributeNSRKRxRQR	RR(tNS1tNS2RRRRRy((s-/usr/local/lib/python2.5/test/test_minidom.pyttestSetIdAttributeNSs<	


	

cCsd}d}td|d|d}|i}|i|d}|i|d}t|iddjo|io|i|i|t|i|ido|io|i|i|t|i|ido*|i|id	o|io|i|i	|d}d|_
|i|t|i|id	t|it|it|it|iddj|i|t
iid
t|i|id	o|idS(Nshttp://xml.python.org/ns1shttp://xml.python.org/ns2s<doc xmlns:ns1='s
' xmlns:ns2='s' ns1:a1='v' ns2:a2='w'/>RRRNRtRu(RRRR
RvR$RttsetIdAttributeNodeRR|RKRxRQR	RR(R}R~RRRRRy((s-/usr/local/lib/python2.5/test/test_minidom.pyttestSetIdAttributeNodes<	




	

c	Cstd}ti|}ti|}||fg}x|o|i\}}t|i|ijoQt|it|ijo2|i	|i	jo|i
|o|i
||itijot|i
t|i
t|it|itt|i
t|i
jot|it|ijxtt|iD]y}|ii|}|ii|}t|i|ijo#|i|ijo|i|ijti||fq]Wxtt|i
D]y}|i
i|}	|i
i|}
t|	i|
ijo#|	i|
ijo|	i|
ij|i|	|
fqWn|itijo-t|ii
|o|ii
|nx>tt|iD]'}|i|i||i|fqWq<WdS(Ns<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE doc PUBLIC 'http://xml.python.org/public' 'http://xml.python.org/system' [
  <!ELEMENT e EMPTY>
  <!ENTITY ent SYSTEM 'http://xml.python.org/entity'>
]><doc attr='value'> text
<?pi sample?> <!-- comment --> <e/> </doc>(RtpickletdumpstloadstpopR
RRRR<RRRRRRR RRRtstatckR
Rt
DOCUMENT_NODERI(RR[Rtstacktn1tn2Rtno1tno2RR((s-/usr/local/lib/python2.5/test/test_minidom.pyttestPickledDocument"sR



"cCsdS(N((((s-/usr/local/lib/python2.5/test/test_minidom.pytcheck_allnodes\scCsptttidjdttio7dGHtotiidd!GHqcttiGHnht_dS(Nis"assertion: len(Node.allnodes) == 0sGarbage left over:i
(R
RRtallnodesRtitems(((s-/usr/local/lib/python2.5/test/test_minidom.pyR_ss
Test Failed: is*


**** Check for failures in these tests:s  ((tostsysRt	tracebackRttest.test_supportRR0R	txml.dom.minidomtxml.parsers.expatRRRRRRGtargvtbaset__file__tpathtjointdirnametextsepRR
RRR+R7R9R>R?RARHRORPRQRSRVR[RcRdRfRkRnRuRvRwRxRyRzR{RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR$R	RRRRRRRRRRR"R#R$R&R-R<R>R?RMRURVRSRYR]RiRjRmRsRzRRRtglobalsRRrRtfailedRtAttributeErrorRRt
startswithtfuncR
tstdouttflushtprint_exceptiontexc_infoR(((s-/usr/local/lib/python2.5/test/test_minidom.pys<module>s:"
,			*	
						#										
		&														
										
																																		"										
												$			R	+				$			!		$	$	0
	


	


Man Man