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

name : test_pyexpat.pyo
�
?��cc@s�ddlZddlZddlZddlmZddlmZddlmZm	Z	dej
fd��YZdZdej
fd	��YZ
d
ej
fd��YZdej
fd
��YZdej
fd��YZdej
fd��YZdej
fd��YZdej
fd��YZdej
fd��YZdej
fd��YZdej
fd��YZd�Zedkr�e�ndS(i����N(texpat(ttest_support(tsortdicttrun_unittesttSetAttributeTestcBsGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCstjdd�|_dS(Ntnamespace_separatort!(RtParserCreatetparser(tself((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytsetUpscCsS|j|jjt�x6dD].}||j_|j|jjt|��qWdS(Niii(iiii(tassertIsRtbuffer_texttFalsetbool(R	tx((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_buffer_texts
cCsS|j|jjt�x6dD].}||j_|j|jjt|��qWdS(Niii(iiii(RRtnamespace_prefixesR
R(R	R((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_namespace_prefixess
cCsV|j|jjtj�x6dD].}||j_|j|jjt|��q WdS(Niii(iiii(RRtreturns_unicodeRthave_unicodeR(R	R((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_returns_unicodes
cCsS|j|jjt�x6dD].}||j_|j|jjt|��qWdS(Niii(iiii(RRtordered_attributesR
R(R	R((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_ordered_attributes#s
cCsS|j|jjt�x6dD].}||j_|j|jjt|��qWdS(Niii(iiii(RRtspecified_attributesR
R(R	R((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_specified_attributes)s
cCsF|jt��d|j_WdQX|jt��|jjWdQXdS(Ni(tassertRaisestAttributeErrorRtfoo(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_invalid_attributes/s(	t__name__t
__module__R
RRRRRR(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR
s						sn<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<?xml-stylesheet href="stylesheet.css"?>
<!-- comment data -->
<!DOCTYPE quotations SYSTEM "quotations.dtd" [
<!ELEMENT root ANY>
<!NOTATION notation SYSTEM "notation.jpeg">
<!ENTITY acirc "&#226;">
<!ENTITY external_entity SYSTEM "entity.file">
<!ENTITY unparsed_entity SYSTEM "entity.file" NDATA notation>
%unparsed_entity;
]>

<root attr1="value1" attr2="value2&#8000;">
<myns:subelement xmlns:myns="http://www.python.org/namespace">
     Contents of subelements
</myns:subelement>
<sub2><![CDATA[contents of CDATA section]]></sub2>
&external_entity;
</root>
t	ParseTestcBsoeZddd��YZdddddddd	d
ddd
ddgZd�Zd�Zd�Zd�ZRS(t	OutputtercBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZRS(cCs
g|_dS(N(tout(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyt__init__PscCs,|jjdt|�dt|��dS(NsStart element: t (R"tappendtreprR(R	tnametattrs((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytStartElementHandlerSscCs|jjdt|��dS(Ns
End element: (R"R%R&(R	R'((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytEndElementHandlerWscCs3|j�}|r/|jjdt|��ndS(NsCharacter data: (tstripR"R%R&(R	tdata((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytCharacterDataHandlerZscCs,|jjdt|�dt|��dS(NsPI: R$(R"R%R&(R	ttargetR,((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytProcessingInstructionHandler_scCs,|jjdt|�dt|��dS(Ns	NS decl: R$(R"R%R&(R	tprefixturi((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytStartNamespaceDeclHandlerbscCs|jjdt|��dS(NsEnd of NS decl: (R"R%R&(R	R0((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytEndNamespaceDeclHandlerescCs|jjd�dS(NsStart of CDATA section(R"R%(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytStartCdataSectionHandlerhscCs|jjd�dS(NsEnd of CDATA section(R"R%(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytEndCdataSectionHandlerkscCs|jjdt|��dS(Ns	Comment: (R"R%R&(R	ttext((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytCommentHandlernscGs-|\}}}}|jjd|f�dS(NsNotation declared: %s(R"R%(R	targsR'tbasetsysidtpubid((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytNotationDeclHandlerqscGs0|\}}}}}|jjd|f�dS(NsUnparsed entity decl: %s(R"R%(R	R8t
entityNameR9tsystemIdtpublicIdtnotationName((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytUnparsedEntityDeclHandleruscCs|jjd�dS(NsNot standalonei(R"R%(R	tuserData((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytNotStandaloneHandleryscGs1|\}}}}|jjd|df�dS(NsExternal entity ref: %si(R"R%(R	R8tcontextR9tsysIdtpubId((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytExternalEntityRefHandler}scCsdS(N((R	RB((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytDefaultHandler�scCsdS(N((R	RB((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytDefaultHandlerExpand�s(RRR#R)R*R-R/R2R3R4R5R7R<RARCRGRHRI(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR!Os 															R)R*R-R/RAR<R2R3R7R4R5RHRIRGcCs�|j�}tjdd�}x*|jD]}t||t||��q(Wd|_|jtd�|j	}|j
|dd�|j
|dd�|j
|dd�|j
|d	d
�|j
|dd�|j
|d
d�|j
|dd�|j
|dd�|j
|dd�|j
|dd�|j
|dd�|j
|dd�|j
|dd�|j
|dd�|j
|dd �|j
|d!d"�|j
|d#d$�dS(%NRRiis,PI: 'xml-stylesheet' 'href="stylesheet.css"'sComment: ' comment data 'is<Notation declared: ('notation', None, 'notation.jpeg', None)isPUnparsed entity decl: ('unparsed_entity', None, 'entity.file', None, 'notation')isHStart element: 'root' {'attr1': 'value1', 'attr2': 'value2\xe1\xbd\x80'}is1NS decl: 'myns' 'http://www.python.org/namespace'is>Start element: 'http://www.python.org/namespace!subelement' {}is)Character data: 'Contents of subelements'is9End element: 'http://www.python.org/namespace!subelement'i	sEnd of NS decl: 'myns'i
sStart element: 'sub2' {}isStart of CDATA sectionis+Character data: 'contents of CDATA section'i
sEnd of CDATA sectionisEnd element: 'sub2'is0External entity ref: (None, 'entity.file', None)isEnd element: 'root'(R!RRt
handler_namestsetattrtgetattrRtParseR,R"tassertEqual(R	R"RR'top((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyt	test_utf8�s0		cCs�|j�}tjdd�}d|_x*|jD]}t||t||��q1W|jtd�|j	}|j
|dd�|j
|dd�|j
|dd�|j
|d	d
�|j
|dd�|j
|d
d�|j
|dd�|j
|dd�|j
|dd�|j
|dd�|j
|dd�|j
|dd�|j
|dd�|j
|dd�|j
|dd �|j
|d!d"�|j
|d#d$�dS(%NRRiis.PI: u'xml-stylesheet' u'href="stylesheet.css"'sComment: u' comment data 'is>Notation declared: (u'notation', None, u'notation.jpeg', None)isSUnparsed entity decl: (u'unparsed_entity', None, u'entity.file', None, u'notation')isGStart element: u'root' {u'attr1': u'value1', u'attr2': u'value2\u1f40'}is3NS decl: u'myns' u'http://www.python.org/namespace'is?Start element: u'http://www.python.org/namespace!subelement' {}is*Character data: u'Contents of subelements'is:End element: u'http://www.python.org/namespace!subelement'i	sEnd of NS decl: u'myns'i
sStart element: u'sub2' {}isStart of CDATA sectionis,Character data: u'contents of CDATA section'i
sEnd of CDATA sectionisEnd element: u'sub2'is1External entity ref: (None, u'entity.file', None)isEnd element: u'root'(R!RRRRJRKRLRMR,R"RN(R	R"RR'RO((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_unicode�s0		cCs4|j�}tjdd�}d|_x*|jD]}t||t||��q1Wtjt�}|j	|�|j
}|j|dd�|j|dd�|j|dd�|j|d	d
�|j|dd�|j|d
d�|j|dd�|j|dd�|j|dd�|j|dd�|j|dd�|j|dd�|j|dd�|j|dd�|j|dd �|j|d!d"�|j|d#d$�tt
jd%�}z=|j�tj�}|jt��|j	|�WdQXWdt
jt
j�XdS(&NRRiis.PI: u'xml-stylesheet' u'href="stylesheet.css"'sComment: u' comment data 'is>Notation declared: (u'notation', None, u'notation.jpeg', None)isSUnparsed entity decl: (u'unparsed_entity', None, u'entity.file', None, u'notation')isGStart element: u'root' {u'attr1': u'value1', u'attr2': u'value2\u1f40'}is3NS decl: u'myns' u'http://www.python.org/namespace'is?Start element: u'http://www.python.org/namespace!subelement' {}is*Character data: u'Contents of subelements'is:End element: u'http://www.python.org/namespace!subelement'i	sEnd of NS decl: u'myns'i
sStart element: u'sub2' {}isStart of CDATA sectionis,Character data: u'contents of CDATA section'i
sEnd of CDATA sectionisEnd element: u'sub2'is1External entity ref: (None, u'entity.file', None)isEnd element: u'root'twb(R!RRRRJRKRLtStringIOR,t	ParseFileR"RNtopenRtTESTFNtcloseRt
ValueErrortunlink(R	R"RR'tfileROtfp((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_parse_file�s@	
	
cCsytj�}tjt�}|j|�|jtj��}|j|�WdQX|jtj|j	j
�tjj�dS(N(
RRRSR,RTRterrorRNtErrorStringt	exceptiontcodeterrorstXML_ERROR_FINISHED(R	RRZtcm((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_parse_again�s
((RRR!RJRPRQR\Rd(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR Ns:				(tNamespaceSeparatorTestcBs#eZd�Zd�Zd�ZRS(cCs.tj�tjdd�tjdd�dS(NRR$(RRtNone(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyt
test_legals
cCs�ytjdd�|j�Wn)tk
rI}|jt|�d�nXytjdd�|j�Wn)tk
r�}|jt|�d�nXdS(NRi*s9ParserCreate() argument 2 must be string or None, not intstoo longsCnamespace_separator must be at most one character, omitted, or None(RRtfailt	TypeErrorRNtstrRX(R	te((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_illegal
scCstjdd�dS(NRt(RR(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_zero_lengths	(RRRgRlRn(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyRes		t
InterningTestcBseZd�ZRS(cs�tj�}g��fd�}||_||_|jdd��d}|jt��d�x!�D]}|j||k�qjWdS(Ncs�j|�dS(N(R%(R'R8(tL(s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyt	collector*ss<e> <e/> <e></e> </e>iii(RRR)R*RMRNtlent
assertTrue(R	tpRqttagtentry((Rps8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest&s		

(RRRw(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyRo%stBufferTextTestcBs�eZd�Zd�Zd�Zd�Zd�Zd�Zgd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZRS(cCs7g|_tj�|_d|j_|j|j_dS(Ni(tstuffRRRRR-(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR
7s	c	Cs3|j|j|d||jtt|�f�dS(Ns%s
stuff    = %r
expected = %r(RNRytmaptunicode(R	texpectedtlabel((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytcheck=scCs|jj|�dS(N(RyR%(R	R6((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR-BscCs]|jjd|�|jd�}|dkr>d|j_n|dkrYd|j_ndS(Ns<%s>sbuffer-texttyesitnoi(RyR%tgetRR(R	R'R(tbt((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR)EscCs|jjd|�dS(Ns</%s>(RyR%(R	R'((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR*MscCs|jjd|�dS(Ns	<!--%s-->(RyR%(R	R,((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR7PscCs1x*|D]"}t|j|t||��qWdS(N(RKRRL(R	thandlersR'((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytsetHandlersSs
cCs tj�}|j|j�dS(N(RRtassertFalseR(R	R((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_default_to_disabledWscCsC|j|jj�|jjdd�|j|jdgd�dS(Ns<a>1<b/>2<c/>3</a>it123s$buffered text not properly collapsed(RsRRRMRNRy(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_buffering_enabled[sc
CsU|jdg�|jjdd�|j|jdddddd	d
dgd�dS(
NR)s9<a>1<b buffer-text='no'/>2
3<c buffer-text='yes'/>4
5</a>is<a>t1s<b>t2s
t3s<c>s4
5s*buffering control not reacting as expected(R�RRMRNRy(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest1bs
cCs0|jjdd�|j|jdgd�dS(Ns&<a>1<b/>&lt;2&gt;<c/>&#32;
&#x20;3</a>is1<2> 
 3s$buffered text not properly collapsed(RRMRNRy(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest2kscCsO|jdg�|jjdd�|j|jdddddd	gd
�dS(NR)s<a>1<b/>2<c/>3</a>is<a>R�s<b>R�s<c>R�s buffered text not properly split(R�RRMRNRy(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest3ps!cCs[|jddg�d|j_|jjdd�|j|jddddd	d
g�dS(NR)R*s<a>1<b/>2<c/>3</a>is<a>s<b>s</b>s<c>s</c>s</a>(R�RfRR-RMRNRy(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest4vs
cCsX|jddg�|jjdd�|j|jddddd	d
ddd
g	�dS(NR)R*s<a>1<b></b>2<c/>3</a>is<a>R�s<b>s</b>R�s<c>s</c>R�s</a>(R�RRMRNRy(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest5}scCs^|jdddg�|jjdd�|j|jdddd	d
ddd
dg	d�dS(NR7R*R)s<a>1<b/>2<c></c>345</a> is<a>R�s<b>s</b>R�s<c>s</c>t345s</a>s buffered text not properly split(R�RRMRNRy(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest6�s
cCsj|jdddg�|jjdd�|j|jdddd	d
ddd
dddddg
d�dS(NR7R*R)s,<a>1<b/>2<c></c>3<!--abc-->4<!--def-->5</a> is<a>R�s<b>s</b>R�s<c>s</c>R�s
<!--abc-->t4s
<!--def-->t5s</a>s buffered text not properly split(R�RRMRNRy(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest7�s
(RRR
R~R-R)R*R7R�R�R�R�R�R�R�R�R�R�(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyRx6s 															tHandlerExceptionTestcBseZd�Zd�ZRS(cCst|��dS(N(tRuntimeError(R	R'R(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR)�scCsytj�}|j|_y|jdd�|j�Wn<tk
rt}|j|jdddd|jd�nXdS(Ns<a><b><c/></b></a>iitas*Expected RuntimeError for element 'a', buts	 found %r(RRR)RMRhR�RNR8(R	RRk((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyRw�s(RRR)Rw(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR��s	tPositionTestcBs,eZd�Zd�Zd�Zd�ZRS(cCs|jd�dS(Nts(t	check_pos(R	R'R(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR)�scCs|jd�dS(NRk(R�(R	R'((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR*�scCs�||jj|jj|jjf}|j|jt|j�kd�|j|j}|j||d||f�|jd7_dS(Nstoo many parser eventss%Expected position %s, got position %si(	RtCurrentByteIndextCurrentLineNumbertCurrentColumnNumberRstuptoRrt
expected_listRN(R	teventtposR|((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR��s		c	Csntj�|_|j|j_|j|j_d|_ddddddg|_d}|jj|d�dS(NiR�iiiiiRkiiiiis<a>
 <b>
  <c/>
 </b>
</a>(R�iii(R�iii(R�iii(Rkiii(Rkiii(Rkiii(RRRR)R*R�R�RM(R	txml((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyRw�s		(RRR)R*R�Rw(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR��s			t
sf1296433TestcBseZd�ZRS(csbddd}dtfd��Y��fd�}tj�}||_|jt|j|�dS(Ns1<?xml version='1.0' encoding='iso8859'?><s>%s</s>R�itSpecificExceptioncBseZRS((RR(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR��scs
��dS(N((R6(R�(s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pythandler�s(t	ExceptionRRR-RRM(R	R�R�R((R�s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_parse_only_xml_data�s	(RRR�(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR��stChardataBufferTestcBsheZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(s.
    test setting of chardata buffer size
    cCs|j|jd�d�dS(Nii(RNtsmall_buffer_test(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_1025_bytes�scCs|j|jd�d�dS(Ni�i(RNR�(R	((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_1000_bytes�sc	Cs�tj�}d|_|jt��d|_WdQX|jt��d|_WdQX|jt��d|_WdQX|jt��tjd|_WdQXdS(Nii����ig�@(	RRRRRXtbuffer_sizeRitsystmaxint(R	R((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_wrong_size�s	cCs�ddd}ddd}tj�}|j|_d|_d|_d|_|j|�|j|jd�|j|_|j|jd�|j|�|j|jd�dS(Ns-<?xml version='1.0' encoding='iso8859'?><s>%sR�is</s>iii(	RRtcounting_handlerR-R�RtnRMRN(R	txml1txml2R((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_unchanged_size�s			

cCs[ddd}dd}ddd}tj�}|j|_d|_d|_|j|jd�d	|_|j|d	�|j|jd�|j|jd�d	|_|j	|j�|j|jd�x$t
d
�D]}|j|d	�q�W|j|jd�d|_|j|j�|j|jd�|j|d�|j|jd�dS(
Ns-<?xml version='1.0' encoding='iso8859'?><a>%sR�itbis%s</a>tciii
ii(RRR�R-RR�RNR�RMR�trangeRs(R	R�R�txml3Rti((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_disabling_buffers.
					cCsd|ddS(Ns<?xml version='1.0'?><tag>R�s</tag>((R	tbytes((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyt
make_document'scCs|jd7_dS(Ni(R�(R	R6((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR�*scCsUdd|}tj�}|j|_d|_d|_d|_|j|�|jS(Ns1<?xml version='1.0' encoding='iso8859'?><s>%s</s>R�iii(RRR�R-R�RR�RM(R	t
buffer_lenR�R((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR�-s			
cCs�ddd}ddd}tj�}|j|_d|_d|_|j|jd�d|_|j|d�|jd9_|j|jd	�|j|d�|j|jd�dS(
Ns0<?xml version='1.0' encoding='iso8859'?><a><s>%sR�isaaa</s><s>%s</s></a>iiiii(	RRR�R-RR�RNR�RM(R	R�R�R((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_change_size_18s			cCs�ddd}ddd}tj�}|j|_d|_d|_|j|jd�d|_|j|d�|jd	_|j|jd
�|j|d�|j|jd�dS(Ns1<?xml version='1.0' encoding='iso8859'?><a>a<s>%sR�i�saaa</s><s>%s</s></a>iiiiiii(	RRR�R-RR�RNR�RM(R	R�R�R((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_change_size_2Hs			(
RRt__doc__R�R�R�R�R�R�R�R�R�R�(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR��s					 				tMalformedInputTextcBseZd�Zd�ZRS(cCscd}tj�}y|j|t�|j�Wn,tjk
r^}|jt|�d�nXdS(Ns
s unclosed token: line 2, column 0(RRRMtTrueRht
ExpatErrorRNRj(R	R�RRk((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR�YscCsHd}tj�}d}|jtj|��|j|t�WdQXdS(Ns<?xml version…='1.0'?>
s3XML declaration not well-formed: line 1, column \d+(RRtassertRaisesRegexpR�RMR�(R	R�Rterr_pattern((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR�bs
(RRR�R�(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR�Xs		tForeignDTDTestscBs eZdZd�Zd�ZRS(sE
    Tests for the UseForeignDTD method of expat parser objects.
    cs�g��fd�}tj�}|jt�|jtj�||_|jd�|j�dg�g�(tj�}|j�|jtj�||_|jd�|j�dg�dS(s�
        If UseForeignDTD is passed True and a document without an external
        entity reference is parsed, ExternalEntityRefHandler is first called
        with None for the public and system ids.
        cs�j||f�dS(Ni(R%(RDR9t	system_idt	public_id(thandler_call_args(s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pytresolve_entitytss<?xml version='1.0'?><element/>N(NN(NN(
RRt
UseForeignDTDR�tSetParamEntityParsingtXML_PARAM_ENTITY_PARSING_ALWAYSRGRMRNRf(R	R�R((R�s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_use_foreign_dtdms
	

	
cskg��fd�}tj�}|jt�|jtj�||_|jd�|j�dg�dS(s�
        If UseForeignDTD is passed True and a document with an external
        entity reference is parsed, ExternalEntityRefHandler is called with
        the public and system ids from the document.
        cs�j||f�dS(Ni(R%(RDR9R�R�(R�(s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR��ss@<?xml version='1.0'?><!DOCTYPE foo PUBLIC 'bar' 'baz'><element/>tbartbazN(R�R�(	RRR�R�R�R�RGRMRN(R	R�R((R�s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyttest_ignore_use_foreign_dtd�s
	(RRR�R�R�(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyR�is	cCs,tttttttttt	t
t�dS(N(RRR ReRoRxR�R�R�R�R�R�(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyt	test_main�st__main__(RSR�tunittesttxml.parsersRRwRttest.test_supportRRtTestCaseRR,R ReRoRxR�R�R�R�R�R�R�R(((s8/usr/local/python-2.7/lib/python2.7/test/test_pyexpat.pyt<module>s&=�#`4	

© 2025 GrazzMean