Current File : //opt/imh-python/lib/python2.7/test/test_minidom.pyo
�
��Wc@sddlZddlZddlmZddlmZmZmZddlZddlZ	ddl
Z	ddlZ	ddl
mZm
Z
mZmZddl
mZeddd�Zd	Zed
�Zd�Zd�Zd
ejfd��YZd�Zedkre�ndS(i����N(tStringIO(tverbosetrun_unittesttfindfile(tparsetNodetDocumenttparseString(tgetDOMImplementationstest.xmltsubdirtxmltestdatas<?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>cCst�jdd|�S(Ntdoc(RtcreateDocumenttNone(tdoctype((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pytcreate_doc_without_doctypescCs�t�jddd�}g|j_g|j_tjjj	ddd�}|jjj
|�tjjjdddd�}d|_d|_
d|_|jjj
|�|S(	NRsmy-notations"http://xml.python.org/notations/mys	my-entitys!http://xml.python.org/entities/mys1.0sutf-8sus-ascii(RtcreateDocumentTypeR
tentitiest_seqt	notationstxmltdomtminidomtNotationtappendtEntitytversiontencodingtactualEncoding(Rtnotationtentity((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pytcreate_nonempty_doctype s					cCsCt�}t|�}||jjd�_||jjd�_|S(Ni(RRRtitemt
ownerDocumentR(RR((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pytcreate_doc_with_doctype0s
	tMinidomTestcBsQeZdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�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/�Z0d0�Z1d1�Z2d2�Z3d3�Z4d4�Z5d5�Z6d6�Z7d7�Z8d8�Z9d9�Z:d:�Z;d;�Z<d<�Z=d=�Z>d>�Z?d?�Z@d@�ZAdA�ZBdB�ZCdC�ZDdD�ZEdE�ZFdF�ZGdG�ZHdH�ZIdI�ZJdJ�ZKdKd^dL��YZLdM�ZMdN�ZNdO�ZOdP�ZPdQ�ZQdR�ZRdS�ZSdT�ZTdU�ZUdV�ZVdW�ZWdX�ZXdY�ZYdZ�ZZd[�Z[d\�Z\d]�Z]RS(_tTestcCs|j||�dS(N(t
assertTrue(tselfttestttestname((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pytconfirm8scCs9|j}|j||kdt|�t|�f�dS(Nslooking for %s, found %s(t	wholeTextR)trepr(R&tnodetstt((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pytcheckWholeText;s	cCsBtttt�j���}|j�|jt|t��dS(N(	RRtopenttstfiletreadtunlinkR)t
isinstanceR(R&R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestParseFromFile?s
cCsBtt�}|j|jd�|jjd�k�|j�dS(NtLI(RR1R)tgetElementsByTagNametdocumentElementR3(R&R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestGetElementsByTagNameDscCs�td�}|j}|jd}|jd�}|j||�|jt|j�dko�|jjdko�|jd|ko�|jjd�|ko�|jd|ko�|jjd�|ko�|j	|ko�|j
|ko�|j�dkd�|jd�}|j|d�|jt|j�dko�|jjdko�|jd|ko�|jjd�|ko�|jd|ko�|jjd�|ko�|j
|ko�|j
|ko�|j�d	kd�|jd
�}|j||�|jt|j�dko�|jjdko�|jd|ko�|jjd�|ko�|jd|ko�|jjd�|ko�|j|ko�|j
|ko�|j�dkd�|j�dS(
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>(RR8t
childNodest
createElementtinsertBeforeR)tlentlengthR t
firstChildt	lastChildttoxmlR
tpreviousSiblingtnextSiblingR3(R&Rtroottelemtnelemtnelem2((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestInsertBeforeJsR	
	cCs�td�}|jd�}|jd�}|jd�}|jd�}|jj|�|j�}|j|�|j|�|j|�||||||fS(Ns<doc/>toriginaltfooR;tbat(RtcreateTextNodeR8tappendChildtcreateDocumentFragment(R&Rtorigtc1tc2tc3tfrag((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt_create_fragment_test_nodesus


cCs�|j�\}}}}}}|jj|d�|jt|jj�||||fkd�|j�|j�|j�\}}}}}}|jj||�|jt|jj�||||fkd�|j�|j�dS(NsinsertBefore(<fragment>, None)sinsertBefore(<fragment>, orig)(RVR8R>R
R)ttupleR<R3(R&RRQRRRSRTRU((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestInsertBeforeFragment�s


cCsstt�}|jj|jd��|j|jjdjdk�|j|jjdjdk�|j	�dS(NuHelloi����s#commenttHello(
RR1R8ROt
createCommentR)R<tnodeNametdataR3(R&R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestAppendChild�s
  cCst|j�\}}}}}}|jj|�|jt|jj�||||fkd�|j�|j�dS(NsappendChild(<fragment>)(RVR8ROR)RWR<R3(R&RRQRRRSRTRU((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestAppendChildFragment�s
cCs~|j�\}}}}}}|jj||�|j�|jt|jj�|||fkd�|j�|j�dS(NsreplaceChild(<fragment>)(RVR8treplaceChildR3R)RWR<(R&RRQRRRSRTRU((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestReplaceChildFragment�s
$
cCs�t�}|jd�}|jd�}|jtjj|j|�|j|�|jtjj|j||�|jtjj|j	||�|j
}|jtjj|j|�|jtjj|j|�|j|�|j
�dS(NR:ttext(RR=RNtassertRaisesRRtHierarchyRequestErrROR>R_t
attributestsetNamedItemtsetNamedItemNSR3(R&RRGRatnodemap((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestLegalChildren�s 	
	
cCs�t�}|jd�}|j}d|d<|jd�}|j|j|kd�|j|j|kd�|j|jdkd�|j|jdkd�|j	�|j	�dS(	NR:R;RLis-NamedNodeMap.__setitem__() sets ownerDocuments,NamedNodeMap.__setitem__() sets ownerElements%NamedNodeMap.__setitem__() sets values)NamedNodeMap.__setitem__() sets nodeValue(
RR=RdR R)R!townerElementtvaluet	nodeValueR3(R&RRGtattrsta((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestNamedNodeMapSetItem�s		

cCsUtt�}|j|�|j|jd��|j|jdj�|j�dS(NRLi����(RR1R)RORZR<R3(R&R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestNonZero�s

cCstt�}|j�dS(N(RR1R3(R&R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt
testUnlink�scCs=t�}|j|jd��|j|j�|j�dS(Ntabc(RROR=R)R8R3(R&R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestElement�s	cCs�td�}|j}|jdd�|j|j�dkd�|jd�}|j|j|kd�|j|j|jkd�|j�dS(Ns<abc/>tspamtjam2s<abc spam="jam2"/>ttestAAAs!setAttribute() sets ownerDocuments setAttribute() sets ownerElement(	RR8tsetAttributeR)RCtgetAttributeNodeR!RiR3(R&RtelRm((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyRu�s	cCs_td�}|j}|jdd�|jdd�|j|j�dkd�|j�dS(Ns<abc/>RstjamRts<abc spam="jam2"/>ttestAAB(RR8RvR)RCR3(R&RRx((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyRz�s	cCsBt�}|j|jd��}|jdd�|j|jd�dk�|j|jdjdk�|jdd�|j|jd�dk�|j|jdjdk�|jt|j�dk�|jdd�|j|jd�dk�|j|jdjdk�|jt|j�dk�|j	�dS(NRqtdeftghitjkltmnoitnewval(
RROR=RvR)tgetAttributeRdRjR?R3(R&Rtchild((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestAddAttr�s	cCs�t�}|j|jd��}|jt|j�dk�|jdd�|jt|j�dk�|jd=|jt|j�dk�|j�dS(NRqiR{R|i(RROR=R)R?RdRvR3(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestDeleteAttrs	
cCs�t�}|j|jd��}|jdd�|jt|j�dk�|jd�|jt|j�dk�|j�dS(NRqR{R|ii(	RROR=RvR)R?RdtremoveAttributeR3(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestRemoveAttrs	
cCs�t�}|j|jdd��}|jddd�|jddd�|jt|j�dk�|jdd�|jt|j�d	k�|j�dS(
Nshttp://www.python.orgs
python:abcshttp://www.w3.orgsxmlns:pythonspython:abcattrRLitabcattri(	RROtcreateElementNStsetAttributeNSR)R?RdtremoveAttributeNSR3(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestRemoveAttrNS!s	cCs�t�}|j|jd��}|jdd�|jt|j�dk�|jd�}|j|�|jt|j�dko�|jd�dk�|j
�dS(NRLRsRyii(RROR=RvR)R?RdRwtremoveAttributeNodeR
R3(R&RR�R,((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestRemoveAttributeNode-s	
cCs�td�}|j}|jdd�|jt|j�dk�|jdd�|jd�|jt|j�dko�|jdjdko�|jdjdko�|j	d�dko�|j
d�j�d|jd<|jt|j�dkoC|jdjdkoC|jdjdkoC|j	d�dkoC|jdj�|jdd�|jt|j�dko�|jdjdko�|jdjdko�|j	d�dko�|jdjdko�|jdjdko�|j	d�dk�d	|jd<|jt|j�dko�|jdjdko�|jdjdko�|j	d�dko�|jdjd	ko�|jdjd	ko�|j	d�d	k�|j�dS(
Ns<abc/>RsRyitbamthamtspam2itbam2(
RR8RvR)R?RdtsetIdAttributeRjRkR�RwtisIdR3(R&RRx((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestChangeAttr8sD	


cCs�d}t|�}|jdd�}|jt|�dko�|djdko�|djdko�|djdko�|djdko�|djdk�|j	�dS(NsZ<foo xmlns:minidom='http://pyxml.sf.net/minidom'>
        <minidom:myelem/>
        </foo>shttp://pyxml.sf.net/minidomtmyelemiiRsminidom:myelem(
RtgetElementsByTagNameNSR)R?tnamespaceURIt	localNametprefixttagNameR[R3(R&tdRtelems((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestGetElementsByTagNameNS^s		cCs/|j||�}|jt|�dk�dS(Ni(R�R)R?(R&Rtnsuritlnametnodelist((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt5get_empty_nodelist_from_elements_by_tagName_ns_helpermscCs�td�}|j|dd�|j|dd�|j|dd�td�}|j|dd�|j|dd�|j|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&R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt+testGetEmptyNodeListFromElementsByTagNameNSrs




cCsZt�}|j|jd��}t|�}t|�}|j||k�|j�dS(NRq(RROR=R+tstrR)R3(R&RRxtstring1tstring2((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestElementReprAndStr�s	cCsZt�}|j|jd��}t|�}t|�}|j||k�|j�dS(Nuabc(RROR=R+R�R)R3(R&RRxR�R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestElementReprAndStrUnicode�s	cCspt�}|j|jdd��}t|�}t|�}|j||k�|jd|k�|j�dS(Nuhttp://www.slashdot.orgu	slash:abcs	slash:abc(RROR�R+R�R)R3(R&RRxR�R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestElementReprAndStrUnicodeNS�s	cCs`t�}|j|jd��}|jdd�}|jt|�t|�k�|j�dS(NuabcRqR{(RROR=RvR)R�R+R3(R&RRxR,((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestAttributeRepr�s
	cCs?d}t|�}|j�}|j�|j||k�dS(Ns <?xml version="1.0" ?><a b="c"/>(RRCR3R)(R&R�Rtdomstr((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestWriteXML�s

cCsQd}t|�}|jdd�}|j�|j||jdd�k�dS(Ns"<?xml version="1.0" ?>
<a b="c"/>
tnewls
s
(RttoprettyxmlR3R)treplace(R&R�RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestAltNewline�s

cCs�d}|jtd�j�|d�|jtd�j�|d�|jtd�j�|d�|jtd�j�|d	�|jtd
�j�|d�dS(Ns<?xml version="1.0" ?>
s<B>A</B>s	<B>A</B>
s<C>A<B>A</B></C>s<C>
	A
	<B>A</B>
</C>
s<C><B>A</B>A</C>s<C>
	<B>A</B>
	A
</C>
s<C><B>A</B><B>A</B></C>s<C>
	<B>A</B>
	<B>A</B>
</C>
s<C><B>A</B>A<B>A</B></C>s <C>
	<B>A</B>
	A
	<B>A</B>
</C>
(tassertEqualRR�(R&tdecl((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt test_toprettyxml_with_text_nodes�scCsut�}|jd�}|j|jd��|j|jd��|j|�d}|j|j�|d�dS(NuelemuTEXTs<?xml version="1.0" ?>
s<elem>
	TEXT
	TEXT
</elem>
(RR=RORNR�R�(R&RRGR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt)test_toprettyxml_with_adjacent_text_nodes�s	
cCswxpdD]h}t|�}t|j��}|j|jd�djdj�|jd�djdj��qWdS(Ns<B>A</B>s<A><B>C</B></A>tBi(s<B>A</B>s<A><B>C</B></A>(RR�R�R7R<RC(R&R�Rtdom2((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt/test_toprettyxml_preserves_content_of_text_node�s
cCs�td�}|jj}|j|jdko�|jdko�|jdko�|jtj	ko�|j
dko�|j�o�t
|j�dko�|jdko�|jdko�|jdko�|jtjjk�dS(Ns<e><?mypi 	
 data 	
 ?></e>tmypisdata 	
 i(RR8RAR)ttargetR\R[tnodeTypeRtPROCESSING_INSTRUCTION_NODERdR
t
hasChildNodesR?R<RBR�R�RRtEMPTY_NAMESPACE(R&Rtpi((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestProcessingInstruction�s
cCsOtd�}|jd�}|jtjj|j|�|j�|j�dS(Ns<doc/>textra(RR=RbRRRcROR3(R&RRG((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestTooManyDocumentElements�s

cCsrtd�}|j}|j}|jd�}|jd�}|j|j|��|jtj	j
|jd�dS(Ns<doc a=''/>Rm(RR8RdRwtremoveNamedItemR)t
isSameNodeRbRRtNotFoundErr(R&RR�Rlta1ta2((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestRemoveNamedItem�s		cCs{td�}|j}|j}|jdd�}|jdd�}|j|j|��|jtj	j
|jdd�dS(Ns.<doc xmlns:a='http://xml.python.org/' a:b=''/>shttp://xml.python.org/tb(RR8RdtgetAttributeNodeNStremoveNamedItemNSR)R�RbRRR�(R&RR�RlR�R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestRemoveNamedItemNS�s		cCs
|j}|j}|j�}|j�}|j�|j�|j||kd�x�tt|��D]�}|j|�}	|j|�}
|j|	|
k	o�|	j|
jko�|	j|
jko�|	j	|
j	ko�|	j
|
j
kd�|j|
j|kd�qgWdS(Ns(clone of element has same attribute keyss3clone of attribute node has proper attribute valuess'clone of attribute node correctly owned(RdtkeystsortR)trangeR?R RjRkR�R�Ri(R&te1te2R'tattrs1tattrs2tkeys1tkeys2tiR�R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt!_testCloneElementCopiesAttributes�s$		

cCs�td�}|j}|j|�}|j||d|r?dpBd�d|_|_|jdd�|jdd	�||fS(
Ns<doc attr='value'><foo/></doc>ttestCloneElementtDeeptShallowtMODIFIEDtattrs	NEW VALUEtaddedtVALUE(RR8t	cloneNodeR�R�R[Rv(R&tdeepRRFtclone((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt_setupCloneElements	cCsu|jd�\}}|jt|j�dko`|jjdko`|jdko`|j�dkd�|j�dS(Nis<doc attr="value"/>ttestCloneElementShallow(	R�R)R?R<R@t
parentNodeR
RCR3(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR�scCsu|jd�\}}|jt|j�dko`|jjdko`|jdko`|j�dkd�|j�dS(Nis<doc attr="value"><foo/></doc>ttestCloneElementDeep(	R�R)R?R<R@R�R
RCR3(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR�'scCs5td�}|jd�}|j|dkd�dS(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!(RR�R)R
(R&Rtdoc2((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestCloneDocumentShallow0scCs8td�}|jd�}|j|j|�p<|j|�d�|jt|j�t|j�kd�|j|jjtj	kd�|j|jj
j|�d�|j|jj|j�d�|jdk	r4|j|jjtj
kd�|j|jj
j|��|j|jj|j��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(RR�R)R�R?R<R8R�RtELEMENT_NODER!RR
tDOCUMENT_TYPE_NODE(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestCloneDocumentDeep<s""!cCs�t�}|jd�}|j|dk	o|j|jko|j|jko|j|jko|j|jkot|j	�t|j	�ko|j	j
t|j	��dkot|j�t|j�ko|jj
t|j��dkot|j�dk�x�t
t|j	��D]�}|j	j
|�}|j	j
|�}|j|j|�o�|j|�o�|j|jko�|j|jko�|j|jko�|j|jko�|j|jko�|j|jko�|j|jk�qWx�t
t|j��D]�}|jj
|�}|jj
|�}|j|j|�o�|j|�o�|j|jko�|j|jko�|j|jk�qWdS(Nii(RR�R)R
R[tnametpublicIdtsystemIdR?RR RR<R�R�tnotationNameRRR(R&RR�R�tsetcetsntcn((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestCloneDocumentTypeDeepOkUs@	!!cCs5t�}|jjd�}|j|dkd�dS(NittestCloneDocumentTypeDeepNotOk(R"RR�R)R
(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR�ws	cCs�t�}|jd�}|j|dk	o�|j|jko�|j|jko�|j|jko�|j|jko�t|j	�dko�|j	j
d�dko�t|j�dko�|jj
d�dko�t|j�dk�dS(Ni(
RR�R)R
R[R�R�R�R?RR RR<(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestCloneDocumentTypeShallowOk|s	cCs5t�}|jjd�}|j|dkd�dS(Nit!testCloneDocumentTypeShallowNotOk(R"RR�R)R
(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR��s	cCs;td�}td�}|jtjj|j||�dS(Ns<doc/>(RRbRRtNotSupportedErrt
importNode(R&R�ttestNametdoc1R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pytcheck_import_document�scCs|jdd�dS(NittestImportDocumentShallow(R�(R&((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR��scCs|jdd�dS(NittestImportDocumentDeep(R�(R&((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR��scCs8t�}t�}|jtjj|j|jd�dS(Ni(R"RRbRRR�R�R(R&tsrcR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestImportDocumentTypeShallow�s		cCs8t�}t�}|jtjj|j|jd�dS(Ni(R"RRbRRR�R�R(R&R�R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestImportDocumentTypeDeep�s		cCs�td�}|jjd�}|j|d�|j|�}|j|j|��|j|j|��|j|jdk|d�|j|j	j|j	�|d�|j|j
|d�dS(Ns<doc attr='value'/>R�s: ownerElement should be Nones: ownerDocument does not matchs.: cloned attribute must have specified == True(RR8RwtassertNotEqualR
R�R)R�RiR!t	specified(R&R�R�RR�R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pytcheck_clone_attribute�scCs|jdd�dS(NittestCloneAttributeShallow(R(R&((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR�scCs|jdd�dS(NittestCloneAttributeDeep(R(R&((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR�scCsitd�}|j}|j|jtj�|j|�}|j|j|jkoa|j	|j	k�dS(Ns<?target data?><doc/>(
RRAR�R�RR�R�R)R�R\(R&R�R�RR�R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pytcheck_clone_pi�s	cCs|jdd�dS(NittestClonePIShallow(R(R&((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR�scCs|jdd�dS(NittestClonePIDeep(R(R&((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR	�scCsOtd�}|j}|j|jd��|j|jd��|jt|j�dkok|jjdkd�|j�|jt|j�dko�|jjdko�|j	|j
ko�|j	jdkd�|j�td�}|j}|j|jd	��|j�|jt|j�d
ko:|jjd
kd�|j�dS(Ns<doc/>tfirsttsecondistestNormalize -- preparationitfirstsecondstestNormalize -- resulttis*testNormalize -- single empty node removed(
RR8RORNR)R?R<R@t	normalizeRARBR\R3(R&RRF((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt
testNormalize�s,	

	
cCsCtd�}|j}|j|jd��|j|jd��|j|jd��|jt|j�dko�|jjdkd�|j	�|jt|j�dko.|jjdko.|j
jdko.|j
|jk	o.|j
j
|jko.|j
jdko.|jj|j
ko.|jj
dkd	�|j�dS(
Ns<doc/>R
RR�is1testNormalizeCombineAndNextSibling -- preparationiRs-testNormalizeCombinedAndNextSibling -- result(RR8RORNR=R)R?R<R@RRAR\RBRERDR
R3(R&RRF((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt"testNormalizeCombineAndNextSibling�s&	
cCstd�}|j}|j|jd��|j|jd��|jt|j�dkok|jjdkd�|j�|jt|j�dko�|jjdko�|j	j
dko�|j	|jko�|j	jdko�|j	jdkd�|j�dS(Ns<doc/>R
R
is1testNormalizeDeleteWithPrevSibling -- preparationis,testNormalizeDeleteWithPrevSibling -- result(RR8RORNR)R?R<R@RRAR\RBRER
RDR3(R&RRF((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt"testNormalizeDeleteWithPrevSibling�s 	
cCstd�}|j}|j|jd��|j|jd��|jt|j�dkok|jjdkd�|j�|jt|j�dko�|jjdko�|j	j
dko�|j	|jko�|j	jdko�|j	jdkd�|j�dS(Ns<doc/>R
Ris1testNormalizeDeleteWithNextSibling -- preparationis,testNormalizeDeleteWithNextSibling -- result(RR8RORNR)R?R<R@RRAR\RBRER
RDR3(R&RRF((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt"testNormalizeDeleteWithNextSibling
s 	
cCs1td�}|j}|j|jd��|j|jd��|j|jd��|jt|j�dko�|jjdkd�|j	�|jt|j�dko|jjdko|j
|jk	o|j
j|jko|j
j
dko|jj
|j
ko|jjdkd�|j�dS(Ns<doc/>R�R
is1testNormalizeDeleteWithTwoSiblings -- preparationis,testNormalizeDeleteWithTwoSiblings -- result(RR8ROR=RNR)R?R<R@RRARBRERDR
R3(R&RRF((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt)testNormalizeDeleteWithTwoNonTextSiblingss$	
cCsEtd�}|j}|j|jd��|j|jd��|j|jd��|j|jd��|j|jd��|jt|j�dko�|jjdkd�|j�|jt|j�dko0|jjdko0|j	|j
ko0|j	jdko0|j	jdko0|j	jdkd	�|j�dS(
Ns<doc/>R
Rtfourthis,testNormalizeDeleteAndCombine -- preparationitsecondfourths'testNormalizeDeleteAndCombine -- result(RR8RORNR)R?R<R@RRARBR\RDR
RER3(R&RRF((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestNormalizeDeleteAndCombine0s&	
cCstd�}|j}|jdj|jd��|jdj|jd��|jdjdj|jd��|jdj|jd��|j|jd��|jt|j�dko}|jjdko}t|jdj�d	ko}|jdjjd	ko}t|jdj�dko}|jdjjdko}t|jdjdj�d
ko}|jdjdjjd
kd�|j�|jt|j�d
koe|jjd
koet|jdj�d
koe|jdjjd
koet|jdj�d
koe|jdjjd
koet|jdjdj�dkoe|jdjdjjdkd�|j|jdjdj	d
ko�|jdjdjdj	dko�|jdjdj	dkd�|j|jdjdj
dko�|jdjdj|jdjdko�|jdjdjdko�|jdjdj
|jdjdko�|jdjdj
dko�|jdjdj|jdjdko�|jdjdjdko�|jdjdj
|jdjdkd�|j
�dS(Ns)<doc><o><i/>t</o><o><o>t2</o>t3</o></doc>iR
txitx2tx3iiistestNormalize2 -- preparations$testNormalize2 -- childNodes lengthsttxtt2x2tt3x3s$testNormalize2 -- joined text fieldss"testNormalize2 -- sibling pointers(RR8R<RORNR)R?R@RR\RER
RDR3(R&RRF((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestNormalizeRecursionEsX	$#
##$#cCsJtd�}|jjd}|j|jtj�|j�|j�dS(Ns<o>text</o>i(	RR8R<R�R�Rt	TEXT_NODERR3(R&RRa((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestBug0777884�s

cCsStd�}|j}d|jd_|j�|j|jdjdkd�dS(Ns<o><i/>t</o>R
ii����s)Final child's .nextSibling should be None(RR8R<RkRR)RER
(R&RR,((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestBug1433694�s	
cCs�td�}|j}|j\}}}|j|j|ko�|jdko�|j|ko�|j|ko�|jdko�|j|kd�|j�dS(Ns<doc><?pi?>text?<elm/></doc>ttestSiblings(RR8R<R)RERDR
R3(R&RRFR�Ratelm((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR!�s	cCs�td�}|j}|jd}|j\}}|jd}|j|j|ko�|j|ko�|j|ko�|j|ko�|j|kd�|j�dS(Ns3<doc><elm1><elm2/><elm2><elm3/></elm2></elm1></doc>ittestParents(RR8R<R)R�R3(R&RRFtelm1telm2atelm2btelm3((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR#�s		

cCs�td�}|j}|d}|j|d|jd�ko�|jd�dko�|jjd�|jdko�|jjd�|jdko�|jjd�jjd�dkd�|j�dS(Ns<doc><e/><e/></doc>iistest NodeList.item()(RR<R)R R
R3(R&Rtchildrentdocelem((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestNodeListItem�s	
!c	Cs�ddlm}|j�}|j�|jdi�|jd�|jdi�|jd�|jd�|jd�|jd�|j�|j}|j	}|j
\}}}|j
d}|j|jdko=|j|ko=|j|ko=|j|ko=|j|ko=|jdko=|jdko=|jdkd�|j|j|ko�|j|ko�|j|ko�|j|ko�|j|kd�|j�dS(	Ni����(tpulldomRRatsubelmistestSAX2DOM - siblingsstestSAX2DOM - parents(txml.domR+tSAX2DOMt
startDocumenttstartElementt
characterst
endElementtendDocumenttdocumentR8R<R)RDR
RER�R3(	R&R+tsax2domRRFttext1R$ttext2ttext3((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestSAX2DOM�s:






		
cCsstd�}|j|j�dkoK|jd�dkoK|jd�dkd�|jttd�|j�dS(	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<fran�ais>Comment �a va ? Tr�s bien ?</fran�ais>(RR)RCRbtUnicodeDecodeErrorR3(R&R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt
testEncodings�s	tUserDataHandlercBseZdZd�ZRS(icCs7|j||d|�|j|dd�d|_dS(Ni(tsetUserDataR
tcalled(R&t	operationtkeyR\R�tdst((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pythandle�s(t__name__t
__module__R>RB(((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR<�scCs�t�}|jd�}|j|jd�dk�|jddd�|j|jd�dk�|jddd�|jddd�|j|jd�dk�|j|jd�dk�|jddd�|j|jd�dk�|j|jd�dk�|j�}|jdd|�|jd�}|j|jop|jd�dkop|jd�dk�|j	�|j	�|j	�dS(NR�RLiR;i
i(
RR=R)tgetUserDataR
R=R<R�R>R3(R&Rtnthandlertc((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestUserData�s*	

cCsZ|jtjj|j|dd�td�}|jtjj|j|tjjd�dS(Nshttp://xml.python.org/nss	xmlns:foos<doc/>RL(RbRRtNamespaceErrt
renameNodeRtWrongDocumentErrR�(R&RR,R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt checkRenameNodeSharedConstraintss

cCs�td�}|j}|j}|jd}|j|tjjd�}|j|jdko
|j	dko
|j
dko
|jtjjko
|j
dko
|jdko
|jd�dko
|jd�j|�o
|dj|�o
|jj|�o
|jj|��|j|dd�}|j|jdko|j	dko|j
dko|jdko|j
dko|jdko|jd�dko|jd�dko|jd�j|�o|jdd�j|�o|dj|�o|d
j|��|j|dd�}|j|jdko,|j	dko,|j
d	ko,|jdko,|j
d
ko,|jdko,|jd�dko,|jd�dko,|jd�dko,|jdd�dko,|jd�j|�o,|jdd	�j|�o,|dj|�o,|dj|��|j|tjjd�}|j|jdkoE|j	dkoE|j
dkoE|jtjjkoE|j
dkoE|jdkoE|jd�dkoE|jd�dkoE|jd�dkoE|jd�dkoE|jdd�dkoE|jd�j|�oE|dj|��|jtjj|j|dd�|j||�|j�dS(Ns<doc a='v'/>RmR�tvshttp://xml.python.org/nsRHshttp://xml.python.org/ns2sp:dR�tpR�txmlns(shttp://xml.python.org/nsRH(shttp://xml.python.org/ns2R�(RR8RdRKRRR�R)R�R[R�R
R�R�RjRwR�R!RiR�RbRJRMR3(R&RRGtattrmapR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestRenameAttributes�		

cCs/td�}|j}|j|tjjd�}|j|jdko�|jdko�|j	dko�|jtjjko�|jdko�|j
j|��|j|dd�}|j|jdko|jdko|j	dko|jdko|jdko|j
j|��|j|dd�}|j|jdko�|jdko�|j	dko�|jdko�|jdko�|j
j|��|j|tjjd	�}|j|jd	ko
|jd	ko
|j	dko
|jtjjko
|jdko
|j
j|��|j||�|j�dS(
Ns<doc/>Rmshttp://xml.python.org/nsR�shttp://xml.python.org/ns2sp:cRHROR�(RR8RKRRR�R)R�R[R�R
R�R�R!R�RMR3(R&RRG((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestRenameElementds@	cCsltjjj�jtjjdd�}|jd�}|jtjj	|j
|tjjd�|j�dS(NR�tcommentRL(RRRRRR�R
RZRbR�RKR3(R&RR,((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestRenameOther�scCs�td�}|j}|jd}|j|jtj�|j|d�|j|j	d��|j|d�|j
|jd�|�|j|d�|jd�}|j|�|j	d	�}|j|�|j|d�|j|d	�|j
d
�}|j||�|}|j|d�|j|d	�|jdd�}|j||�|}|j|d�|j|d	�|j|�|j|d
�|j|d
�dS(Ns<doc>a</doc>iRmR�tabRHtcabRTR�Rtytztcabd(RR8R<R�R�RRR/RORNR>tcreateCDATASectionRZR=R_tcreateProcessingInstructiontremoveChild(R&RRGRatsplitterR7R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt
testWholeText�s8	



cCsdtd�}|j}|j}|j|j|kd�|j||�|j|j|kd�dS(Ns<doc><e/></doc>sBefore replaceChild()sAfter replaceChild()(RR8RAR)R�R_(R&RRGR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestPatch1094164�s		cCs2d�}|�\}}}}}|jd�}|j|d�|j|d�|jt|j�dk�|�\}}}}}|jd�}|j|d�|j|d�|jt|j�dk�|�\}}}}}|jd�}|j|d�|j|dko*t|j�dk�dS(	NcSsutd�}|j}|j}|j}|j}|j|jd�|�|j|jd�|�|||||fS(Ns<doc>a<e/>d</doc>R�RH(RR8RARBRER>RNR[(RRGR6R7R^((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pytsetup�s				snew contentR�iRWiR
i(treplaceWholeTextR/R)R?R<R
(R&RaRRGR6R^R7Ra((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestReplaceWholeText�s 	
cCs�td�}|j}|j}|j|jdkoE|jtjj	k�dj
�}xQ|D]I}|j|�}|j}|jt|d�o�|jtjj	k�q\WdS(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�(
RR8t
schemaTypeR)R�R
t	namespaceRRR�tsplitRwthasattr(R&RRGR.tnamesR�Rm((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestSchemaType�s			
	cCs�td�}|j}|jd�}|jd�}|j|jd�dko_|jo_|j�|jd�|j|j|jd��o�|jo�|j�|jd�|j|j|jd��o�|j|jd��o�|jo�|j�|j	d�}d|_
|j|�|j|jd�dkoj|j|jd��oj|joj|joj|j�|j|t
jjd�|j|j|jd��o�|j�dS(Ns<doc a1='v' a2='w'/>R�R�RNtwtan(RR8RwR)tgetElementByIdR
R�R�R�tcreateAttributeRjtsetAttributeNodeRKRRR�(R&RR�R�R�ta3((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestSetIdAttributes6	

	
	
	

	cCs�d}d}td|d|d�}|j}|j|d�}|j|d�}|j|jd�dko�|jo�|j�|j|d�|j|j|jd��o�|jo�|j�|j|d�|j|j|jd��o|j|jd	��o|jo|j�|j	|d�}d|_
|j|�|j|j|jd	���|j|j�|j|j�|j|j�|j|jd�dk�|j|t
jjd
�|j|j|jd	��o�|j�dS(Nshttp://xml.python.org/ns1shttp://xml.python.org/ns2s<doc xmlns:ns1='s
' xmlns:ns2='s' ns1:a1='v' ns2:a2='w'/>R�R�RNRjRk(RR8R�R)RlR
R�tsetIdAttributeNSR�tcreateAttributeNSRjRnRKRRR�(R&tNS1tNS2RR�R�R�Ro((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestSetIdAttributeNS#s<	
		
	
cCs�d}d}td|d|d�}|j}|j|d�}|j|d�}|j|jd�dko�|jo�|j�|j|�|j|j|jd��o�|jo�|j�|j|�|j|j|jd��o|j|jd	��o|jo|j�|j	|d�}d|_
|j|�|j|j|jd	���|j|j�|j|j�|j|j�|j|jd�dk�|j|t
jjd
�|j|j|jd	��o�|j�dS(Nshttp://xml.python.org/ns1shttp://xml.python.org/ns2s<doc xmlns:ns1='s
' xmlns:ns2='s' ns1:a1='v' ns2:a2='w'/>R�R�RNRjRk(RR8R�R)RlR
R�tsetIdAttributeNodeR�RrRjRnRKRRR�(R&RsRtRR�R�R�Ro((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestSetIdAttributeNodeGs<	

	
	
	
cCs�||fg}x�|r�|j�\}}|j|j|j�|jt|j�t|j��|j|j|j�|j|j|��|j|j|��|jtj	krct|j
�t|j
�t|j�t|j�|jt|j
�t|j
��|jt|j�t|j��x�tt|j��D]}|jj
|�}|jj
|�}|j|j|j�|j|j|j�|j|j|j�|j||f�qDWx�tt|j
��D]}|j
j
|�}	|j
j
|�}
|j|	j|
j�|j|	j|
j�|j|	j|
j�|j|	|
f�q�Wn|jtjkr�|j|jj|��|j|jj|��nx>tt|j��D]'}|j|j||j|f�q�WqWdS(N(tpopR�R�R?R<R[tassertFalseR�RR�RRR�R R�R�R�RR�t
DOCUMENT_NODER%R!(R&RR�tstacktn1tn2R�tno1tno2R�R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pytassert_recursive_equalksD	"



""cCs_tt�}xLttjd�D]7}tj||�}tj|�}|j||�q WdS(Ni(RtsampleR�tpickletHIGHEST_PROTOCOLtdumpstloadsR�(R&RtprotoR-R�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestPickledDocument�s
cCs/tt�}tj|�}|j||�dS(N(RR�tcopytdeepcopyR�(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestDeepcopiedDocument�scCs6t�}|j|jd��|jt|j�dS(Nsfoo--bar(RRORZRbt
ValueErrorRC(R&R((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt(testSerializeCommentNodeWithDoubleHyphen�s	cCs>td�}t|j��}|j|jtjjk�dS(Ns$<element xmlns=''>
<foo/>
</element>(RRCR)R�RRR�(R&RR�((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyttestEmptyXMLNSValue�s((^RCRDR)R/R5R9RJRVRXR]R^R`RhRnRoRpRrRuRzR�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�RRRRRRRR	RRRRRRRRR R!R#R*R9R;R<RIRMRRRSRUR_R`RcRiRpRuRwR�R�R�R�R�(((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyR#7s�				+	
																
			&						
												
									"																					?						#				M	+	
	$				!		$	$	%			cCstt�dS(N(RR#(((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt	test_main�st__main__(R�R�Rttest.test_supportRRRtunittestR-Rtxml.dom.minidomtxml.parsers.expatRRRRRR1R�R
RRR"tTestCaseR#R�RC(((sj/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_minidom.pyt<module>s."		�����v