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

name : test_xml_etree.pyc
�
@��cc@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZ
ddlmZmZmZmZddlmZeaeddd�Zeddd�Zed	dd�Zd
ZdZdZd
ZdZd�Z dej!fd��YZ"e#d�Z$d�Z%d�Z&d�Z'd�Z(dej!fd��YZ)iZ*de*d<de*d<de*d<de*d <d!e*d"<d#e*d$<d%e*d&<d'e*d(<d)j+ej,ee#��e*d*<iZ-d+e-d,<d-e-d.<d/ej!fd0��YZ.d1ej!fd2��YZ/d3ej!fd4��YZ0d5ej!fd6��YZ1d7e2fd8��YZ3d9e2fd:��YZ4d;ej!fd<��YZ5d=ej!fd>��YZ6d?ej!fd@��YZ7dAej!fdB��YZ8dCej!fdD��YZ9dEej!fdF��YZ:dGej!fdH��YZ;dIej!fdJ��YZ<dKej!fdL��YZ=dMej!fdN��YZ>dOej!fdP��YZ?dQej!fdR��YZ@edS�ZAeBdTkr�eA�ndS(Ui����N(ttest_support(tTESTFNtfindfilet
gc_collectt	swap_attr(tElementTrees
simple.xmltsubdirtxmltestdatas
simple-ns.xmlsexpat224_utf8_bug.xmls�<body>
  <tag class='a'>text</tag>
  <tag class='b' />
  <section>
    <tag class='b' id='inner'>subtext</tag>
  </section>
</body>
sz<section>
  <tag class='b' id='inner'>subtext</tag>
  <nexttag />
  <nextsection>
    <tag />
  </nextsection>
</section>
sy
<body xmlns="http://effbot.org/ns">
  <tag>text</tag>
  <tag />
  <section>
    <tag>subtext</tag>
  </section>
</body>
s�
<root>
<h:table xmlns:h="hello">
  <h:tr>
    <h:td>Apples</h:td>
    <h:td>Bananas</h:td>
  </h:tr>
</h:table>

<f:table xmlns:f="foo">
  <f:name>African Coffee Table</f:name>
  <f:width>80</f:width>
  <f:length>120</f:length>
</f:table>
</root>
sy<!DOCTYPE points [
<!ENTITY % user-entities SYSTEM 'user-entities.xml'>
%user-entities;
]>
<document>&entity;</document>
cs�fd�}|S(Ncs&��fd�}tj|��|S(Ncs'tj����||�WdQXdS(N(tsupporttcheck_warnings(targstkwargs(tfiltersttest(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytnewtest]s(t	functoolstupdate_wrapper(R
R(R(R
s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt	decorator\s((RR((Rs:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
checkwarnings[st
ModuleTestcBseZd�ZRS(cCs4ddlm}ddlm}ddlm}dS(Ni����(R(tElementInclude(tElementPath(t	xml.etreeRRR(tselfRRR((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_sanityhs(t__name__t
__module__R(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyRescKsPtj�}tj|�}|j||�|r;|j�S|jd�|SdS(Ni(tStringIOtETRtwritetgetvaluetseek(telemt	to_stringtoptionstfilettree((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt	serializeps

cCsg|D]}|j^qS(N(ttag(tseqR ((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytsummarize_listzscCscx\|j�D]N}|jr7|jjdd�|_n|jr
|jjdd�|_q
q
WdS(Ns
s
(titerttexttreplacettail(R$R ((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytnormalize_crlf}s
		cs�fd�}|S(Ncs(ttk	rtjd��n�|�S(Nsonly for the Python version(RtpyETtunittesttSkipTest(R
(R
(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytwrapper�s((R
R1((R
s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytpython_only�scs�fd�}|S(Ncs(ttkrtjd��n�|�S(Nsonly for the C version(RR.R/R0(R
(R
(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR1�s((R
R1((R
s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytcet_only�stElementTreeTestcBseZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zedeeff�d��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs|jt|�|�dS(N(tassertEqualR%(RR texpected((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytserialize_check�scsp�fd���fd������fd��tjd�}�|�tj|�}�|j��tjddd�}tj|�}�jt|�d�tjddd�}�fd	���|j��|j��|j��|j	��|j
��|j��|j��|j
��|j��|j��|j��|j��|j��|j��|j��|j��|j��fd
�}||jd��||jd��||jd��||jd��||jd��||jd���jtjtj��jtjtj��jtjtj�dS(Ncs[t|�x.|D]&}�jt|�ddd|�qW|d}|d}|d dS(Nitmsgs%expected one-character string, got %rtt i(tlenR5(tstringtchart
new_string(R(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytcheck_string�s



csmt|�|j�}|j�}x|D]}||}q)Wd|d<�j|dddd|d�dS(NtvaluetkeyR8sexpected value string, got %r(R;tkeystitemsR5(tmappingRBRCRAtitem(R(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
check_mapping�s


cs�jtj|�dd��jt|d�dd��jt|d�dd��jt|d�dd��jt|d	�dd
��|j��|j�|jdk	r��|j�n|jdk	r��|j�nx|D]}�|�q�WdS(NR8snot an elementR&s
no tag membertattribsno attrib memberR*sno text memberR,sno tail member(	t
assertTrueRt	iselementthasattrR&RGR*tNoneR,(telementR (t
check_elementRFR?R(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyRM�s


R&st�gRAR@s^<Element 't\\xe4g' at 0x.*>$cs$�jt|d�dd|�dS(Nt__call__R8s%s not callable(RHRJ(tmethod(R(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytcheck_method�scs�|j�dS(N(tnext(tit(RP(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
check_iter�st*(RtElementRtgetroottassertRegexpMatchestreprtappendtextendtinserttremovetgetchildrentfindtiterfindtfindalltfindtexttcleartgettsetRBRCR)titertexttgetiteratorR5tXMLt
fromstringtPItProcessingInstructiont	XMLParsertXMLTreeBuilder(RRLR$RS((RMRFRPR?Rs:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_interface�sN	


















cCsqtjd�}|j|jd�d|_|j|jd�d|_|j|jd�|j|j�d|_|j|jd�d|_|j|jd�|j|j�d|_|j|jd�d|_|j|jd�|j|ji�idd	6d
d6|_|j|jidd	6d
d6�idd
6dd6|_|j|jidd
6dd6�dS(NR&tTagtTAGtTexttTEXTtTailtTAILtbtatdtctBtAtDtC(RRUR5R&tassertIsNoneR*R,RG(RRL((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_set_attribute�s*						!cCsStjd�}|j|d�tjd�}|j|�|j|d�|j|�|j|d�|jd|�|j|d�|j|�|j|g�|j|d�|j|�tjddd	�}|j|d
�tjd�}|j|�|j|d�|jd|�|j|d
�|j|�|j|d�|j|�|j|d
�|jt	��}|j|�WdQX|j
t|j�d�|j|d
�|||g|dd+|j|dd�|j
|dd!|d|dg�|j
|ddd�|d|dg�|dd5|j|d
�dS(Ns<body><tag/></body>s<body><tag /></body>ttag2s<body><tag /><tag2 /></body>is<body><tag2 /><tag /></body>R&RAR@s<tag key="value" />tsubtags!<tag key="value"><subtag /></tag>s+<tag key="value"><subtag /><subtag /></tag>slist.remove(x): x not in listis
<subtag />i	i(
RRgR7RURYR\R[RZtassertRaisest
ValueErrorR5tstrt	exception(RR teRLt
subelementtcm((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_simpleopssH




	

%+
	cCsO|jtjd�d�|jtjd�d�|jtjd�d�dS(Ns<tag>hello</tag>s)<tag>&#104;&#101;&#108;&#108;&#111;</tag>s<tag><![CDATA[hello]]></tag>(R7RRg(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
test_cdata7scCs�tjtjd��}tjd|�}|j|jd�jd�|j|jd�jd�tjdt�}|j|jd�jd�|j|jd�jd�dS(Nsutf-8R#R&ssection/tagRLselement/../empty-elements
empty-element(	Rt
SAMPLE_XMLtencodeRRR5R^R&tSIMPLE_XMLFILE(Rt
stringfileR$((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_file_initAscCsYddlm}tjt�}x4td�D]&}tj|�jdt|��q,Wt	|j
�}x4td�D]&}tj|�jdt|��qrW|jt	|j
�|�x4td�D]&}tj|�jdt|��q�W|jt	|j
�|�x4td�D]&}tj|�jdt|��qW|j
t	|j
�d�dS(Ni����(Ri
s./iiXi�(RRRRgR�trangeRR^R�R;t_cacheR5t
assertGreatert
assertLess(RRR titcache_len_10((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_path_cacheLs$$$$cCsddl}tjd�}|j|�}|j|�}d|jd�_|j|d�|j|d�|j|d�dS(Ni����s<tag>hello<foo/></tag>tbartfoos<tag>hello<bar /></tag>s<tag>hello<foo /></tag>(tcopyRRgtdeepcopyR^R&R7(RR�te1te2te3((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt	test_copy[scCs�tjd�}|jd�|j|jdd�d�|jdd�|j|jd�d�tjddd�}|j|jd�d�|j|jidd6�idd6}tjd|�}|j�|j|jd�d�|j|jidd6�idd6}tjd|�}|j�|j|jd�d�|j|jidd6�tjdidd6dd�}|j|jd�d�|j|jidd6�tjd�}d|_|jdd	�|jd
d�|jtj|�d�|jt	|j
��dd
g�|jt	|j��ddg�|j|jd
d�d
|jd
<d|jd<|jtj|�d�tjd�}|jdd�|jdd�|jdd�|jdd�|jtj|�d�dS(NR&RAtdefaultR@totherR
taattestattestvalttestbttest2s-<test testa="testval" testb="test2">aa</test>ttest1ttestcs;<test testa="testval" testb="test1" testc="test2">aa</test>Rus
Rts
Rws	

 Rvs

s5<test a="
" b="
&#10;" c="	&#10;
 " d="&#10;&#10;" />(R�R�(R�R�(RRURcR5RdRGRbR*ttostringtsortedRBRC(RR RG((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_attribgsT




	"


cCs�tjd�}idd6}|jd|�}|j|j|dd�|j|�|j|d�|j�|j|d�|j|�|j|d�|j||g�|j|d	�|g|(|j|d�t	|g�|(|j|d�dS(
NR&R@RARR8sattrib aliasings!<tag><subtag key="value" /></tag>s<tag />sM<tag><subtag key="value" /><subtag key="value" /><subtag key="value" /></tag>(
RRUtmakeelementtassertIsNotRGRYR7RbRZttuple(RR RGtsubelem((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_makeelement�s"



	
cCsgtjt�}t|�tj�}|j|�|j|j�d�tjt�}t|�tj�}|j|�|j|j�d�t	t��}|j
�}WdQXtj�}|j|j
d�|j|�|j|j�d�tj�}|j|�|j|j�d�tj�}tjd|�}|j|�|j|j�d�dS(Nsi<root>
   <element key="value">text</element>
   <element>text</element>tail
   <empty-element />
</root>s�<ns0:root xmlns:ns0="namespace">
   <ns0:element key="value">text</ns0:element>
   <ns0:element>text</ns0:element>tail
   <ns0:empty-element />
</ns0:root>s^Expat ttarget(RtparseR�R-RRR5RtSIMPLE_NS_XMLFILEtopentreadRkRWtversiontfeedR7tcloseRltTreeBuilder(RR$tstreamtftdatatparserR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_parsefile�s8






cCs6tjd�}|jtj|�d�tjd�}|jtj|�d�dddg}tj|�}|jtj|�d�|jdjtj|��d�|jtj|d�d�tjd�\}}|jt	|�d�tjd	�\}}|jt	|�d
�|j|dj
d�dS(Ns<html><body>text</body></html>s<html><body>stext</bos
dy></html>R9tasciisE<?xml version='1.0' encoding='ascii'?>
<html><body>text</body></html>is(<html><body id='body'>text</body></html>itbody(RRgR5R�RhtfromstringlisttjointtostringlisttXMLIDR;R&(RRLtsequencet_tids((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_parseliteral�s&c
Cstj}|t�}t|�\}}|j||jfd�|jg|D]\}}||jf^qMdddg�|j|jjd�|t�}|jg|D]\}}||jf^q�dddd g�d!}|t|�}|jg|D]\}}||jf^q�g�d"}|td|�}|jg|D]\}}||jf^qGg�d#}|t|�}|jg|D]\}}||jf^q�d$d%d&d'd(d)d*d+g�d,}|t|�}|jg|D]3\}}|d-kr||jfn	||f^q�d
d.fd/d0d1d2d3d4d5d6d7g
�d8}|t	j	d�|�}g|D]\}}||f^qs}|j|d
d9fd:g�d;}t
td��<}|jt��}|||�WdQX|j
|j�WdQX|jt|j�d�t	j	d�}	d<}||	|�}|jg|D]\}}||f^qJd
d=fd
d>fg�t	j	d�}	||	�}
t|
�\}}|j||jfd?�|jtj��}t|
�WdQX|jt|j�d�dS(@NtendRLs
empty-elementtroots{namespace}elements{namespace}empty-elements{namespace}rootteventststartsstart-nssend-nsR9t	namespaces<root xmlns=''/>tbogustrbsunknown event 'bogus's�<?xml version='1.0' encoding='iso-8859-1'?>
<body xmlns='http://&#233;ffbot.org/ns'
      xmlns:cl�='http://effbot.org/ns'>text</body>
uhttp://éffbot.org/nsucléshttp://effbot.org/nss<document />junktdocuments.junk after document element: line 1, column 12(R�RL(R�RL(R�s
empty-element(R�R�(R�s{namespace}element(R�s{namespace}element(R�s{namespace}empty-element(R�s{namespace}root(((R�R�(R�R�(R�RL(R�RL(R�RL(R�RL(R�s
empty-element(R�s
empty-element(R�R�(R�R�sstart-nssend-ns(R�R�(R9R�(R�s{namespace}root(R�s{namespace}element(R�s{namespace}element(R�s{namespace}element(R�s{namespace}element(R�s{namespace}empty-element(R�s{namespace}empty-element(R�s{namespace}root(send-nsN(sstart-nssend-ns(R9R9(send-nsN(R�R�R�(sstart-ns(R9uhttp://éffbot.org/ns(ucléshttp://effbot.org/ns(R�R�(Rt	iterparseR�RQR5R&R�R�RKRR�R�R�tassertFalsetclosedR�R�t
ParseError(RR�tcontexttactionR R�tresR�R�tsourceRR((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_iterparses�	+
+
22+
	:	
%	(	cCs�tjd�}d|_|j|d�dtj|d�_|j|d�d|_|j|d�|jdtjd	��|j|d
�tj	dd�|d<|j|d
�dS(NR&R*s<tag>text</tag>tsubtextRs'<tag>text<subtag>subtext</subtag></tag>stext<subtag>subtext</subtag>itcomments*text<!--comment--><subtag>subtext</subtag>RAR@s)text<?key value?><subtag>subtext</subtag>(
RRUR*R7t
SubElementRKR&R[tCommentRi(RR ((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_writefile]s			cCstt��}|j�}WdQXdtfd��Y}|�}tjd|�}|j|�|j|ddddddddg�tt��}|j�}WdQXdtfd	��Y}|�}tjd|�}|j|�|j|dddddddd d!d"g
�dS(#NtBuildercBs#eZd�Zd�Zd�ZRS(cSs|jd|f�dS(NR�(RY(RR&RG((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�tscSs|jd|f�dS(NR�(RY(RR&((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�vscSsdS(N((RR*((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�xs(RRR�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�ss		R�R�R�RLR�s
empty-elementcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cSs|jd|f�dS(NR�(RY(RR&RG((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��scSs|jd|f�dS(NR�(RY(RR&((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��scSsdS(N((RR*((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��scSs|jd||f�dS(Ntpi(RY(RR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��scSs|jd|f�dS(NR�(RY(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s(RRR�R�R�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s
				R�R�R�s	 comment s{namespace}roots{namespace}elements{namespace}empty-element(R�R�(R�RL(R�RL(R�RL(R�RL(R�s
empty-element(R�s
empty-element(R�R�(R�R�R�(R�s	 comment (R�s{namespace}root(R�s{namespace}element(R�s{namespace}element(R�s{namespace}element(R�s{namespace}element(R�s{namespace}empty-element(R�s{namespace}empty-element(R�s{namespace}root(	R�R�R�tlistRRkR�R5R�(RR�R�R�tbuilderR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_custom_builderns@	
	
	
	s@This method will be removed in future versions.  Use .+ instead.cCs�ttd��}tj|�}WdQX|jg|j�j�D]}t|j��^q@dddggggg�|jg|j	�D]}t|j��^q�dddggggg�tj
t�}|jt|j��d�|jt|dj��d�|j||j��|d}|d}|dd5|jt|j��d�|j||d�|j||d�||g|dd+|j||d�|j||d�|j
||d�|j�|j|j�g�dS(NtrRLs
empty-elementiiii(R�R�RR�R5RVR)R(R]RfRgR�R;tassertNotEqualRb(RR�R$R tchild1tchild2((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_getchildren�s<	+
	%
 



cCsTtjd�}|jtj|�d�tjd�}|jtj|�d�dS(Ns<html><body>text</body></html>(RRgR5R�Rh(RR ((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_writestring�sc?s�d�fd�}|dd�|dd�|dd�|dd	�|d
d�|dd
�d���fd�}dddddddddddddddddd d!d"d
d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAddBdCdDdEdFdGdHdIdJdKg?}x6|D].}�jtjtj||���dL�qBWdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_g}x*|D]"}�jttj||��q�Wd`dadbdcdddedfdgdhdig
}x-|D]%}�jtjtj||��qW�jttj�dj�jd���jttj�dk�jd��dS(lNR9cs9d||f}�jtj|j|��j|�dS(Ns0<?xml version='1.0' encoding='%s'?><xml>%s</xml>(R5RRgR�R*(tencodingR�txml(R(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytcheck�s
R�Rusus-asciis
iso-8859-1u½siso-8859-15u€tcp437u√s	mac-romanu˚cSsd|S(Ns*<?xml version='1.0' encoding='%s'?><xml />((R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��scs�|�j|�S(N(R�(R�(R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytbxml�ssutf-8s	utf-8-sigsutf-16sutf-16besutf-16les	iso8859-1s	iso8859-2s	iso8859-3s	iso8859-4s	iso8859-5s	iso8859-6s	iso8859-7s	iso8859-8s	iso8859-9s
iso8859-10s
iso8859-13s
iso8859-14s
iso8859-15s
iso8859-16tcp720tcp737tcp775tcp850tcp852tcp855tcp856tcp857tcp858tcp860tcp861tcp862tcp863tcp865tcp866tcp869tcp874tcp1006tcp1250tcp1251tcp1252tcp1253tcp1254tcp1255tcp1256tcp1257tcp1258smac-cyrillics	mac-greeksmac-icelands
mac-latin2smac-turkishs
iso2022-jpsiso2022-jp-1siso2022-jp-2siso2022-jp-2004siso2022-jp-3siso2022-jp-extskoi8-rskoi8-utptcp154s<xml />tbig5t	big5hkscstcp932tcp949tcp950seuc-jpseuc-jis-2004seuc-jisx0213seuc-krtgb2312tgbktgb18030s
iso2022-krtjohabthzs	shift-jissshift-jis-2004sshift-jisx0213sutf-7tcp037tcp424tcp500tcp864tcp875tcp1026tcp1140tutf_32t	utf_32_bet	utf_32_let	undefinedtxxx(	R5RR�RgR�R�R�R�tLookupError(RR�R�tsupported_encodingsR�t&unsupported_ascii_compatible_encodingst(unsupported_ascii_incompatible_encodings((RR�s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
test_encoding�sR





			
,					
 
#%cCs�tjd�}d|_|jt|�d�|jt|dd�d�|jt|dd�d�|jt|dd�d�|jt|dd�d	�dS(
Ns-<html><link/><script>1 &lt; 2</script></html>s
s/<html><link /><script>1 &lt; 2</script></html>
ROR�thtmls*<html><link><script>1 < 2</script></html>
R*s1 < 2
(RRgR,R5R%RK(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_methodss	cCsEtjd�}|jt|�d�|jt|dd�d�dS(Ns(<html><CamelCase>text</CamelCase></html>ROR#(RRgR5R%(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_issue18347s
cCstjd�}|jt|dd�d�|j|d�|jtj��}tjd�WdQX|jt|j�d�|jtj��}tjt	�WdQX|jt|j�d�tj
�}d|jd	<|jt	�|j
�}|j|d
�dS(Ns*<document title='&#x8230;'>test</document>R�sus-asciis*<document title="&#33328;">test</document>s<document>&entity;</document>s#undefined entity: line 1, column 10s,undefined entity &entity;: line 5, column 10R*tentitys<document>text</document>(RRgR5R%R7R�R�R�R�t
ENTITY_XMLRkR&R�R�(RR�R�R�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_entity%s"

cCs�tjd�}|j|d�tjd�}|j|d�tjd�}|j|d�tjd�}|j|d�tjt�}|j|d	�dS(
Ns<tag xml:lang='en' />s<tag xml:lang="en" />sC<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' />sC<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />s7<html:html xmlns:html='http://www.w3.org/1999/xhtml' />s7<html:html xmlns:html="http://www.w3.org/1999/xhtml" />sG<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope' />sE<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope" />s�<ns0:body xmlns:ns0="http://effbot.org/ns">
  <ns0:tag>text</ns0:tag>
  <ns0:tag />
  <ns0:section>
    <ns0:tag>subtext</ns0:tag>
  </ns0:section>
</ns0:body>(RRgR7t
SAMPLE_XML_NS(RR ((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_namespaceCs				cCs�tjd�}|j|d�tjtjd��}|j|d�tjtjdd��}|j|d�tjtjdd��}tj|tjdd��}tj|tjdd��}|j|d�|j�d|jd	<|j|d
�|j�d|jtjd	�<|j|d
�|j�d|jd	<|j|d�|j�tjd�|jd	<|j|d
�|j�tjd�}tjd�|jd<|j|�|j|�|j|d�|jt	tjdd��d�|jt	tjd��d�tjdd�}tjdd�}|j||�tjdd�}|j
||�|j
|d�|j|d�dS(Ns{uri}tags<ns0:tag xmlns:ns0="uri" />turiR&ttag1R~s;<ns0:tag xmlns:ns0="uri"><ns0:tag1 /><ns0:tag2 /></ns0:tag>R@s{uri}keys+<ns0:tag xmlns:ns0="uri" ns0:key="value" />s
{uri}values0<ns0:tag xmlns:ns0="uri" ns0:key="{uri}value" />s/<ns0:tag xmlns:ns0="uri" ns0:key="ns0:value" />s{uri2}values	{uri1}keys{<ns0:tag xmlns:ns0="uri" xmlns:ns1="uri1" xmlns:ns2="uri2"><tag ns1:key="ns2:value" /><tag ns1:key="ns2:value" /></ns0:tag>tnss{ns}tags	other-tagsns:tag(RRUR7tQNameR�RbRGRYR5R�R�(RR R�tq1tq2((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
test_qnamedsV	

	
	

	
	


	"cCstjd�}dS(Ns�<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>text</html>(RRg(RR ((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_doctype_public�scs�ddlm���fd�}|ddg�|dddg�|dd	d
g�|dd	dg�|dd
dddg�|dd
ddddg�|dddd
g�|dddddddddddddg�|dddd
g�|ddd
g�|ddddd g�|d!d!g�|d"d!dd
g�|d#d#g�|d$d#dd	d%g�|d&ddd'dg�|d(d)dd	d*d+d,d+d	d-dg
�|d.d.g�|d/d!dd0g�|d1d!dd.g�dS(2Ni����(Rcs<�jg�j|�D]\}}|p+|^q|�dS(N(R5txpath_tokenizer(tpR6topR&(RR(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s	(RTstext()R*s()s@namet@tnames@*spara[1]tparat[t1t]spara[last()]tlasts*/parat/s/doc/chapter[5]/section[2]tdoctchaptert5tsectiont2s
chapter//paras//s//paras//olist/itemtolistREt.s.//paras..s../@langtlangschapter[title]ttitles#employee[@secretary and @assistant]temployeet	secretaryR9tandt	assistants{http://spam}eggs
./spam.eggsspam.eggs.//{http://spam}egg(RR(RR�((RRs:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_xpath_tokenizer�s2	"cCs�|jtjtjdd��d�|jtjtjdd��d�|jtjtjdd��d�|jtjtjdd�d�d�dS(	NR
tinstructions<?test instruction?>s
<testing&>s<?test <testing&>?>u<testing&>ãtlatin1s<<?xml version='1.0' encoding='latin1'?>
<?test <testing&>�?>(R5RR�RjRi(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_processinginstruction�s!c
Cs�x�ddddddddd	d
ddd
g
D]�}x�||j�gD]t}d|}ttjd|�dd�}|j||�ttjd||f�dd�}|j||�qGWq.WdS(NtAREAtBASEtBASEFONTtBRtCOLtFRAMEtHRtIMGtINPUTtISINDEXtLINKtMETAtPARAMs<%s>s<%s />ROR#s	<%s></%s>(tlowerR%RRgR5(RRLR R6t
serialized((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt#test_html_empty_elems_serialization�s
	( RRR7RmR}R�R�R�R�R�R�R�R�R�R�R�R�RtDeprecationWarningtPendingDeprecationWarningR�R�R"R$R%R(R*R1R2RKRNR^(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR4�s8		Y		)	
				5		8		]		9&		:				!	A		#	s�<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>120 Mz is adequate for an average home user.</p>
  <xi:include href="disclaimer.xml"/>
</document>
sC1.xmls�<?xml version='1.0'?>
<disclaimer>
  <p>The opinions represented herein represent those of the individual
  and should not be interpreted as official policy endorsed by this
  organization.</p>
</disclaimer>
sdisclaimer.xmls�<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>This document has been accessed
  <xi:include href="count.txt" parse="text"/> times.</p>
</document>
sC2.xmlt324387s	count.txts�<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>This document has been <em>accessed</em>
  <xi:include href="count.txt" parse="text"/> times.</p>
</document>
sC2b.xmls�<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>The following is the source of the "data.xml" resource:</p>
  <example><xi:include href="data.xml" parse="text"/></example>
</document>
sC3.xmlsQ<?xml version='1.0'?>
<data>
  <item><![CDATA[Brooks & Shields]]></item>
</data>
sdata.xmlsW<?xml version='1.0'?>
<div xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="example.txt" parse="text">
    <xi:fallback>
      <xi:include href="fallback-example.txt" parse="text">
        <xi:fallback><a href="mailto:bob@example.org">Report error</a></xi:fallback>
      </xi:include>
    </xi:fallback>
  </xi:include>
</div>
sC5.xmls�<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>Example.</p>
  <xi:include href="{}"/>
</document>
sdefault.xmls�<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>120 Mz is adequate for an average home user.</p>
  <xi:include href="disclaimer.xml" parse="BAD_TYPE"/>
</document>
sB1.xmlsn<?xml version='1.0'?>
<div xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:fallback></xi:fallback>
</div>
sB2.xmltXIncludeTestcBs>eZddd�Zdd�Zd�Zd�Zd�ZRS(R�cCsPyt|}Wntk
r-td��nX|dkrLtj|�}n|S(Nsresource not foundR�(tXINCLUDEtKeyErrortIOErrorRRg(RthrefR�R�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytxinclude_loaderPs
cCsdS(N(RK(RRfR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytnone_loaderYscCsFddlm}|jd�}|j|�|jt|�d�dS(Ni����(Rsdefault.xmls�<document>
  <p>Example.</p>
  <root>
   <element key="value">text</element>
   <element>text</element>tail
   <empty-element />
</root>
</document>(RRRgtincludeR5R%(RRR>((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_xinclude_default\s

cCs]ddlm}|jd�}|j||j�|jt|�d�|jd�}|j||j�|jt|�d�|jd�}|j||j�|jt|�d�|jd	�}|j||j�|jt|�d
�|jd�}|jt��}|j||j�WdQX|jt|j	�d�|jt|�d
�dS(Ni����(RsC1.xmls<document>
  <p>120 Mz is adequate for an average home user.</p>
  <disclaimer>
  <p>The opinions represented herein represent those of the individual
  and should not be interpreted as official policy endorsed by this
  organization.</p>
</disclaimer>
</document>sC2.xmlsO<document>
  <p>This document has been accessed
  324387 times.</p>
</document>sC2b.xmlsX<document>
  <p>This document has been <em>accessed</em>
  324387 times.</p>
</document>sC3.xmls�<document>
  <p>The following is the source of the "data.xml" resource:</p>
  <example>&lt;?xml version='1.0'?&gt;
&lt;data&gt;
  &lt;item&gt;&lt;![CDATA[Brooks &amp; Shields]]&gt;&lt;/item&gt;
&lt;/data&gt;
</example>
</document>sC5.xmlsresource not foundsI<div xmlns:ns0="http://www.w3.org/2001/XInclude">
  <ns0:include href="example.txt" parse="text">
    <ns0:fallback>
      <ns0:include href="fallback-example.txt" parse="text">
        <ns0:fallback><a href="mailto:bob@example.org">Report error</a></ns0:fallback>
      </ns0:include>
    </ns0:fallback>
  </ns0:include>
</div>(
RRRgRiR5R%R�ReR�R�(RRR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
test_xincludejs.
cCs�ddlm}tjtd�}|j|j��}|j|d|j�WdQX|j	t
|j�d�tjtd�}|j|j��}|j|d|j�WdQX|j	t
|j�d�tjtd�}|j|j��}|j|d|j�WdQX|j	t
|j�d	�tjtd
�}|j|j��}|j|d|j�WdQX|j	t
|j�d�dS(Ni����(RsC1.xmltloaders%cannot load 'disclaimer.xml' as 'xml'sC2.xmls!cannot load 'count.txt' as 'text'sB1.xmls1unknown parse type in xi:include tag ('BAD_TYPE')sB2.xmlsYxi:fallback tag must be child of xi:include ('{http://www.w3.org/2001/XInclude}fallback')(
RRRRgRcR�tFatalIncludeErrorRiRhR5R�R�tXINCLUDE_BAD(RRR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_xinclude_failures�s*N(RRRKRgRhRjRkRo(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyRbNs
			@tBugsTestcBseZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
eje
j�d	�d
��Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cs��fd�}tjd�}||�tjd�}d|_||�tjd�}d|_||�tjd�}|jdd�||�tjd�}|jdd�||�dS(Ncs?�jt��}t|�WdQX�jt|j�d�dS(Nscannot serialize 123 (type int)(R�t	TypeErrorR%R5R�R�(R R�(R(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��si{R t123(RRUR*R,Rd(RR�R ((Rs:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_xmltoolkit21�s
	
	

cCsTtjt�}tj|�}|j|jd�d�|j|jd�d�dS(NR&R*ssection/tagR�(RRgR�RR5Ra(RR R$((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_xmltoolkit25�scCsTtjd�}|jt|jd��g�|jt|jd��dg�dS(Ns"<doc><table><tbody/></table></doc>s.//theads.//tbodyttbody(RRgR5R(R`(RR$((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_xmltoolkit28�scCsKtjd�}tj��*}tj|�|j|j�d�WdQXdS(Ns"<doc><table><tbody/></table></doc>s$<doc><table><tbody /></table></doc>
(RRgRtcaptured_stdouttdumpR5R(RR$tstdout((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_xmltoolkitX1�s
cCstjd�}|jtj|d�d�tjd�}|j|jidd6�|jtj|d�d�tjd�}|jtj|d�d	�tjd
�}|jtj|d�d�tjd�}|jdd�|jtj|d�d�dS(Ns2<?xml version='1.0' encoding='iso-8859-1'?><t�g />sutf-8s<täg />sD<?xml version='1.0' encoding='iso-8859-1'?><tag �ttr='v&#228;lue' />uvälueuättrs<tag ättr="välue" />s:<?xml version='1.0' encoding='iso-8859-1'?><t�g>text</t�g>s<täg>text</täg>utägR&(RRgR5R�RGRURd(RR$((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_xmltoolkit39scCs)tjd�}|jt|�d�dS(Ns=<!DOCTYPE doc [<!ENTITY ldots '&#x8230;'>]><doc>&ldots;</doc>s<doc>&#33328;</doc>(RRgR5R%(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_xmltoolkit54scCsE|jtj��}tjd�WdQX|jt|j�d�dS(Ns?<!DOCTYPE doc SYSTEM 'doc.dtd'><doc>&ldots;&ndots;&rdots;</doc>s+undefined entity &ldots;: line 1, column 36(R�RR�RgR5R�R�(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_xmltoolkit55"scCs0ddd��Y}|jttj|��dS(Nt
ExceptionFilecBseZd�ZRS(cSs
t�dS(N(Re(Rtx((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�/s(RRR�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR~.s((R�ReRR�(RR~((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_xmltoolkit60+scCsiidd6dd6}tj�}|jj|�|jd�|j�}|j|jd�jd�dS(Nu’ursquou‘ulsquosF<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE patent-application-publication SYSTEM "pap-v15-2001-01-31.dtd" []>
<patent-application-publication>
<subdoc-abstract>
<paragraph id="A-0001" lvl="0">A new cultivar of Begonia plant named &lsquo;BCT9801BEG&rsquo;.</paragraph>
</subdoc-abstract>
</patent-application-publication>s.//paragraphu7A new cultivar of Begonia plant named ‘BCT9801BEG’.(	RRlR&tupdateR�R�R5R^R*(RtENTITIESR�tt((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_xmltoolkit624ssSkips under coverage.cCsZd�}|�tjd�}xtd�D]
}|�q,W|jtjd�|�dS(NcSs:tj�}|jdi�|jd�|jd�dS(NR&R*(RR�R�R�R�(R$((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytxmltoolkit63Hs
i�(tsystgetrefcountRKR�R5(RR�tcountR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_xmltoolkit63Es	cCs�tjddd�}|jtj|�d�|jtjtj|��jd�d�|jtjtjtj|���d�dS(NtSomeTagR*sdef _f():
  return 3
s0<SomeTag text="def _f():&#10;  return 3&#10;" />(RRUR5R�RgRc(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_200708_newlineTs$$cCs�tj�}|jd�|j|j�jd�ddd��Y}tjd|��}|jd�|j|j�jd�dS(Ns<element>some text</element>RLt
EchoTargetcBs,eZd�Zd�Zd�Zd�ZRS(cSsdS(N((RR&RG((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�gscSsdS(N((RR&((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�iscSsdS(N((RR*((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�kscSs
tjd�S(NRL(RRU(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�ms(RRR�R�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�fs			R�((RRkR�R5R�R&(RR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_200708_close_s
	
cCstjd�}tj|d�}|jt|dd�d�tjd�}tj|d�}tj|d�}|jt|dd�d�tjd�}tj|d�}tj|d�}|jt��}t|dd�WdQX|jt|j�d�dS(	Ns
{default}elemtdefault_namespaceR�s%<elem xmlns="default"><elem /></elem>s{not-default}elemsI<elem xmlns="default" xmlns:ns1="not-default"><elem /><ns1:elem /></elem>R s<cannot use non-qualified names with default_namespace option(	RRUR�R5R%R�R�R�R�(RR�tsR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt!test_bug_200709_default_namespacess cCs�tjd�}|jtj|�d�tjdd�tjd�}|jtj|�d�tjd�}|jtj|�d�dS(Ns/{http://namespace.invalid/does/not/exist/}titlesB<ns0:title xmlns:ns0="http://namespace.invalid/does/not/exist/" />R�s(http://namespace.invalid/does/not/exist/sB<foo:title xmlns:foo="http://namespace.invalid/does/not/exist/" />s'{http://purl.org/dc/elements/1.1/}titles8<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/" />(RRUR5R�tregister_namespace(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt"test_bug_200709_register_namespace�scCs�tjd�}|jtjd��|j|djtj�tjd�}|jtjd��|j|djtj�dS(NRuR�i(RRURYR�R5R&Ri(RRu((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_200709_element_comment�scCs�tjd�}tj|d�}tj|d�}tjd�}|jd|�|jt|�dddg�|jd|�|jt|�ddddg�dS(NRuRtRwRvii����(RRUR�R[R5R((RRuRtRwRv((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_200709_element_insert�scCsitjd�}tj|d�}tjd�}|j|�|jt|jtj��tjg�dS(NRuRtsTEST-b(RRUR�R�RYR5R(R)(RRuRtt	comment_b((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_200709_iter_comment�s

cCsbtj�}|jd�}|jdi�}|jd�}|j�}|jt|�d�dS(NR�R&s<tag />(RR�R�R�R�R�R5R%(RtbobR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_bug_1534630�scCsZtjd�}|jtj|d�d�tjd�}|jtj|d�d�dS(Ns7<?xml version='1.0' encoding='utf-8'?><body>tãg</body>R�s<<?xml version='1.0' encoding='ascii'?>
<body>t&#227;g</body>s;<?xml version='1.0' encoding='iso-8859-1'?><body>t�g</body>(RRgR5R�(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_issue6233�scCsNtjd�}|j|jd�tj|�}|jtj|�d�dS(Ns+<prefix:localname xmlns:prefix="${stuff}"/>s{${stuff}}localnames&<ns0:localname xmlns:ns0="${stuff}" />(RRgR5R&RR�(RR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_issue3151�scCsbtjd�}|jt|�dg�tjt�}||(|jt|�dddg�dS(Ns<body><tag/></body>R&RA(RRgR5R(R�(RR tnewelem((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_issue6565�s
cCs$tjdd�tjdd�dS(Nt	test10777s
http://myuri/(RR�(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_issue10777�scCs?d|}tj|�}|j|jd�|jd��dS(Ns<a b="%s"/>Rtsutf-8(RRgR5Rctdecode(RR*R�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytcheck_expat224_utf8_bug�s
cCs6dd}|j|�ddd}|j|�dS(NsàiR(R�(RR*((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_expat224_utf8_bug�s

cCs�ttd��}|j�}WdQXtj|�}|jd�}|jd�j�}|jdd�}|dd!}|j	|jd�|�dS(NR�Rtsutf-8s
R:ii����(
R�tUTF8_BUG_XMLFILER�RRhRcR�tstripR+R5(RtfptrawR�txmlattrR*((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_expat224_utf8_bug_file�s
(RRRsRtRvRzR{R|R}R�R�R/tskipIfR�tgettraceR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyRp�s2											!						
	
							tBasicElementTestcBs5eZed��Zed��Zed��ZRS(cCsLdd	d��Y}|�}tjdd|�|_tj|�}~t�|j|��tjd�}|�}||_tj|�}tj|dd|�}~~~t�|j|��tjd�}tjd�}tjd�}|j|�|j|�|j|�tj|�}~~~t�|j|��dS(
NtDummycBseZRS((RR(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�stjoetattrR�R�R�R�((	RRUtdummyreftweakreftrefRR|R�RY(RR�RvtwrefR�R�R�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_cyclic_gcs2				


	csyg��fd�}tjd�}tj||�}|j|�jd�~|j�tg�|j|�d�dS(Ncs�jt�dS(N(RYtTrue(tw(tflag(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytwref_cb+sR�(RRUR�R�R5R&R�RK(RR�R�R�((R�s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_weakref(scCsctjddddddd�}|j|jddd	�d�|j|jd
dd	�d	�dS(NR�RityitziR�iR�(RRUR5Rc(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_get_keyword_args4s!(RRR2R�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�s$tBadElementTestcBs_eZd�Zd�Zed��Zd�Zd�Zd�Zd�Z	d�Z
d�ZRS(	cs�dtf�fd��Y}|�g�tjd�}y|j��Wntk
r[nXttkr�d|tjfd��Y}|d�g�tjd�}|j��ndS(NtXcseZe�fd��ZRS(cstjd�g�(tjS(Ntbaz(RRU(R(tL(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt	__class__>s(RRtpropertyR�((R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�=sR�tYcBseZRS((RR(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�JsR(tobjectRRURZRqR.(RR�R�R�((R�s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_extend_mutable_list<s
cs�dtf�fd��Y}|�tjd�g�tjd�}y|j��Wntk
rgnXttkr�d|tjfd��Y}|d�tjd�g�tjd�}|j��ndS(NR�cseZe�fd��ZRS(cs�2tjS(N(RRU(R(R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�Rs(RRR�R�((R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�QsR�R�R�cBseZRS((RR(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�^sR�(R�RRURZRqR.(RR�R�R�((R�s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_extend_mutable_list2Ps
cs�dtjf�fd��Y}tjd���j|d�g�|jt�jtjd��tjd���jtjd�g�|jt�j|d��dS(NR�cs eZ�fd�ZejZRS(cs�2tS(N(tFalse(Rto(R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt__eq__gs(RRR�R�t__hash__((R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�fsR�R�R�(RRURZR�R�R\(RR�((R�s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_remove_with_mutatingdsc
CsLtjd�}t|d|��%|jt��t|�WdQXWdQXdS(NR�R&(RRURR�tRuntimeErrorRX(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_recursive_reprsscs�dtf�fd��Y}tj�}|jdi�|jd�|j|d��|jd�|jd�|j��|j�jd�dS(NR�cseZ�fd�ZRS(cs#y�jWntk
rnXdS(N(R*t	NameError(R(R (s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt__del__}s
(RRR�((R (s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�|sR&tABCDtEFGHtIJKLtABCDEFGHIJKL(	R�RR�R�R�R�R�R5R*(RR�Rt((R s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_element_get_textzs


cs�dtf�fd��Y}tj�}|jdi�|jdi�|jd�|jd�|j|d��|jd�|jd�|j��|j�djd	�dS(
NR�cseZ�fd�ZRS(cs'y�djWntk
r"nXdS(Ni(R,R�(R(R (s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s
(RRR�((R (s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��sR�R&R�R�R�iR�(	R�RR�R�R�R�R�R5R,(RR�Rt((R s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_element_get_tail�s



cCs^tjd�}|jdg�|j�}|jt|�|�|jtt	ft
|�dS(NR&(RRURZRKR)tassertIsRQR�tAttributeErrorRqR�(RR�RR((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_element_iter�s
cswdd�fd��Y}tjd���jtjd���|� �jtjd���dd|��dS(NR�cseZ�fd�ZRS(cs�2dS(Ni((R(R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt	__index__�s(RRR�((R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��sR tchildii
((RRURY(RR�((R�s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_subscr�scsrdd�fd��Y}tjd��x-td�D]}�jdtjd��q5Wg�dd|��<dS(NR�cseZ�fd�ZRS(csg�(dS(Ni((R(R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s(RRR�((R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��sR i
iR�((RRUR�R[(RR�R�((R�s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_ass_subscr�s
(RRR�R�R2R�R�R�R�R�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�;s								tMutatingElementPathcBs#eZd�Zd�ZejZRS(cGstj||�}||_|S(N(R�t__new__R (tclsR R
R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s	cCs|j2tS(N(R R�(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s(RRR�R�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s		tBadElementPathcBseZd�ZejZRS(cCsdd�dS(Ng�?g((RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s(RRR�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s	tBadElementPathTestcBsPeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(cCs<tt|�j�ddlm}|j|_i|_dS(Ni����(R(tsuperR�tsetUpRRR�t
path_cache(RR((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��scCs3ddlm}|j|_tt|�j�dS(Ni����(R(RRR�R�R�R�ttearDown(RR((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��scCsBtjd�}|jtjd�g�|jt|d��dS(NR�R�R(RRURZR^R�(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_find_with_mutating�scCsWtjd�}|jtjd�g�y|jtd��Wntk
rRnXdS(NR�R�R(RRURZR^R�tZeroDivisionError(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_find_with_error�s
cCsBtjd�}|jtjd�g�|jt|d��dS(NR�R�R(RRURZRaR�(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_findtext_with_mutating�scCsWtjd�}|jtjd�g�y|jtd��Wntk
rRnXdS(NR�R�R(RRURZRaR�R�(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_findtext_with_error�s
cCsBtjd�}|jtjd�g�|jt|d��dS(NR�R�R(RRURZR`R�(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_findall_with_mutating�scCsWtjd�}|jtjd�g�y|jtd��Wntk
rRnXdS(NR�R�R(RRURZR`R�R�(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_findall_with_errors
(
RRR�R�R�R�R�R�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s							tElementTreeTypeTestcBs>eZd�Zed��Zed��Zed��ZRS(cCs�|jtjt�|jtjt�|jtjt�ttkr�|jtjt�|jtjt�|jtj	t�ndS(N(
tassertIsInstanceRR�ttypeR.RR.RUR�Rk(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_istypescCs{dtjfd��Y}|d�}|j|tj�|j||�|j|jd�d|_|j|jd�dS(Nt	MyElementcBseZRS((RR(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�sR�R�(RRUR�R5R&R*(RR�tmye((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_Element_subclass_trivials	cs�dtjf�fd��Y��didd6dd6dd	d
d�}|j|jd�|jt|j��d
dddg�dS(NR�cseZi�fd�ZRS(cs$t�|�j|d||�dS(Nt__(R�t__init__(RR&RGtextra(R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�%s(RRR�((R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�$sR�iRuiRtRwiRvitfoo__(Rui(Rti(Rwi(Rvi(RRUR5R&R�RC(RR�((R�s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt!test_Element_subclass_constructor"s
)cCs?dtjfd��Y}|d�}|j|j�d�dS(NR�cBseZd�ZRS(cSs|jS(N(R&(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt	newmethod0s(RRR�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�/sR�(RRUR5R�(RR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt test_Element_subclass_new_method-s(RRR�R2R�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�
s		tElementFindTestcBsMeZed��Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(c	Cstjttdtj���Ztjt�}|j|jd�jd�|jtj	|�jd�jd�|j|j
d�d�|j|j
d��|j|j
dd�d�|jtj	|�j
d�d�|jt|j
d��ddg�|jt|j
d��dddg�|j|jd��|j|j
d��|jt|j
d��g�WdQXdS(NRR&R*ttogR�s.//tagssection/tag(RRRt_SimpleElementPathRgR�R5R^R&RRaR|R(R`(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_simplefind8s%"%(cCsQtjt�}|j|jd�jd�|j|jd�jd�|j|jd�jd�tjt�|d<|j|jd�jd�|j|jd�d�|j|jd�d�|j|jd�d	�|j|jdd
�d	�|j|jd��|j|jdd
�d
�|jtjd�jd
�d	�dS(NR&ssection/tags./tagissection/nexttagtnexttagR*R�R9R�R�s<tag><empty /></tag>tempty(	RRgR�R5R^R&tSAMPLE_SECTIONRaR|(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_find_simpleKscCs�d}tj|�}|j|jd�jdd�|j|jd�jdd�|j|jd�jdd�|j|jd	�jdd
�|j|jd�jdd�dS(Ns�
        <body>
            <tag class='a'/>
            <tag class='b'/>
            <tag class='c'/>
            <tag class='d'/>
        </body>s./tag[1]tclassRus./tag[2]Rts
./tag[last()]Rvs./tag[last()-1]Rws./tag[last()-2](RRgR5R^RG(Rt
LINEAR_XMLR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_find_xpathbs    cCs�tjt�}tjt�|d<|jt|jd��dg�|jt|jd��ddg�|jt|jd��g�|jt|jd��g�|jt|jd��dddg�|jt|jd	��dgd
�|jt|jd��dg�|jt|jd��dgd�|jt|jd
��dddg�|jt|jd��ddddg�|jt|jd��ddddg�|jt|jd��dddg�|jt|jd��ddddg�|jt|jd��dg�|jt|jd��dg�|jt|jd��dgd�|jt|jd��dgd�|jt|jd��dgd�|jt|jd��dg�|jt|jd��dgd�|jt|jd��dg�|jt|jd��dg�|jt|jd��g�|jt|jd��g�|jt|jd ��dgd�|j|jd!�|jd��dS("NiRDR�R&R�stog/fooRTRAs.//tagissection/tagssection//tags	section/*R�tnextsections
section//*ssection/.//*s*/*s*//*s*/tags*/./tags./tags././tags.//tag[@class]is.//tag[@class="a"]s.//tag[@class="b"]s.//tag[@id]s.//section[tag]s.//section[element]s../tagssection/../tags	section//(RRgR�R�R5R(R`(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_findallssR"%"&""&&


cCs~tjt�}|jt|jd��g�|jt|jd��dgd�|jt|jd��dgd�dS(NR&s{http://effbot.org/ns}tagis.//{http://effbot.org/ns}tagi(RRgR)R5R(R`(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_test_find_with_ns�scCs9tjt�}|jtd��|jd�WdQXdS(Ns#cannot use absolute path on elements/tag(RRgR�tassertRaisesRegexptSyntaxErrorR`(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
test_bad_find�s	
cCs�tjt�}|jtj|�jd�jd�|jtj|�jd�jd�d}tj|t	f��*|jtj|�jd�jd�WdQXtjt
�|d<|jtj|�jd�jd�|jtj|�jd��|jtj|�jd��|jtj|�jd�d	�|jtj|�jd��|jtj|�jdd
�d
�|jtj|�jd�d	�tj|t	f��'|jtj|�jd�d	�WdQX|jtj|�jd�d�|jt
tj|�jd��dgd�tj|t	f��tj|�jd�}WdQX|jt
|�dgd�dS(NR&s./tags�This search is broken in 1.3 and earlier, and will be fixed in a future version.  If you rely on the current behaviour, change it to '.+'s/tagissection/tagR�stog/fooR*R�R�(RRgR�R5RR^R&RR	t
FutureWarningR�R|RaR(R`(RR�R8RR((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_find_through_ElementTree�s.%%+%""("!(
RRR2R�RRRRR	R(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�7s			,	
	tElementIterTestcBsSeZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	cCst|j|��S(N(R(R)(RR R&((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt_ilist�scCs�tjd�}|j|j|�dddg�|j|j|jd��ddg�|jt|j��jd�|jdj|j	��d�|jdj|jd�j	��d�|jt|j	��d�t
|d	t�}|jttj|��d
d�tt
krrt
|d	t�}tjdtj��}|jttj|d
|��d
d�ntjd�}|jt|j�tjd�}|jdj|j	��d�dS(Ns7<html><body>this is a <i>paragraph</i>.</body>..</html>R#R�R�R9sthis is a paragraph...sthis is a paragraph.s
this is a R!iR�R�R�s*<root>a&amp;<sub>b&amp;</sub>c&amp;</root>sa&b&c&(RRgR5R
R^RQR)R&R�ReR%R�R�R.RkR�RRKR�R�(RR>t
sourcefileR�R$((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
test_basic�s&"(!#"
cCs�tjd�}|j|j|�dg�tj|d�}|j|j|�ddg�tj|d�}|j|j|�dddg�tj|d�}|j|j|�ddddg�|d|d<|d=|j|j|�ddg�dS(NRuRtRwRvii(RRUR5R
R�(RRuRtRwRv((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_corners�s"%cCs�tjd�}|j|j|d�dgd�|j|j|d�dgd�ttkr�|jt|jdd��dgd�ndddddddg}|jt|j��|�|j|j|�|�|j|j|d	�|�dS(
NsJ
            <document>
                <house>
                    <room>bedroom1</room>
                    <room>bedroom2</room>
                </house>
                <shed>nothing here
                </shed>
                <house>
                    <room>bedroom8</room>
                </house>
            </document>troomithouseiR&R�tshedRT(RRgR5R
R.R(R)(RR>tall_tags((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_iter_by_tags	##cCsLtjsttkr>tjdtf��|j�WdQXn
|j�dS(Ns@This method will be removed in future versions.  Use .+ instead.(R�tpy3kwarningRR.RR	R`t_test_getiterator(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_getiterator"s
	
cCstjd�}|jt|jd��dgd�|jt|jd��dgd�ttkr�|jt|jdd��dgd�ndddddddg}|jt|j��|�|jt|jd��|�|jt|jd	��|�dS(
NsJ
            <document>
                <house>
                    <room>bedroom1</room>
                    <room>bedroom2</room>
                </house>
                <shed>nothing here
                </shed>
                <house>
                    <room>bedroom8</room>
                </house>
            </document>RiRiR&R�RRT(RRgR5R(RfR.RK(RR>R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR+s	cCsBtjd�}|j�}|jt��tj|�WdQXdS(NRu(RRUR)R�RqR�(RRuRR((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�KscCsltjd�}|j�}xJttjd�D]5}|jttjf��tj	||�WdQXq/WdS(NRui(
RRUR)R�tpickletHIGHEST_PROTOCOLR�Rqt
PicklingErrortdumps(RRuRRtproto((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_pickleQs
N(RRRKR
RRRRRR�R(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�s						 	tTreeBuilderTestcBs�eZdZdZd�Zd�Zed��Zed��Zed��Z	ed��Z
ed��Zed	��Z
RS(
s�<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>text<div>subtext</div>tail</html>s<toplevel>sometext</toplevel>cCs�|j|jd�|j|jd�|j|jd�|j|ji�t|�}|jt|�d�|d}|j|jd�|j|jd�|j|jd�|j|ji�dS(NR#R*iitdivR�R,(R5R&R*R,RKRGR�R;(RR�tchildrenR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt_check_sample1_elementas
cCsRddd��Y}tjd|��}|j|j�|j|j�d�dS(NtDummyBuildercBs"eZd�ZZZd�ZRS(cWsdS(N(RK(Ru((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt<lambda>pR9cSsdS(Ni*((R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�rs(RRR�R�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR#osR�i*((RRkR�tsample1R5R�(RR#R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_dummy_buildernscCsKtjdtjdd��}|j|j�|j�}|j|�dS(NR�telement_factory(RRkR�RKR�R%R�R"(RR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt$test_treebuilder_elementfactory_noneyscCszdtjfd��Y}|�}|j|jd�d�tjd|�}|j|j�|j�}|j|�dS(Nt
MyTreeBuildercBseZd�ZRS(cSs|dS(Ni((RR((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytfoobar�s(RRR*(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR)�si
iR�(	RR�R5R*RkR�R%R�R"(RR)ttbR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
test_subclass�s	csjg��fd�}tjd|�}tjd|�}|j|j�|j�|j�dg�dS(Ncs�j|�tj||�S(N(RYRRU(R&RG(tlst(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt	myfactory�s
R'R�ttoplevel(RR�RkR�tsample2R�R5(RR.R+R�((R-s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_element_factory�s
cCszdtjfd��Y}tjd|�}tjd|�}|j|j�|j�}|j||�|j|�dS(NR�cBseZRS((RR(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��sR'R�(	RRUR�RkR�R%R�R�R"(RR�R+R�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_element_factory_subclass�scCsRddd��Y}tjd|��}|j|j�|j|j�d�dS(	Nt
DoctypeParsercBs1eZdZd�Zd�ZZZd�ZRS(cSs|||f|_dS(N(t_doctype(RR7tpubidtsystem((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pytdoctype�scWsdS(N(RK(Ru((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR$�R9cSs|jS(N(R4(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��sN(	RRRKR4R7R�R�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR3�s	R�R#s&-//W3C//DTD XHTML 1.0 Transitional//ENs7http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd((R#s&-//W3C//DTD XHTML 1.0 Transitional//ENs7http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd(RRkR�R%R5R�(RR3R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_doctype�sc	Cs�dtfd��Y}tjd|��x:d
D]2}|jt��tjd||��WdQXq0Wtjd|d	t��xOdD]G}tjd||d	t��}|j|j�|j|j	��q�WdS(NtRaisingBuildercBs eZded�Zd�ZRS(cSs||_||_dS(N(traise_intwhat(RR:R;((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��s	cSs1||jkr$|j|j��nd�}|S(NcWsdS(N((R
((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pythandle�s(R:R;(RR7R<((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt__getattr__�s	N(RRRKR�R�R=(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR9�sR�R�R�R�R�R�R;(R�R�R�R�R�(R�R�R�R�R�(
R�RRkR�R�R�R�R%R|R�(RR9teventR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_builder_lookup_errors�s
 
(RRR%R0R"R&R2R(R,R1R2R8R3R?(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyRYs	
	t
XMLParserTestcBsYeZdZdZd�Zed��Zed��Zed��Zed��Z	RS(s<file><line>22</line></file>s�<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>text</html>cCsE|j|jd�|j|djd�|j|djd�dS(NR#itlinet22(R5R&R*(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt_check_sample_element�scCs�tjdtf�� tjdtj�d�}WdQX|j|j�|j	|j
��tjdddtj��}|j|j�|j	|j
��dS(Ns
.*\bhtml\bsutf-8R�R�(Rtcheck_py3k_warningsR_RRkRKR�R�R%RCR�(RR�tparser2((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_constructor_args�s!cCsIdtjfd��Y}|�}|j|j�|j|j��dS(NtMyParsercBseZRS((RR(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyRG�s(RRkR�R%RCR�(RRGR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR,�s	cCsVtj�}tjdtf��|jddd�WdQX|jd�|j�dS(NR9R#s&-//W3C//DTD XHTML 1.0 Transitional//ENs7http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtds<html/>(RRkRR	R_R7R�R�(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_doctype_warning�s

c
sg�dtjf�fd��Y}|�}tjdtf��|j|j�WdQX|j�|j�dg�g�g�t	j
��}t	jdt�dd�fd	��Y}|d
|��}|j|j�|j�|j�g�|j�d
g�WdQXdS(NtMyParserWithDoctypecseZ�fd�ZRS(cs�j|||f�dS(N(RY(RR7R5R6(R4(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR7
	s(RRR7((R4(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyRI		sR9R#s&-//W3C//DTD XHTML 1.0 Transitional//ENs7http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdterrorR3cs,eZd�ZZZZ�fd�ZRS(cWsdS(N(RK(Ru((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR$	R9cs�j|||f�dS(N(RY(RR7R5R6(t	_doctype2(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR7	s(RRR�R�R�R�R7((RK(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR3	sR�(R#s&-//W3C//DTD XHTML 1.0 Transitional//ENs7http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd((R#s&-//W3C//DTD XHTML 1.0 Transitional//ENs7http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd(RRkRR	R_R�R0R�R5twarningstcatch_warningstsimplefilter(RRIR�R3((R4RKs:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_subclass_doctype	s*	
	


	(
RRR%R0RCR2RFR,RHRO(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR@�s		tNamespaceParseTestcBseZd�ZRS(cCs�idd6dd6}tjt�}|jt|jd|��d�|jt|jd|��d�|jt|jd	|��d�dS(
NthellothR�R�s{hello}tableis.//{hello}tdis.//{foo}name(RRhtSAMPLE_XML_NS_ELEMSR5R;R`(RtnsmapR>((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_find_with_namespace)	s
""(RRRU(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyRP(	stElementSlicingTestcBsteZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
RS(cCsg|D]}|j^qS(N(R&(RtelemlistR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
_elem_tags3	scCs|jt|��S(N(RXR�(RR ((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
_subelem_tags6	scCs>tjd�}x(t|�D]}tj|d|�qW|S(sxCreate an Element with a tag 'a', with the given amount of children
           named 'a0', 'a1' ... and so on.

        Rusa%s(RRUR�R�(RtnumchildrenR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt_make_elem_with_children9	scss|jd��|j�djd�|j�djd�|jt�fd��|jt�fd��dS(Ni
ita1i����ta8cs�dS(Ni(((R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR$I	R9cs�dS(Ni�(((R�(s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR$J	R9(R[R5R&R�t
IndexError(R((R�s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_getslice_single_indexC	s
cCs�|jd�}|j|j|d�dddg�|j|j|dd!�dddg�|j|j|dd!�dddg�|j|j|dd!�ddg�|j|j|dd!�ddg�|j|j|d	 �d
dg�dS(Niita3ta4ta5iii����ita0R\(R[R5RX(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_getslice_rangeL	s&))&&cCs%|jd�}|j|j|ddd��ddg�|j|j|ddd��ddd	dg�|j|j|ddd��ddg�|j|j|ddd��d
dg�|j|j|ddtj��dg�|j|j|ddtjd>��dg�dS(Ni
iiR]ta9iRcR`ta6R\i@(R[R5RXR�tmaxsize(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_getslice_stepsV	s,2,,,cCs|jd�}|j|j|ddd��ddddg�|j|j|ddd��ddg�|j|j|ddtj��dg�|j|j|ddtjd	��dg�|j|j|ddtjd
>��dg�dS(Nii����R`ta2R\Rci����iii@(R[R5RXR�Rg(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_getslice_negative_steps`	s2,-1cCsi|jd�}|dd5|j|j|�ddg�|jd�}|d3|j|j|�g�ttkre|jd�}|ddd�=|j|j|�g�|jd�}|ddd�=|j|j|�ddg�|jd�}|d	dd�=|j|j|�ddg�|jd�}|ddd�=|j|j|�d
g�ndS(NiiiRiR`i����i����RciR\(R[R5RYRR.(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
test_delslicei	s&
cCs�|jd�}tjd�|d<|j|j|�ddddg�tjd�|d<|j|j|�ddddg�|jt��tjd	�|d
<WdQX|jt��tjd	�|d<WdQX|j|j|�ddddg�dS(NiRtiRcRiR`Rwi����Rvii����(R[RRUR5RYR�R^(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_setslice_single_index�	s%%cCs|jd�}gtd�D]}tjd|�^q|dd+|j|j|�dddd	g�|jd�}tjd
�g|dd+|j|j|�dd
d	g�|jd�}gtd�D]}tjd|�^q�|dd+|j|j|�ddddd	g�dS(Niisb%siiRctb0tb1R`Rttb2(R[R�RRUR5RY(RR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_setslice_range�	s3%"3cCs�|jd�}gtd�D]}tjd|�^q|ddd�<|j|j|�dddd	d
dg�|jd�}|jt��$tjd�g|ddd�<WdQX|jt��>gtd
�D]}tjd|�^q�|ddd�<WdQX|jt��g|ddd�<WdQX|j|j|�ddddd
dg�|jd�}tjd�g|ddtj	�<|j|j|�ddddg�tjd�g|ddtj	d>�<|j|j|�ddddg�dS(Niisb%siiRcRmRiRnRaRbRtiR\R`iRwi@(
R[R�RRUR5RYR�R�R�Rg(RR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_setslice_steps�	s 9+%?+"%&cCsA|jd�}gtd�D]}tjd|�^q|ddd�<|j|j|�dddd	g�|jd�}|jt��$tjd
�g|ddd�<WdQX|jt��>gtd�D]}tjd|�^q�|ddd�<WdQX|jt��g|ddd�<WdQX|j|j|�ddd
d	g�|jd�}tjd
�g|ddtj	�<|j|j|�dd
d
d	g�tjd�g|ddtj	d�<|j|j|�ddd
d	g�tjd�g|ddtj	d>�<|j|j|�ddd
d	g�dS(Niisb%sii����RcRnRmR`RtiR\RiiRwRvi@(
R[R�RRUR5RYR�R�R�Rg(RR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_setslice_negative_steps�	s$9%%?%#%'%'(RRRXRYR[R_RdRhRjRkRlRpRqRr(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyRV2	s			
			
	
					
	tIOTestcBsleZd�Zd�Zd�Zd�Zd�Zd�Zddd��YZd�Z	d	�Z
d
�ZRS(cCstjt�dS(N(RtunlinkR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR��	scCs�tjd�}d|_|jt|�d�|jt|dd�d�|jt|dd�d�|jt|dd�d�tjd�}d	|_|jt|�d
�|jt|dd�d
�|jt|dd�d
�|jt|dd�d�tjd�}d	|jd<|jt|�d
�|jt|dd�d
�|jt|dd�d
�|jt|dd�d�tjd�}d|_|jt|�d�|jt|dd�d�|jt|dd�d�|jt|dd�d�tjd�}d|jd<|jt|�d�|jt|dd�d�|jt|dd�d�|jt|dd�d�dS(NR&uabcs<tag>abc</tag>R�sutf-8sus-asciis
iso-8859-1s:<?xml version='1.0' encoding='iso-8859-1'?>
<tag>abc</tag>s<&"'>s<tag>&lt;&amp;"'&gt;</tag>sF<?xml version='1.0' encoding='iso-8859-1'?>
<tag>&lt;&amp;"'&gt;</tag>RAs"<tag key="&lt;&amp;&quot;'&gt;" />sN<?xml version='1.0' encoding='iso-8859-1'?>
<tag key="&lt;&amp;&quot;'&gt;" />uåöö<>s%<tag>&#229;&#246;&#246;&lt;&gt;</tag>s<tag>åöö&lt;&gt;</tag>sB<?xml version='1.0' encoding='iso-8859-1'?>
<tag>�&lt;&gt;</tag>s(<tag key="&#229;&#246;&#246;&lt;&gt;" />s<tag key="åöö&lt;&gt;" />sE<?xml version='1.0' encoding='iso-8859-1'?>
<tag key="�&lt;&gt;" />(RRUR*R5R%RG(RR ((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR"�	s^		
	
cCsWtjtjd��}|jt�ttd��}|j|j�d�WdQXdS(Ns<site />R�(RRRgRRR�R5R�(RR$R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_write_to_filename
s
cCstjtjd��}ttd��$}|j|�|j|j�WdQXttd��}|j|j	�d�WdQXdS(Ns<site />twbR�(
RRRgR�RRR�R�R5R�(RR$R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_write_to_file
s
cCsEtj�}tjd�}|j|�|j|j�jd�dS(Ns"<?xml version="1.0"?><site></site>tsite(RRRR�R5RVR&(RR$R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_read_from_stringio
s
cCsKtjtjd��}tj�}|j|�|j|j�d�dS(Ns<site />(RRRgRRR5R(RR$R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_write_to_stringio
s
tdummycBseZRS((RR(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR{"
scCs]tjd�}|j�}|j|_tj�}|j|�|j|j�jd�dS(Ns"<?xml version="1.0"?><site></site>Rx(	RR{R�RRR�R5RVR&(RR�treaderR$((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_read_from_user_reader%
s
cCsctjtjd��}tj�}|j�}|j|_|j|�|j|j�d�dS(Ns<site />(RRRgRR{RR5R(RR$R�twriter((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_write_to_user_writer-
s
cCsotjd�}|jtj|�djtj|���|jtj|d�djtj|d���dS(Ns<tag>foo</tag>R9sutf-16(RRhR5R�R�R�(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_tostringlist_invariant5
s((RRR�R"RuRwRyRzR{R}RR�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyRs�	s		;						tParseErrorTestcBs2eZd�Zd�Zd�Zed��ZRS(cCs|jtj�t�dS(N(R�RR�R(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR,@
scCs/ytj|�Wntjk
r*}|SXdS(N(RRhR�(RR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt
_get_errorC
scCsX|j|jd�jd�|j|jd�jd	�|j|jd�jd
�dS(NR�iis<tag>&foo;</tag>isfoobar<i(ii(ii(ii(R5R�tposition(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_error_positionI
scCs?ddlm}|j|j|jd�j�|jj�dS(Ni����(texpatR�(txml.parsersR�R5tErrorStringR�tcodeterrorstXML_ERROR_SYNTAX(RR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_error_codeN
s(RRR,R�R�R2R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�?
s			tKeywordArgsTestcBseZd�ZRS(cCsvtjd�}|j|jdd�|jdddd��|j|jddd�|jdddddd��|j|jdd�|jdddd��|jt|jdd��t|jdddd���|jtj	d�j
i�tj	dtdddd	��tj	dd
tdddd	��tj	dtdd�dd	�tj	ddddd	�tj	dtdddd	�dddd	�g}xC|D];}|j|jd�|j|j
tdddd	��q�Wtj
|ddd
id
d6�}|j|j
dd
�|jtd��tj	dd�WdQX|jtd��tj	dd
d�WdQXdS(Ns
<a>foo</a>Rutpatht
namespacesR�Rft#tidR�RGiR*tvalue1tkey1smust be dict, not strsI'm not a dict(RRgR5R^RKRaR`R�R_RURGtdictR&R�RRq(RRtelementsR�R�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_issue14818X
s0!0
&#(RRR�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�U
stNoAcceleratorTestcBseZd�Zd�ZRS(cCs"ttk	rtjd��ndS(Nsonly for the Python version(RR.R/R0(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�z
scCs6|jtjjtj�|jtjjtj�dS(N(R�R.RUR�ttypestFunctionTypeRk(R((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyttest_correct_import_pyET
s(RRR�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyR�y
s	cCs�|dkrt}n|attttttt	t
ttt
ttttg}ttk	rm|jtg�nddlm}tj}|j�}|j}|j�|_ztj|�Wdddlm}|j�|j|�||_daXdS(Ni����(R(RKR.RRRVR�R�R�R4RsR�RbR�R�RRR@RpRZR�RRt_namespace_mapR�R�Rtrun_unittestRbR�(tmodulettest_classesRRTt
nsmap_copyR�((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt	test_main�
sB		
		

	t__main__(CtcgiR�RtioRRR�R�R/RLR�R
RRttest.test_supportRRRRRRR.RKRR�R�R�R�R�R)RSR'RtTestCaseRR�R%R(R-R2R3R4RctformattescapeRnRbRpR�R�R�R�R�R�R�R�RRR@RPRVRsR�R�R�R�R(((s:/usr/local/python-2.7/lib/python2.7/test/test_xml_etree.pyt<module>	s�"


	

				
���_
	








�78�
4-���N
�v$7
© 2025 GrazzMean