+
    Biڷ                       ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHtHt ^ R	IH t  ^ R
I!H"t" Rs#Rs$]! RRR7      t% ]%PM                  R4       ]! RRR7      t)]! RRR7      t*Rt+Rt,Rt-Rt.Rt/Rt0Rt1R t2R t3RR/R lt4R t5 ! R R ]Pl                  4      t7RuR" lt8R# t9 ! R$ R%4      t: ! R& R']Pl                  4      t; ! R( R)]Pl                  4      t</ t=R*]=R+&   R,]=R-&   R.]=R/&   R0]=R1&   R2]=R3&   R4]=R5&   R6]=R7&   R8]=R9&   R:P}                  ]P~                  ! ]%R!4      4      ]=R;&   R<]=R=&   / t@R>]@R?&   R@]@RA&   RB]=RC&   RD]=RE&   RF]=RG&    ! RH RI]Pl                  4      tA ! RJ RK]Pl                  4      tB ! RL RM]:]Pl                  4      tC ! RN RO]:]Pl                  4      tD ! RP RQ]E4      tF ! RR RS]E4      tG ! RT RU]E4      tH ! RV RW]:]Pl                  4      tI ! RX RY]Pl                  4      tJ ! RZ R[]Pl                  4      tK ! R\ R]]Pl                  4      tL ! R^ R_]Pl                  4      tM ! R` Ra]Pl                  4      tN ! Rb Rc]Pl                  4      tO ! Rd Re]Pl                  4      tP ! Rf Rg]Pl                  4      tQ ! Rh Ri]Pl                  4      tR ! Rj Rk]Pl                  4      tS ! Rl Rm]Pl                  4      tT ! Rn Ro]Pl                  4      tURp tV ! Rq Rr]Pl                  4      tWRvRs ltX]YRt8X  d   ]P                  ! 4        R# R#   ]' d    ]PP                  ! R4      hi ; i)w    N)nullcontext)partial)productislice)support)	os_helper)warnings_helper)findfile
gc_collect	swap_attr	swap_item)import_fresh_module)TESTFNz
simple.xmlxmltestdatasubdirutf-8z!filename is not encodable to utf8zsimple-ns.xmlzexpat224_utf8_bug.xmlz<body>
  <tag class='a'>text</tag>
  <tag class='b' />
  <section>
    <tag class='b' id='inner'>subtext</tag>
  </section>
</body>
zz<section>
  <tag class='b' id='inner'>subtext</tag>
  <nexttag />
  <nextsection>
    <tag />
  </nextsection>
</section>
zy
<body xmlns="http://effbot.org/ns">
  <tag>text</tag>
  <tag />
  <section>
    <tag>subtext</tag>
  </section>
</body>
z
<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>
zy<!DOCTYPE points [
<!ENTITY % user-entities SYSTEM 'user-entities.xml'>
%user-entities;
]>
<document>&entity;</document>
zl<!DOCTYPE points [
<!ENTITY entity SYSTEM "file:///non-existing-file.xml">
]>
<document>&entity;</document>
z<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Foo [
<!ELEMENT foo (bar*)>
<!ELEMENT bar (#PCDATA)*>
<!ATTLIST bar xml:lang CDATA "eng">
<!ENTITY qux "quux">
]>
<foo>
<bar>&qux;</bar>
</foo>
c                      \         \        J # NETpyET     */usr/lib/python3.14/test/test_xml_etree.pyis_python_implementationr   ~   s     :r   c                `    V P                   p\        P                  P                  V RRVR7      # )zMock cls.__eq__ to check whether it has been called or not.

The behaviour of cls.__eq__ (side-effects included) is left as is.
__eq__T)autospecwraps)r   mockpatchobject)clseqs   & r   equal_wrapperr&      s+    
 
B::S(TDDr   quietFc                    a a VV 3R  lpV# )c                 H   <a  VVV 3R  lp\         P                  ! VS 4       V# )c                     < \         P                  ! SR S/ ;_uu_ 4        S! V / VB  RRR4       R#   + '       g   i     R# ; i)r'   N)r	   check_warnings)argskwargsfiltersr'   tests   *,r   newtest1checkwarnings.<locals>.decorator.<locals>.newtest   s6     //FFFd%f% GFFFs	   	3A	)	functoolsupdate_wrapper)r/   r0   r.   r'   s   f r   	decorator checkwarnings.<locals>.decorator   s    	& 	  $/r   r   )r'   r.   r4   s   dj r   checkwarningsr6      s     r   c                 ^    V P                  R \        P                  P                  4       4      # )   
)replaceoslinesepencode)datas   &r   convlinesepr>      s     <<rzz00233r   c                   ,   a  ] tR t^t o R tR tRtV tR# )
ModuleTestc                *    ^ RI Hp ^ RI Hp ^ RI Hp R# )r   )ElementTreeElementIncludeElementPathN)	xml.etreerB   rD   rF   )selfrB   rD   rF   s   &   r   test_sanityModuleTest.test_sanity   s     	*,)r   c                F    Rp\         P                  ! V \        VRR7       R# )xml.etree.ElementTree)not_exportedN)rL   _elementtree)
HTML_EMPTY)r   check__all__r   )rH   namess   & r   test_allModuleTest.test_all   s    9T2u?Kr   r   N)__name__
__module____qualname____firstlineno__rI   rR   __static_attributes____classdictcell____classdict__s   @r   r@   r@      s     *L Lr   r@   Tc                    VR 8w  d   \         P                  ! 4       pM\         P                  ! 4       p\        P	                  V 4      pVP
                  ! V3RV/VB  V'       d   VP                  4       # VP                  ^ 4       V# )unicodeencoding)ioBytesIOStringIOr   rB   writegetvalueseek)elem	to_stringr^   optionsfiletrees   &&&,  r   	serializerj      sc    9zz|{{}>>$DJJt2h2'2}}		!r   c                 B    V  Uu. uF  qP                   NK  	  up# u upi r   tag)seqre   s   & r   summarize_listro      s    !$%HH%%%   c                   <   a  ] tR t^t o ]R 4       tR tR tRtV t	R# )ElementTestCasec                (    \         \        0V n        R # r   )r   r   modulesr$   s   &r   
setUpClassElementTestCase.setUpClass   s    Rjr   c                H    \        \        P                  W#4      ;_uu_ 4        \        P                  ! W4      pR R R 4       \        \        P                  W$4      ;_uu_ 4        \        P
                  ! X4      pR R R 4       V#   + '       g   i     LS; i  + '       g   i     X# ; i  \        P                   d`   p\        \        R3\        R3.4      p	\        P                  ! RT: RT	P                  Y34      : RT	P                  YD4      : 24      ThR p?ii ; i)NcETr   zFailed to round-trip z from z to )r   sysrt   pickledumpsloadsPicklingErrordictr   r   r   
TestFailedget)
rH   objnamedumperloaderprototempresultpehumans
   &&&&&&    r   pickleRoundTripElementTestCase.pickleRoundTrip   s    	L3;;55||C/ 63;;55d+ 6  6555  ## 	L2u+f~67E$$(+(-		&(A(-		&(A&C D JLL	LsL   "B- B*B- %B<B- B	B- B*	$B- *B- -D!ADD!c                   V P                  V\        P                  \        P                  34       V P                  V\        P                  \        P                  34       V P	                  \        \        V4      4      \        \        V4      4      4       \        W4       F  w  r4V P                  W44       K  	  \        P                  ! R RRR4      pV P	                  V! V4      V! V4      4       R# )rm   tailtextattribN)assertIsInstancer   Elementr   assertEquallenlistzipassertEqualElementsoperator
attrgetter)rH   alicebobxy
propertiess   &&&   r   r   #ElementTestCase.assertEqualElements   s    ebjj$,,%?@cBJJ#=>T%[)3tCy>:ODA$$Q* $((I
E*JsO<r   r   N)
rT   rU   rV   rW   classmethodrv   r   r   rX   rY   rZ   s   @r   rr   rr      s&     ! != =r   rr   c                   @  a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R& t)R' t*R( t+R) t,R* t-R+ t.R, t/R- t0R. t1R/ t2R0 t3R1t4V t5R2# )3ElementTreeTestc                <    V P                  \        V4      V4       R # r   )r   rj   )rH   re   expecteds   &&&r   serialize_checkElementTreeTest.serialize_check   s    4(3r   c                d   V P                  \        4      ;_uu_ 4        \        P                  R 4      pRRR4       V P                  \        4      ;_uu_ 4        \        P                  \        P                  4       4      pRRR4       R#   + '       g   i     L_; i  + '       g   i     R# ; i) N)assertRaises	TypeErrorr   rB   rH   ri   s   & r   test_constructor ElementTreeTest.test_constructor   si     y))>>"%D *y))>>".."23D *) *))))s   B(BB	B/	c                   \         P                  4       p\         P                  R 4      pVP                  V4       V P	                  VP                  4       P                  R 4       V P	                  VP                  4       V4       \         P                  4       pV P                  \        4      ;_uu_ 4        VP                  R4       RRR4       V P                  \        4      ;_uu_ 4        VP                  \         P                  4       4       RRR4       V P                  \        4      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     L; i  + '       g   i     L\; i  + '       g   i     R# ; i)rm   r   N)	r   rB   r   _setrootr   getrootrm   r   r   )rH   ri   elements   &  r   test_setrootElementTreeTest.test_setroot   s     ~~**U#g++U31 ~~y))MM" *y))MM"..*+ *y))MM$ *)	 *))))))s$   6E-$E%6E8E"	%E5	8F		c                
  a aa VV 3R  lo\         P                  R4      pS! V4       \         P                  V4      pS! VP                  4       4       \         P                  RRR7      p\         P                  V4      pS P	                  \        V4      R4       \         P                  RRR7      pV 3R loS! VP                  4       S! VP                  4       S! VP                  4       S! VP                  4       S! VP                  4       S! VP                  4       S! VP                  4       S! VP                  4       S! VP                  4       S! VP                  4       S! VP                   4       S! VP"                  4       S! VP$                  4       S! VP&                  4       S! VP(                  4       V3R lpV! VP                  R4      4       V! VP                  R4      4       V! VP                  R4      4       V! VP                  R4      4       S P+                  \         P,                  \         P.                  4       S P+                  \         P0                  \         P2                  4       R	# )
c                 ,  < SP                  \        P                  V 4      R R7       \        V 4      pR F.  pSP	                  W4       SP                  W!RV,          R7       K0  	  SP                  V P                  \        4       SP                  V P                  \        4       V P                  e!   SP                  V P                  \        4       V P                  e!   SP                  V P                  \        4       V  F  pS! V4       K  	  R# )znot an elementmsgzno %s visible by dirN)rm   r   r   r   )
assertTruer   	iselementdirassertHasAttrassertInr   rm   strr   r   r   r   )r   direlemattrre   check_elementrH   s   &   r   r   5ElementTreeTest.test_interface.<locals>.check_element   s    OOBLL17GOH'lG7""71d2T9  ; 8
 !!'++s3!!'..$7||'%%gllC8||'%%gllC8d#  r   rm      tägvaluekeyz^<Element 't\xe4g' at 0x.*>$c                 >   < SP                  V R RV ,          R7       R# )__call__z%s not callabler   N)r   )methodrH   s   &r   check_method4ElementTreeTest.test_interface.<locals>.check_method  s"    vz)F2  4r   c                 ,   < S! V P                   4       R # r   )__next__)itr   s   &r   
check_iter2ElementTreeTest.test_interface.<locals>.check_iter-  s    %r   *N)r   r   rB   r   assertRegexreprappendextendinsertremovefinditerfindfindallfindtextclearr   setkeysitemsiteritertextr   XML
fromstringPIProcessingInstruction)rH   r   ri   r   r   r   s   f   @@r   test_interfaceElementTreeTest.test_interface   s   	$" **U#g~~g&dlln%**X7*3~~g&g(GH**U*0	4 	W^^$W^^$W^^$W^^$W\\"W%%&W__%W%%&W]]#W[[!W[[!W\\"W]]#W\\"W%%&	& 	7##E*+7##C()4=='(4==%& 	/ 8 89r   c                \   \         P                  R 4      pV P                  VP                  R 4       RVn        V P                  VP                  R4       RVn        V P                  VP                  R4       V P	                  VP
                  4       RVn        V P                  VP
                  R4       RVn        V P                  VP
                  R4       V P	                  VP                  4       RVn        V P                  VP                  R4       RVn        V P                  VP                  R4       V P                  VP                  / 4       RRR	R
/Vn        V P                  VP                  RRR	R
/4       RRRR/Vn        V P                  VP                  RRRR/4       R# )rm   TagTAGTextTEXTTailTAILabcdABCDN)r   r   r   rm   assertIsNoner   r   r   )rH   r   s   & r   test_set_attribute"ElementTreeTest.test_set_attribute:  sX   **U#e,e,e,',,'v.v.',,'v.v.,sC-#sC)=>sC-#sC)=>r   c                   \         P                  R 4      pV P                  VR4       \         P                  R4      pVP	                  V4       V P                  VR4       VP                  V4       V P                  VR4       VP                  ^ V4       V P                  VR4       VP                  V4       VP                  V.4       V P                  VR4       VP                  V4       VP                  \        V.4      4       V P                  VR4       VP                  V4       \         P                  RRR7      pV P                  VR4       \         P                  R	4      pVP	                  V4       V P                  VR
4       VP                  ^ V4       V P                  VR4       VP                  V4       V P                  VR
4       VP                  V4       V P                  VR4       V P                  \        R4      ;_uu_ 4        VP                  V4       RRR4       V P                  VR4       WDV.VR&   V P                  V^,          R4       V P                  VR,          V^,          V^,          .4       V P                  VR,          V^ ,          V^,          .4       VR V P                  VR4       R#   + '       g   i     L; i)<body><tag/></body><body><tag /></body>tag2z<body><tag /><tag2 /></body>z<body><tag2 /><tag /></body>rm   r   r   z<tag key="value" />subtagz!<tag key="value"><subtag /></tag>z+<tag key="value"><subtag /><subtag /></tag>z(Element\.remove\(.+\): element not foundN:r   r   Nz
<subtag />:   	   N:Nr      r   r   N)r   r   r   r   r   r   r   r   r   assertRaisesRegex
ValueErrorr   )rH   re   er   
subelements   &    r   test_simpleopsElementTreeTest.test_simpleopsU  s_    vv+,T#9:JJvAT#ABAT#9:AqT#ABAQCT#ABAD!IT#ABA**U*0W&;<ZZ)
z"W&IJq*%W=	?z"W&IJz"W&;<##J$OQ QNN:&Q 	W&;<"
;WQZ6
GAJ'?@WQZ(@ACLW=	?Q Qs   K		K	c                    V P                  \        P                  R 4      R 4       V P                  \        P                  R4      R 4       V P                  \        P                  R4      R 4       R# )z<tag>hello</tag>z)<tag>&#104;&#101;&#108;&#108;&#111;</tag>z<tag><![CDATA[hello]]></tag>N)r   r   r   rH   s   &r   
test_cdataElementTreeTest.test_cdata  s[     	RVV$67"	$RVV$OP"	$RVV$BC"	$r   c                   \         P                  ! \        P                  R 4      4      p\        P                  VR7      pV P                  VP                  R4      P                  R4       V P                  VP                  R4      P                  R4       \        P                  \        R7      pV P                  VP                  R4      P                  R4       V P                  VP                  R4      P                  R4       R# )r   )rh   rm   section/tagr   zelement/../empty-elementempty-elementN)
r_   r`   
SAMPLE_XMLr<   r   rB   r   r   rm   SIMPLE_XMLFILE)rH   
stringfileri   s   &  r   test_file_initElementTreeTest.test_file_init  s    ZZ
 1 1' :;
~~:~.5)--u5=155u=~~>~29-119=#=>BB	!r   c                   ^ RI Hp \        P                  \        4      pVP
                  P                  4        \        ^
4       F7  p\        P                  V4      P                  R\        V4      ,           4       K9  	  \        VP
                  4      p\        ^
4       F7  p\        P                  V4      P                  R\        V4      ,           4       K9  	  V P                  \        VP
                  4      V4       \        ^4       F7  p\        P                  V4      P                  R\        V4      ,           4       K9  	  V P                  \        VP
                  4      V4       \        R4       F7  p\        P                  V4      P                  R\        V4      ,           4       K9  	  V P                  \        VP
                  4      R4       R# )r   rE   z./iX  i  N)rG   rF   r   r   r  _cacher   rangerB   r   r   r   r   assertGreater
assertLess)rH   rF   re   icache_len_10s   &    r   test_path_cacheElementTreeTest.test_path_cache  s*    	*vvj!  "rABNN4055d3q6kB;--.rABNN4055d3q6kB[//0,?rABNN4055d3q6kB3{112LAsAR^^D166tCF{CK../5r   c                   ^ RI p\        P                  R4      pVP                   ! V4      pVP                  ! V4      pRVP	                  R4      n        V P                  VR4       V P                  VR4       V P                  VR4       R# )r   Nz<tag>hello<foo/></tag>barfooz<tag>hello<bar /></tag>z<tag>hello<foo /></tag>)copyr   r   deepcopyr   rm   r   )rH   r   e1e2e3s   &    r   	test_copyElementTreeTest.test_copy  st     	VV,-YYr]]]2"R!:;R!:;R!:;r   c                D   \         P                  R 4      pVP                  R4       V P                  VP                  RR4      R4       VP	                  RR4       V P                  VP                  R4      R4       \         P                  R RR7      pV P                  VP                  R4      R4       V P                  VP
                  RR/4       RR/p\         P                  R V4      pVP                  4        V P                  VP                  R4      R4       V P                  VP
                  RR/4       RR/p\         P                  ! R/ VB pVP                  4        V P                  VP                  R4      R4       V P                  VP
                  RR/4       \         P                  R RR/RR7      pV P                  VP                  R4      R4       V P                  VP
                  RR/4       \         P                  R4      pRVn        VP	                  RR	4       VP	                  R
R4       V P                  \         P                  V4      R4       V P                  \        VP                  4       4      RR
.4       V P                  \        VP                  4       4      RR.4       V P                  VP
                  R
,          R4       RVP
                  R
&   RVP
                  R&   V P                  \         P                  V4      R4       \         P                  R4      pVP	                  RR4       VP	                  RR4       VP	                  RR4       VP	                  RR4       V P                  \         P                  V4      R4       R# )rm   r   defaultr   r   otherr/   aatestatestvaltestbtest2s-   <test testa="testval" testb="test2">aa</test>test1testcs;   <test testa="testval" testb="test1" testc="test2">aa</test>r   r   
r   z	
 r   z

		  s[   <test a="&#13;" b="&#13;&#10;" c="&#09;&#10;&#13; " d="&#10;&#10;&#13;&#13;&#09;&#09;  " />Nrl   )r+  r,  )r-  r.  )r   r   r   r   r   r   r   r   tostringsortedr   r   )rH   re   r   s   &  r   test_attribElementTreeTest.test_attrib  s    zz% %3Y? %'2zz%Wz-%'2ug&67!zz%(%'2ug&67!zz*6*%'2ug&67zz%%!1wz?%'2ug&67zz&!	)$'"T*@	B		,w.@A

-%'9:	<W-w7&G&GT*N	P zz&!dfi &'T*n	pr   c                "   \         P                  R 4      pRR/pVP                  RV4      pV P                  VP                  VRR7       VP                  V4       V P                  VR4       VP                  4        V P                  VR4       VP                  V4       V P                  VR4       VP                  W3.4       V P                  VR4       V.VR	&   V P                  VR4       \        V.4      VR	&   V P                  VR4       R
# )rm   r   r   r   zattrib aliasingr   z!<tag><subtag key="value" /></tag><tag />zM<tag><subtag key="value" /><subtag key="value" /><subtag key="value" /></tag>NNNN)
r   r   makeelementassertIsNotr   r   r   r   r   tuple)rH   re   r   subelems   &   r   test_makeelement ElementTreeTest.test_makeelement  s     zz% !""8V45FGGT#FG

T9-GT#FGW&'T[	])QT#FG	"QT#FGr   c                   \         P                  \        4      p\        P                  ! 4       pVP                  VR R7       V P                  VP                  4       R4       \         P                  \        4      p\        P                  ! 4       pVP                  VR R7       V P                  VP                  4       R4       \        \        4      ;_uu_ 4       pVP                  4       pRRR4       \         P                  4       pV P                  VP                  R4       VP                  X4       V P                  VP!                  4       R4       \         P#                  4       p\         P                  VR7      pVP                  V4       V P                  VP!                  4       R4       R#   + '       g   i     L; i)r]   r^   zi<root>
   <element key="value">text</element>
   <element>text</element>tail
   <empty-element />
</root>z<ns0:root xmlns:ns0="namespace">
   <ns0:element key="value">text</ns0:element>
   <ns0:element>text</ns0:element>tail
   <ns0:empty-element />
</ns0:root>Nz^Expat target)r   parser  r_   ra   rb   r   rc   SIMPLE_NS_XMLFILEopenread	XMLParserr   versionfeedr   closeTreeBuilder)rH   ri   streamfr=   parserrC  s   &      r   test_parsefileElementTreeTest.test_parsefile  sF    xx'

6I
.*	 xx)*

6I
.*	 .!!Q668D " 4DV\\^	 !V,DV\\^	! "!s   F11G	c                4   \         P                  R 4      pV P                  \         P                  VRR7      R 4       \         P	                  R 4      pV P                  \         P                  VRR7      R 4       . R
Op\         P                  V4      pV P                  \         P                  V4      R4       V P                  RP                  \         P                  V4      4      R4       V P                  \         P                  VR4      R4       \         P                  R 4      w  r4V P                  \        V4      ^ 4       \         P                  R4      w  r4V P                  \        V4      ^4       V P                  VR,          P                  R4       R	# )<html><body>text</body></html>r]   rA     <html><body>text</body></html>r   asciisE   <?xml version='1.0' encoding='ascii'?>
<html><body>text</body></html>z(<html><body id='body'>text</body></html>bodyN)z<html><body>ztext</boz
dy></html>)r   r   r   r3  r   fromstringlistjointostringlistXMLIDr   rm   )rH   r   sequence_idss   &    r   test_parseliteral!ElementTreeTest.test_parseliteral+  s:   &&9:WyA0	2-- @AWyA0	2=##H-W-1	3"//'":;1	3Wg62	3 :;S1%DES1%V&1r   c           
        \         P                  pV! \        4      pV P                  VP                  4       \        V4      w  r4V P                  VP                  4       V P                  W4P                  3R4       T P                  V UUu. uF  w  r4W4P                  3NK  	  upp. RO4       V P                  VP                  P                  R4       V! \        4      pT P                  V UUu. uF  w  r4W4P                  3NK  	  upp. RO4       \        \        R4      ;_uu_ 4       pV! V4      p\        V4      w  r4V P                  W4P                  3R4       T P                  V UUu. uF  w  r4W4P                  3NK  	  upp. RO4       V P                  VP                  P                  R4       RRR4       RpV! \        V4      pT P                  V UUu. uF  w  r4W4P                  3NK  	  upp. 4       RpV! \        VR7      pT P                  V UUu. uF  w  r4W4P                  3NK  	  upp. 4       RpV! \        V4      pT P                  V UUu. uF  w  r4W4P                  3NK  	  upp. RO4       RpV! \        V4      pT P                  V UUu. uF  w  r4VR9   d   W4P                  3MW43NK  	  upp. RO4       RpV! \        P                  ! R4      V4      pV UUu. uF  w  r4VNK	  	  pppV P                  VRR.4       Rp\        \        R4      ;_uu_ 4       pV P                  \        4      ;_uu_ 4       p	V! W4       RRR4       V P                  VP                  4       RRR4       V P                  \!        X	P"                  4      R4       \$        P&                  ! V 4      ;_uu_ 4        V P                  \        4      ;_uu_ 4       p	V! \        V4       RRR4       V P                  \!        V	P"                  4      R4       ?	RRR4       \        P(                  ! R	4      pRpV! WV4      pT P                  V UUu. uF  w  r4W43NK
  	  uppRR.4       \        P                  ! R
4      pV! V4      p
\        V
4      w  r4V P                  W4P                  3R4       V P                  \         P*                  4      ;_uu_ 4       p	\        V
4       RRR4       V P                  \!        X	P"                  4      R4       V P-                  \.        P0                  \2        4       \        \2        R4      ;_uu_ 4       pVP5                  R4       RRR4       V! \2        4      p
\        V
4      w  r4V P                  W4P                  3R4       \$        P&                  ! V 4      ;_uu_ 4        V P                  \         P*                  4      ;_uu_ 4       p	\        V
4       RRR4       V P                  \!        V	P"                  4      R4       ?	?
RRR4       \$        P&                  ! V 4      ;_uu_ 4        V! \        4      p
?
RRR4       \$        P&                  ! V 4      ;_uu_ 4        V! \        4      p
V
P7                  4        ?
RRR4       \$        P&                  ! V 4      ;_uu_ 4        V! \        4      p
\        V
4      w  r4V P                  W4P                  3R4       ?
?RRR4       \$        P&                  ! V 4      ;_uu_ 4        V! \        4      p
\        V
4      w  r4V
P7                  4        V P                  W4P                  3R4       ?
?RRR4       V P                  \8        4      ;_uu_ 4        V! R4       RRR4       R# u uppi u uppi u uppi   + '       g   i     EL; iu uppi u uppi u uppi u uppi u uppi   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL'; i  + '       g   i     EL; iu uppi   + '       g   i     EL[; i  + '       g   i     EL; i  + '       g   i     ELx; i  + '       g   i     EL]; i  + '       g   i     EL=; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELg; i  + '       g   i     R# ; i)endrootrbNeventsstart-nsend-nsz<root xmlns=''/>zunknown 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>
z<document />junkz.junk after document element: line 1, column 12wbs   <document />junknonexistentra  r   )rj  ra  r  ra  rb  )ra  {namespace}elementrm  ra  {namespace}empty-elementra  {namespace}rootr   startra  rt  rb  rt  r   rj  rw  rj  )rt  r  rk  rl  )rt  ra  rf  rg  )
rf  )r   	namespacert  rr  rt  rn  rm  r{  rm  rt  rp  ro  rq  rg  Nrf  rg  rt  ra  bogus)rf  )rf  )r   u   http://éffbot.org/ns)rf  )u   cléhttp://effbot.org/ns)ra  document)r   	iterparser  r   rb  nextr   rm   rE  rF  r_   ra   r   r  assertFalseclosedr   	exceptionr	   check_no_resource_warningr`   
ParseError
addCleanupr   unlinkr   rb   rK  FileNotFoundError)rH   r  contextactionre   sourcere  resrN  cmr   s   &          r   test_iterparseElementTreeTest.test_iterparseA  s    LL	N+',,'G}',,'&((+-?@I688,I L 	
 	))62-.I688,I L 	 .$''6'G=LFfhh/1CDWMW\Vvxx0WM P 
 W\\--v6 ( NF3I688,I2NN6:I688,I2N!NF3I688,I 	L 		 8-v6.57.5lf 17:J0J688,39.A.579	 (BKK(;<fE*12',&v'2z845*.$''1"":.."!$ /QXX& ( 	R\\*,CD66t<<"":..".&1 /S.0GH	 = GH F+WEW\V6.WE=@H 	
 /0vBx&((+-@Ar}}--H .R\\*@	B 		((&1&$1GG'(  vBx&((+-@A66t<<""2==11RR 2S.DFB = 66t<<>*B = 66t<<>*BHHJ =
 66t<<>*B8LFfhh/1CDD	 = 66t<<>*B8LFHHJfhh/1CDD = 011m$ 21U J J N	 ('' J J J7" 3
 /.. ('' /.. =<< F .--   211 =<< =<< =<<
 =<< =<< 211s  ^%
2^+
-A^70^11^7 _
!_
!_
#"_
4_#2_=	_)	#_=`%%`	3.`%`9
!`?a(a;,a'	8/a;bb#9b7$A	c	c1^77_	)_:4	_==`	`"	`%%`6	?a	a$	'a82	a;;b	b 	#b4	7c	c	c0	c           	        \         P                  pV! \        4      pVP                  4        V P	                  \
        4      ;_uu_ 4        \        V4       R R R 4       VP                  4        \        \        R4      ;_uu_ 4       pV! V4      pVP                  4        V P                  VP                  4       V P	                  \
        4      ;_uu_ 4        \        V4       R R R 4       VP                  4        R R R 4       V! \        4      p\        V4      w  rEV P                  WEP                  3R4       VP                  4        V P	                  \
        4      ;_uu_ 4        \        V4       R R R 4       VP                  4        \        \        R4      ;_uu_ 4       pV! V4      p\        V4      w  rEV P                  WEP                  3R4       VP                  4        V P                  VP                  4       V P	                  \
        4      ;_uu_ 4        \        V4       R R R 4       VP                  4        R R R 4       V! \        4      p\        V4       VP                  4        V P	                  \
        4      ;_uu_ 4        \        V4       R R R 4       VP                  4        \        \        R4      ;_uu_ 4       pV! V4      p\        V4       VP                  4        V P                  VP                  4       V P	                  \
        4      ;_uu_ 4        \        V4       R R R 4       VP                  4        R R R 4       R #   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL&; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL;; i  + '       g   i     L; i  + '       g   i     R # ; i)Nrc  rj  )r   r  r  rK  r   StopIterationr  rF  r  r  r   rm   r   )rH   r  r   r  r  re   s   &     r   test_iterparse_close$ElementTreeTest.test_iterparse_close  s   LL	~&

}--H .

.$''66"BHHJV]]+""=11R 2HHJ ( ~&Bx&((+-?@

}--H .

.$''66"B8LFfhh/1CDHHJV]]+""=11R 2HHJ ( ~&R

}--H .

.$''66"BHHHJV]]+""=11R 2HHJ ('K .-- 211	 ('' .-- 211 ('' .-- 21 (''s   
MAM;M'	#M;&N"A;N7N#	)N7O	AO2%O	1O2M$	'M82	M;;N	N 	#N4.	N77O	O	O/*O22P	c                   \         P                  R 4      pRVn        V P                  VR4       R\         P	                  VR4      n        V P                  VR4       RVn        V P                  VR4       VP                  ^ \         P                  R4      4       V P                  VR	4       \         P                  R
R4      V^ &   V P                  VR4       R# )rm   r   z<tag>text</tag>subtextr   z'<tag>text<subtag>subtext</subtag></tag>Nztext<subtag>subtext</subtag>commentz*text<!--comment--><subtag>subtext</subtag>r   r   z)text<?key value?><subtag>subtext</subtag>)	r   r   r   r   
SubElementrm   r   Commentr   rH   re   s   & r   test_writefileElementTreeTest.test_writefile  s    zz% 	T#45-6dH%*T#LM T#ABArzz),-T<	> %%w'QT#NOr   c                V   \        \        4      ;_uu_ 4       pVP                  4       pR R R 4        ! R R\        4      pV! 4       p\        P                  VR7      pVP                  X4       V P                  V. RO4       \        \        4      ;_uu_ 4       pVP                  4       pR R R 4        ! R R\        4      pV! 4       p\        P                  VR7      pVP                  V4       V P                  V. RO4       R #   + '       g   i     L; i  + '       g   i     Lv; i)Nc                   2   a  ] tR tRt o R tR tR tRtV tR# )4ElementTreeTest.test_custom_builder.<locals>.Builderi!  c                ,    V P                  R V34       R# rt  Nr   rH   rm   r   s   &&&r   rt  :ElementTreeTest.test_custom_builder.<locals>.Builder.start"      WcN+r   c                ,    V P                  R V34       R# ra  Nr  rH   rm   s   &&r   ra  8ElementTreeTest.test_custom_builder.<locals>.Builder.end$      UCL)r   c                    R # r   r   rH   r   s   &&r   r=   9ElementTreeTest.test_custom_builder.<locals>.Builder.data&      r   r   N)	rT   rU   rV   rW   rt  ra  r=   rX   rY   rZ   s   @r   Builderr  !  s     ,* r   r  rB  c                   J   a  ] tR tRt o R tR tR tR tR tR t	R t
R	tV tR
# )r  i8  c                ,    V P                  R V34       R# r  r  r  s   &&&r   rt  r  9  r  r   c                ,    V P                  R V34       R# r  r  r  s   &&r   ra  r  ;  r  r   c                    R # r   r   r  s   &&r   r=   r  =  r  r   c                ,    V P                  R W34       R# )piNr  )rH   rC  r=   s   &&&r   r  7ElementTreeTest.test_custom_builder.<locals>.Builder.pi?  s    T601r   c                ,    V P                  R V34       R# )r  Nr  )rH   r=   s   &&r   r  <ElementTreeTest.test_custom_builder.<locals>.Builder.commentA  s    Y-.r   c                ,    V P                  R W34       R# )rf  Nr  )rH   prefixuris   &&&r   start_ns=ElementTreeTest.test_custom_builder.<locals>.Builder.start_nsC  s    Z56r   c                ,    V P                  R V34       R# r}  r  rH   r  s   &&r   end_ns;ElementTreeTest.test_custom_builder.<locals>.Builder.end_nsE      Xv./r   r   N)rT   rU   rV   rW   rt  ra  r=   r  r  r  r  rX   rY   rZ   s   @r   r  r  8  s-     ,*2/70 0r   ru  ))r  r  r=   )r  	 comment )rf  r   ry  rz  r{  rm  r{  rm  r|  ro  rq  rg  r   )	rF  r  rG  r   r   rH  rJ  r   rE  )rH   rN  r=   r  builderrO  s   &     r   test_custom_builder#ElementTreeTest.test_custom_builder  s     .!!Q668D "	d 	 )W-D 	# 		 #$$668D %	0d 	0 )W-D # 	W "!. %$s   DDD	D(	c                     ! R  R\         4      pV! 4       p\        P                  VR7      pVP                  \        P
                  ! R4      4       V P                  V. RO4       R# )c                   &   a  ] tR tRt o R tRtV tR# )@ElementTreeTest.test_custom_builder_only_end_ns.<locals>.BuilderiZ  c                ,    V P                  R V34       R# r}  r  r  s   &&r   r  GElementTreeTest.test_custom_builder_only_end_ns.<locals>.Builder.end_ns[  r  r   r   N)rT   rU   rV   rW   r  rX   rY   rZ   s   @r   r  r  Z  s     0 0r   r  rB  a              <?pi data?>
            <!-- comment -->
            <root xmlns='namespace' xmlns:p='pns' xmlns:a='ans'>
               <a:element key='value'>text</a:element>
               <p:element>text</p:element>tail
               <empty-element/>
            </root>
            N))rg  r   )rg  pr  )r   r   rH  rJ  textwrapdedentr   )rH   r  r  rO  s   &   r   test_custom_builder_only_end_ns/ElementTreeTest.test_custom_builder_only_end_nsY  sZ    	0d 	0 )W-HOO %  	 	 # 	r   c                   \         P                  R R7      pV P                  VP                  \         P                  4       \         P                  4       pV P                  VP                  \         P                  4       R # )NrB  )r   rH  r   rC  rL  )rH   rO  parser2s   &  r   %test_initialize_parser_without_target5ElementTreeTest.test_initialize_parser_without_targeto  sO    T*fmmR^^< ,,.gnnbnn=r   c                   \        \        R 4      ;_uu_ 4       p\        P                  V4      pRRR4       T P	                  XP                  4       P                  4        Uu. uF  p\        V4      NK  	  up. RO. . . .4       T P	                  VP                  4        Uu. uF  p\        V4      NK  	  up. RO. . . .4       \        P                  \        4      pV P	                  \        \        V4      4      ^4       V P	                  \        \        V^,          4      4      ^4       V P	                  VR,          \        V4      4       V^ ,          pV^,          pVR V P	                  \        \        V4      4      ^4       V P	                  WC^ ,          4       V P	                  WS^,          4       WT.VR&   V P	                  WS^ ,          4       V P	                  WC^,          4       V P                  WC^ ,          4       VP                  4        V P	                  \        V4      . 4       R#   + '       g   i     EL; iu upi u upi )rc  Nr9  r  r   r   N)r   r   r  )rF  r  r   rD  r   r   r   ro   r   r  r   r   assertNotEqualr   )rH   rN  ri   re   child1child2s   &     r   test_childrenElementTreeTest.test_childrenx  s    .$''188A;D (&*lln&9&9&;=&;d ).&;=7	?	 	&*iik3&1d ).&137	5	 vvj!T$Z!,T$q']+Q/a$t*-aaIT$Z!,a)a)$S	a)a)FG,

dR(A (''=3s   H1"I!I
1I	c                    \         P                  R 4      pV P                  \         P                  V4      R4       \         P	                  R 4      pV P                  \         P                  V4      R4       R# )rS  rT  N)r   r   r   r3  r   r  s   & r   test_writestring ElementTreeTest.test_writestring  sT    vv67T*,MN}}=>T*,MNr   c                   \         P                  R 4      p\         P                  V4       V P                  \         P	                  V4      R4       \         P                  R4      p\         P                  V4       V P                  \         P	                  V4      R4       \         P                  R4      p\         P                  V4       V P                  \         P	                  V4      R4       \         P                  R4      p\         P                  V4       V P                  \         P	                  V4      R4       \         P                  R4      p\         P                  V4       V P                  \         P	                  V4      R4       \         P                  R	4      p\         P                  V4       V P                  \         P	                  V4      R
4       R# )z<root></root>s   <root />rS  s"   <html>
  <body>text</body>
</html>z!<html> <body>text</body>  </html>z"<html><body>text</body>tail</html>s%   <html>
  <body>text</body>tail</html>z=<html><body><p>par</p>
<p>text</p>	<p><br/></p></body></html>s^   <html>
  <body>
    <p>par</p>
    <p>text</p>
    <p>
      <br />
    </p>
  </body>
</html>8<html><body><p>pre<br/>post</p><p>text</p></body></html>sJ   <html>
  <body>
    <p>pre<br />post</p>
    <p>text</p>
  </body>
</html>Nr   r   indentr   r3  r  s   & r   test_indentElementTreeTest.test_indent  sD   vvo&
		$T*K8vv67
		$T*,STvv9:
		$T*,STvv:;
		$T*,UVvvWX
		$KK	
 vvPQ
		$KK	
r   c                J   \         P                  R 4      p\         P                  VRR7       V P                  \         P	                  V4      R4       \         P                  R 4      p\         P                  VRR7       V P                  \         P	                  V4      R4       R# )r  	)spacesD   <html>
	<body>
		<p>pre<br />post</p>
		<p>text</p>
	</body>
</html>r   s>   <html>
<body>
<p>pre<br />post</p>
<p>text</p>
</body>
</html>Nr  r  s   & r   test_indent_space!ElementTreeTest.test_indent_space  s    vvPQ
		$d	#KK	
 vvPQ
		$b	!KK	
r   c                f   \         P                  R 4      p\         P                  V4       T P                  VP	                  4        Uu0 uF  q"P
                  kK  	  up0 Rm4       T P                  VP	                  4        Uu0 uF  q"P                  kK  	  up0 Rm4       T P                  \        VP	                  4        Uu0 uF  q"P
                  kK  	  up4      \        VP	                  4        Uu0 uF  p\        VP
                  4      kK  	  up4      4       R# u upi u upi u upi u upi )z@<html><body><p>par</p><p>text</p><p><br/></p><p /></body></html>N>   N

  
    >   Nparr   r  r  
      )	r   r   r  r   r   r   r   r   id)rH   re   els   &  r   test_indent_space_caching)ElementTreeTest.test_indent_space_caching  s    vvXY
		$#yy{+{WW{+*	
 	#yy{+{WW{+?	
 	499;/;R;/0tyy{3{BGG{34	
 , , 03s   DD$D)4D.c                6   \         P                  R 4      pV P                  \        4      ;_uu_ 4        \         P	                  VRR7       RRR4       V P                  \         P                  V4      R4       \         P	                  V^R7       V P                  \         P                  V4      R4       \         P                  R 4      p\         P	                  V^RR7       V P                  \         P                  V4      R4       R#   + '       g   i     L; i)	r  )levelNs9   <html><body><p>pre<br />post</p><p>text</p></body></html>s^   <html>
      <body>
        <p>pre<br />post</p>
        <p>text</p>
      </body>
    </html> )r  r  sI   <html>
  <body>
   <p>pre<br />post</p>
   <p>text</p>
  </body>
 </html>)r   r   r   r  r  r   r3  r  s   & r   test_indent_level!ElementTreeTest.test_indent_level  s    vvPQz**IId"I% +KKH	

 			$a	 KK	
 vvPQ
		$as	+KK	
) +*s   DD	c                    \         P                  R 4      pV P                  \         P                  VRR7      R4       V P                  \         P                  VRRR7      R4       R# )0<body xmlns="http://effbot.org/ns"><tag/></body>r]   rA  A<ns0:body xmlns:ns0="http://effbot.org/ns"><ns0:tag /></ns0:body>r  r^   default_namespace1<body xmlns="http://effbot.org/ns"><tag /></body>Nr   r   r   r3  r  s   & r   test_tostring_default_namespace/ElementTreeTest.test_tostring_default_namespace  sX    vvHIKKyK1O	
 	KKyDZK[?	
r   c                    \         P                  R 4      pV P                  \         P                  VRRR7      R4       R# )r  r]   foobarr  zP<ns1:body xmlns="foobar" xmlns:ns1="http://effbot.org/ns"><ns1:tag /></ns1:body>Nr  r  s   & r   3test_tostring_default_namespace_different_namespaceCElementTreeTest.test_tostring_default_namespace_different_namespace#  s4    vvHIKKyHKM^	
r   c                    \         P                  R 4      pRpV P                  \        V4      ;_uu_ 4        \         P	                  VRRR7       RRR4       R#   + '       g   i     R# ; i)r   z>^cannot use non-qualified names with default_namespace option$r]   r  r  N)r   r   r  r  r3  )rH   re   EXPECTED_MSGs   &  r   5test_tostring_default_namespace_original_no_namespaceEElementTreeTest.test_tostring_default_namespace_original_no_namespace*  sJ    vv+,W##J==KKyHKM >===s   AA*	c                ~    \         P                  R 4      pV P                  \         P                  VRR7      R4       R# )r   r]   rA  r   Nr  r  s   & r    test_tostring_no_xml_declaration0ElementTreeTest.test_tostring_no_xml_declaration0  s2    vv+,KKyK1"	
r   c                    \         P                  R 4      pV P                  \         P                  VRRR7      R4       R# )r   utf8Tr^   xml_declarations:   <?xml version='1.0' encoding='utf8'?>
<body><tag /></body>Nr  r  s   & r   test_tostring_xml_declaration-ElementTreeTest.test_tostring_xml_declaration7  s4    vv+,KKvtKDJ	
r   c                    \         P                  R 4      pV P                  \         P                  VRRR7      R4       R# )r   r]   Tr  ;<?xml version='1.0' encoding='utf-8'?>
<body><tag /></body>Nr  r  s   & r   .test_tostring_xml_declaration_unicode_encoding>ElementTreeTest.test_tostring_xml_declaration_unicode_encoding>  s4    vv+,KKy$KGJ	
r   c                   \         P                  R 4      p. ROpV FV  w  r4pV P                  RV RV 24      ;_uu_ 4        V P                  \         P	                  VVVR7      V4       RRR4       KX  	  R#   + '       g   i     Km  ; i)   <body><tag>ø</tag></body>Nz	encoding=z xml_declaration=r  ))   <body><tag>&#248;</tag></body>NN)   <body><tag>ø</tag></body>UTF-8N)r  US-ASCIIN)E   <?xml version='1.0' encoding='ISO-8859-1'?>
<body><tag></tag></body>
ISO-8859-1N)r  r]   N)r  NF)r  r   F)r  r!  F)s   <body><tag></tag></body>r#  F)r  r]   F)sH   <?xml version='1.0' encoding='us-ascii'?>
<body><tag>&#248;</tag></body>NT)sA   <?xml version='1.0' encoding='UTF-8'?>
<body><tag>ø</tag></body>r   T)sH   <?xml version='1.0' encoding='US-ASCII'?>
<body><tag>&#248;</tag></body>r!  T)r"  r#  T)uA   <?xml version='1.0' encoding='utf-8'?>
<body><tag>ø</tag></body>r]   T)r   r   subTestr   r3  )rH   re   	TESTCASESexpected_retvalr^   r  s   &     r   #test_tostring_xml_declaration_cases3ElementTreeTest.test_tostring_xml_declaration_casesE  s    vv23
	< ;D6O	( 411@0AC D D  KK!)(7   
 $D D ;DD D Ds   )A88B	c           
     
   \         P                  R 4      pV P                  RP                  \         P	                  VRR7      4      R4       V P                  RP                  \         P	                  VRRR7      4      R4       R# )	r  r   r]   rA  r   r  r  r  N)r   r   r   rX  rY  r  s   & r   #test_tostringlist_default_namespace3ElementTreeTest.test_tostringlist_default_namespaceq  sj    vvHIGGBOOD9O=>O	
 	GGBOOD9PfOgh?	
r   c           	        \         P                  R 4      pV P                  RP                  \         P	                  VRR7      4      R4       V P                  RP                  \         P	                  VRR7      4      R4       \         P	                  VRRR	7      pV P                  RP                  V4      R
4       V P                  V^ ,          R4       V P                  . ROVR,          4       R# )r   r   r]   rA  r   r   T)r  s>   <?xml version='1.0' encoding='us-ascii'?>
<body><tag /></body>r  r  z%^<\?xml version='1.0' encoding='.+'?>:r   NNN)z<body>z<tagz />z</body>)r   r   r   rX  rY  r   )rH   re   
stringlists   &  r   !test_tostringlist_xml_declaration1ElementTreeTest.test_tostringlist_xml_declaration|  s    vv+,GGBOOD9O=>"	
 	HHR__T4_@AN	

 __TIt_T
GGJJ	
 	A(PQA:b>Rr   c           
       a a RSV 3R llpV! RR4       V! RR4       V! RR4       V! RR4       V! R	R
4       V! RR4       R oV3R lp. RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR	NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRNRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNpV FA  pS P                  \        P                  \        P                  V! V4      4      4      RO4       KC  	  . RTOpV F.  pS P	                  \
        \        P                  V! V4      4       K0  	  . RUOpV F8  pS P	                  \        P                  \        P                  V! V4      4       K:  	  S P	                  \
        \        P                  S! RP4      P                  R4      4       S P	                  \        \        P                  S! RQ4      P                  R4      4       RR# )Vr   c                    < R V : RV: R2pSP                  \        P                  VP                  V 4      4      P                  V4       SP                  \        P                  V4      P                  V4       R# )z<?xml version='1.0' encoding='z'?><xml>z</xml>N)r   r   r   r<   r   )r^   rV  xmlrH   s   && r   check,ElementTreeTest.test_encoding.<locals>.check  sU    d$CRVVCJJx$89>>ERVVC[--t4r   rU  r   us-ascii
iso-8859-1   ½ziso-8859-15u   €cp437u   √z	mac-romanu   ˚c                     R V ,          # )z*<?xml version='1.0' encoding='%s'?><xml />r   rA  s   &r   r3  *ElementTreeTest.test_encoding.<locals>.xml  s    ?(JJr   c                 2   < S! V 4      P                  V 4      # r   )r<   )r^   r3  s   &r   bxml+ElementTreeTest.test_encoding.<locals>.bxml  s    x=''11r   r   z	utf-8-sigutf-16utf-16beutf-16lez	iso8859-1z	iso8859-2z	iso8859-3z	iso8859-4z	iso8859-5z	iso8859-6z	iso8859-7z	iso8859-8z	iso8859-9z
iso8859-10z
iso8859-13z
iso8859-14z
iso8859-15z
iso8859-16cp720cp737cp775cp850cp852cp855cp856cp857cp858cp860cp861cp862cp863cp865cp866cp869cp874cp1006cp1125cp1250cp1251cp1252cp1253cp1254cp1255cp1256cp1257cp1258zmac-cyrillicz	mac-greekzmac-icelandz
mac-latin2zmac-turkishz
iso2022-jpziso2022-jp-1ziso2022-jp-2ziso2022-jp-2004ziso2022-jp-3ziso2022-jp-extzkoi8-rzkoi8-tzkoi8-ukz1048hzptcp154s   <xml />	undefinedxxxN)r   )big5	big5hkscscp932cp949cp950zeuc-jpzeuc-jis-2004zeuc-jisx0213zeuc-krgb2312gbkgb18030z
iso2022-krjohabz	shift-jiszshift-jis-2004zshift-jisx0213zutf-7)
cp037cp424cp500cp864cp875cp1026cp1140utf_32	utf_32_be	utf_32_le)	r   r   r3  r   r   r  r  r<   LookupError)rH   r4  r=  supported_encodingsr^   &unsupported_ascii_compatible_encodings(unsupported_ascii_incompatible_encodingsr3  s   f      @r   test_encodingElementTreeTest.test_encoding  s   	5
 	gsj#lF#mX&gx k8$	K	2


)
+3
5?
AK

$
&1
3>
@K
 
 %
 '2
 4?
 AM
 	
 '	
 )5	
 7C	

 

 

 &

 (/

 18

 :A
 
 
 &
 (/
 18
 :A
 CJ
 
 
 &
 (/
 18
 :B
 DL
 
 
 !)
 +3
 5=
 ?G
 
 
 !)
 
 (
 *7
 9E
 
 '
 
 )
 +9
 ;L
 
 -
 
 
 !)
 +3
 
 
" ,HR[[X)?@*M ,2
. ?Hj"&&$x.A ?4
0 AHbmmRVVT(^D A 	*bffc+.>.E.Eg.NO+rvvs5z/@/@/IJr   c                \   \         P                  R 4      pRVn        V P                  \	        V4      R4       V P                  \	        VRR7      R4       V P                  \	        VRR7      R4       V P                  \	        VRR7      R4       V P                  \	        VRR7      R	4       R# )
z-<html><link/><script>1 &lt; 2</script></html>r  z/<html><link /><script>1 &lt; 2</script></html>
Nr   r3  htmlz*<html><link><script>1 < 2</script></html>
r   z1 < 2
)r   r   r   r   rj   rH   r  s   & r   test_methodsElementTreeTest.test_methods  s     FFBC1B	D1T2B	D1U3B	D1V4=	?1V4i@r   c                    \         P                  R 4      pV P                  \        V4      R 4       V P                  \        VRR7      R 4       R# )z(<html><CamelCase>text</CamelCase></html>r~  r}  Nr   r   r   rj   r  s   & r   test_issue18347ElementTreeTest.test_issue18347  sB    FF=>1:	<1V4:	<r   c                D   \         P                  R 4      pV P                  \        VRR7      R4       V P	                  VR4       V P                  \         P                  4      ;_uu_ 4       p\         P                  R4       RRR4       V P                  \        XP                  4      R4       V P                  \         P                  4      ;_uu_ 4       p\         P                  \        4       RRR4       V P                  \        VP                  4      R4       \         P                  4       pR	VP                  R
&   VP                  \        4       VP                  4       pV P	                  VR4       V P                  \         P                  4      ;_uu_ 4       p\         P                  \        4       RRR4       V P                  \        VP                  4      R4       R#   + '       g   i     ELn; i  + '       g   i     EL; i  + '       g   i     L_; i)z*<document title='&#x8230;'>test</document>r6  rA  s*   <document title="&#33328;">test</document>u%   <document title="舰">test</document>z<document>&entity;</document>Nz#undefined entity: line 1, column 10z,undefined entity &entity;: line 5, column 10r   entityz<document>text</document>z,undefined entity &entity;: line 4, column 10)r   r   r   rj   r   r   r  r   r  
ENTITY_XMLrH  r  rJ  rK  EXTERNAL_ENTITY_XML)rH   r  r  rO  rb  s   &    r   test_entityElementTreeTest.test_entity  sx   
 FF?@1z:=	?Q JK r}}--FF23 .R\\*5	7 r}}--FF: .R\\*>	@
 "(hJ||~T#>? r}}--FF&' .R\\*>	@- .--
 .-- .-s$   ,G'G;H'G8	;H	H	c                   \         P                  R 4      pV P                  VR4       \         P                  R4      pV P                  VR4       \         P                  R4      pV P                  VR4       \         P                  R4      pV P                  VR4       \         P                  \        4      pV P                  VR4       R	# )
z<tag xml:lang='en' />z<tag xml:lang="en" />zC<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' />zC<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />z7<html:html xmlns:html='http://www.w3.org/1999/xhtml' />z7<html:html xmlns:html="http://www.w3.org/1999/xhtml" />zG<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope' />zE<ns0:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope" />z<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>N)r   r   r   SAMPLE_XML_NSr  s   & r   test_namespaceElementTreeTest.test_namespace  s    
 vv-.T#:; vv[\TQ	S vvOPTE	G vv_`TS	U vvm$T	r   c                   \         P                  R 4      pV P                  VR4       \         P                  \         P                  R 4      4      pV P                  VR4       \         P                  \         P                  RR4      4      pV P                  VR4       \         P                  \         P                  RR4      4      p\         P	                  V\         P                  RR4      4      p\         P	                  V\         P                  RR4      4      pV P                  VR4       VP                  4        RVP                  R&   V P                  VR	4       VP                  4        RVP                  \         P                  R4      &   V P                  VR	4       VP                  4        R
VP                  R&   V P                  VR4       VP                  4        \         P                  R
4      VP                  R&   V P                  VR4       VP                  4        \         P                  R4      p\         P                  R4      VP                  R&   VP                  V4       VP                  V4       V P                  VR4       V P                  \        \         P                  RR4      4      R4       V P                  \        \         P                  R4      4      R4       \         P                  RR4      p\         P                  RR4      pV P                  W44       \         P                  RR4      pV P                  W44       V P                  VR4       V P                  VR4       R# )z{uri}tagz<ns0:tag xmlns:ns0="uri" />r  rm   tag1r   z;<ns0:tag xmlns:ns0="uri"><ns0:tag1 /><ns0:tag2 /></ns0:tag>r   z{uri}keyz+<ns0:tag xmlns:ns0="uri" ns0:key="value" />z
{uri}valuez0<ns0:tag xmlns:ns0="uri" ns0:key="{uri}value" />z/<ns0:tag xmlns:ns0="uri" ns0:key="ns0:value" />z{uri2}valuez	{uri1}keyz{<ns0:tag xmlns:ns0="uri" xmlns:ns1="uri1" xmlns:ns2="uri2"><tag ns1:key="ns2:value" /><tag ns1:key="ns2:value" /></ns0:tag>nsz{ns}tagz	other-tagzns:tagN)r   r   r   QNamer  r   r   r   r   r   r  )rH   re   r=  q1q2s   &    r   
test_qnameElementTreeTest.test_qname&  s   
 zz*%T#@Azz"((:./T#@Azz"((5%01T#@Azz"((5%01--bhhuf&=>--bhhuf&=>TI	K
 	

")JT9	; 	

,3BHHZ()T9	; 	

".JT>	@ 	

"$((<"8JT=	? 	

**U#&(hh}&={#GGT	 	RXXdE23Y?RXXi019=XXdE"XXdE" XXdK(B#B)Y'r   c                0    \         P                  R 4      pR# )z<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>text</html>N)r   r   r  s   & r   test_doctype_public#ElementTreeTest.test_doctype_publicg  s     vv $ %r   c                  a a ^ RI Ho R0VV 3R llpV! RR.4       V! RRR.4       V! RR	R
.4       V! RR	R.4       V! R. R1O4       V! R. R2O4       V! R. R3O4       V! R. R4O4       V! R. R5O4       V! RRR.4       V! R. R6O4       V! RR.4       V! R. R7O4       V! RR.4       V! R. R8O4       V! R. R9O4       V! R. R:O4       V! RR	R.4       V! RR.4       V! R. R;O4       V! R . R<O4       V! R!R!.4       V! R"R".4       V! R#R#.4       V! R$R$.4       V! R%. R=O4       V! R&. R>OR(R)/4       V! R*R'.RR)/4       V! R+R	R'.R(R)/4       V! R,R	R*.RR)/4       V! R-R	R..RR)/4       V! RR	R.RR)R/R)/4       R# )?r   rE   Nc                    < SP                  SP                  W4       UUu. uF  w  r4T;'       g    TNK  	  uppV4       R # u uppi r   )r   xpath_tokenizer)r  r   
namespacesoprm   rF   rH   s   &&&  r   r4  3ElementTreeTest.test_xpath_tokenizer.<locals>.checkr  sL    -8-H-H-WY-W'" !iiCi-WY%' Ys
   A
A
r   ztext()r   ()z@name@r   z@*zpara[1]parazpara[last()]z*/paraz/doc/chapter[5]/section[2]zchapter//para//z//paraz//olist/item.z.//para..z../@langzchapter[title]z#employee[@secretary and @assistant]r   z	@{ns}attrz{ns}attr{http://spam}eggz
./spam.eggz.//{http://spam}eggz{ns}*{}*{*}tag{*}*z	.//{*}tagz
./xsd:type&{http://www.w3.org/2001/XMLSchema}typexsdz http://www.w3.org/2001/XMLSchematypez	@xsd:typez@typez@{*}typez{*}typer  r   )r  [1])r  r  lastr  r  )r   /r  )r  docr  chapterr  5r  r  sectionr  2r  )r  r  r  )r  olistr  item)r  r  r  )r  r  r  lang)r  r  titler  )
employeer  r  	secretaryr   andr   r  	assistantr  )r  r  zspam.egg)r  r  r  )r  r  r  )r  r  r  )rG   rF   )rH   r4  rF   s   f @r   test_xpath_tokenizer$ElementTreeTest.test_xpath_tokenizero  s    )	' 	' 	cC5h'gV}%dS#Ji01n>?h*+*.	/ 	o89hv'n:;cC5i,-dTFj23 >?3 6K 	L 	kC,- #5"67l23#%DE 	gy!eeWh
#fvhk01 	lP89	;f?@56	8kC!IJ89	;gV}56	8j3	*56	8kC,579	:r   c                   V P                  \        P                  \        P                  R R4      4      R4       V P                  \        P                  \        P	                  R R4      4      R4       V P                  \        P                  \        P	                  R R4      4      R4       V P                  \        P                  \        P	                  R R4      R4      R4       R# )	r/   instructions   <?test instruction?>z
<testing&>s   <?test <testing&>?>u   <testing&>ãzlatin-1s=   <?xml version='1.0' encoding='latin-1'?>
<?test <testing&>?>N)r   r   r3  r   r   r	  s   &r   test_processinginstruction*ElementTreeTest.test_processinginstruction  s     	R%=%=fm%TU'	)RUU6=%AB'	)
 	RUU6<%@A&	(RUU63C%DiP+	,r   c                >   R	 F  pWP                  4       3 F~  pRV,          p\        \        P                  RV,          4      RR7      pV P	                  WC4       \        \        P                  RV: RV: R24      RR7      pV P	                  WC4       K  	  K  	  R# )
AREAz<%s>z<%s />r~  r}  <z></r-  N)r  BASEBASEFONTBRCOLEMBEDFRAMEHRIMGINPUTISINDEXLINKMETAPARAMSOURCETRACKWBR)lowerrj   r   r   r   )rH   r   re   r   
serializeds   &    r   #test_html_empty_elems_serialization3ElementTreeTest.test_html_empty_elems_serialization  s~    2G !--/2!D=&rvvho'>vN
  6&rvvT$.G'H.46
  6 32r   c                   \         P                  R RRR7      p\        P                  ! 4       ;_uu_ 4       p\         P	                  V4       RRR4       V P                  XP                  4       R4       R#   + '       g   i     L2; i)
cirriculumpublicexamplestatuscompanyNz1<cirriculum status="public" company="example" />
)r   r   r   captured_stdoutdumpr   rc   )rH   r  stdouts   &  r   test_dump_attribute_order)ElementTreeTest.test_dump_attribute_order  s[    JJ|HiJH$$&&&GGAJ '*M	O '&s   A66B	c                    \         P                  R RRR7      pV P                  \        V4      R4       V P                  \        VRR7      R4       R# )	r  r  r  r  z0<cirriculum status="public" company="example" />r~  r}  z;<cirriculum status="public" company="example"></cirriculum>N)r   r   r   rj   rH   rb  s   & r   test_tree_write_attribute_order/ElementTreeTest.test_tree_write_attribute_order  sI    zz,xzK4K	M47M	Or   c                    \         P                  \        4      pV P                  V^ ,          P                  RR/4       R# )r   z*{http://www.w3.org/XML/1998/namespace}langengN)r   r   ATTLIST_XMLr   r   r  s   & r   test_attlist_default$ElementTreeTest.test_attlist_default  s1    }}[)aFN	Pr   r   N)6rT   rU   rV   rW   r   r   r   r   r   r  r
  r  r  r%  r5  r>  rP  r^  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r  r  r'  r*  r/  rz  r  r  r  r  r  r  r  r  r  r  r  r  rX   rY   rZ   s   @r   r   r      s    44 &@:D?6*?X$	!6 
<4plH,+Z2,U%n1fP";z,>#)JO*
X
2
 
@	

N


*X	
S&9KvA<#@JB?(B%8:t, 7OOP Pr   r   c                     a  ] tR tRt o RR ltRR ltRR ltRR ltRR ltR t	R	 t
R
 tR tR tR tR tR tR tR tR tR tR t]P.                  ! ]P2                  R8  R]P2                   R24      R 4       tR tRtV tR# )XMLPullParserTesti  Nc                    Vf   VP                  V4       M6\        ^ \        V4      V4       F  pVP                  W%WS,            4       K  	  V'       d   VP                  4        R # R # r   )rJ  r  r   flush)rH   rO  r=   
chunk_sizer  r  s   &&&&& r   _feedXMLPullParserTest._feed  sO    KK1c$i4D1<01 5LLN r   c           	         T P                  \        VP                  4       V4       UUu. uF  w  rEWEP                  VP                  33NK   	  uppV4       R # u uppi r   )r   r   read_eventsrm   r   )rH   rO  r   
max_eventseventre   s   &&&&  r   assert_eventsXMLPullParserTest.assert_events  sX     &v'9'9';Z HJ H hh		*+ HJ	Js   $A
c                l    V P                  \        \        VP                  4       V4      4      V4       R # r   )r   r   r   r  )rH   rO  r   r  s   &&&&r   assert_event_tuples%XMLPullParserTest.assert_event_tuples  s+    **,j9:	r   c                    \        VP                  4       V4      pT P                  V UUu. uF  w  rVWVP                  3NK  	  uppV4       R # u uppi r   )r   r  r   rm   )rH   rO  r   r  re  r  re   s   &&&&   r   assert_event_tags#XMLPullParserTest.assert_event_tags  sE    **,j9H688,H!	#Hs   A
c                0   \         P                  4       pV P                  V. 4       V P                  VR W4       V P                  V. 4       V P                  VRW4       V P                  V. 4       V P                  VRW4       V P                  VR.4       V P                  VRW4       V P                  VRW4       V P                  VRR.4       V P                  VRW4       V P                  VR	.4       V P	                  VP                  4       4       R# )
<!-- comment -->
z+<root>
  <element key='value'>text</element>
<element>text</element>tail
<empty-element/>
</root>
Nrj  rk  rl  r   XMLPullParserr  r  r   rK  )rH   r  r  rO  s   &&& r   test_simple_xml!XMLPullParserTest.test_simple_xml  s   !!#vr*

6/Cvr*

6A	& 	vr*

65*4v(:';<

6:JN

6/Cv$( 	 	

6;
:v'89&,,.)r   c                ,    V P                  ^RR7       R# )r   Tr  r  Nr  r	  s   &r   test_simple_xml_chunk_1)XMLPullParserTest.test_simple_xml_chunk_1      6r   c                ,    V P                  ^RR7       R# )   Tr  Nr  r	  s   &r   test_simple_xml_chunk_5)XMLPullParserTest.test_simple_xml_chunk_5  r  r   c                *    V P                  ^R7       R# )   )r  Nr  r	  s   &r   test_simple_xml_chunk_22*XMLPullParserTest.test_simple_xml_chunk_22  s    +r   c                   \         P                  4       pVP                  4       pV P                  VR 4       \	        V4      w  r4V P                  W4P                  3R4       V P                  VR4       \	        V4      w  r4V P                  W4P                  3R4       V P                  \        4      ;_uu_ 4        \	        V4       RRR4       R#   + '       g   i     R# ; i)z-<root>
  <element key='value'>text</element>
r
  Nrj  rl  )	r   r  r  r  r  r   rm   r   r  )rH   rO  r   r  re   s   &    r   test_feed_while_iterating+XMLPullParserTest.test_feed_while_iterating  s    !!#!

6LMBx&((+-?@

6;'Bx&((+_=}--H .---s   :CC!	c                l   \         P                  4       pV P                  V. 4       V P                  VR 4       V P                  V. 4       V P                  VR4       V P                  V. 4       V P                  VR4       V P                  V. 4       V P                  VR4       V P                  VR.4       V P                  VR4       V P                  VR4       V P                  VRR	.4       V P                  VR4       V P                  VR
.4       V P	                  VP                  4       4       R# )r  <root xmlns='namespace'>
"<element key='value'>text</elementr  r  r	  r
  Nrm  ro  rq  r  rH   rO  s   & r   test_simple_xml_with_ns)XMLPullParserTest.test_simple_xml_with_ns#  s   !!#vr*

6/0vr*

678vr*

6?@vr*

65!v(E'FG

6:;

6/0v)/( 	 	

6;'v(B'CD&,,.)r   c                   \         P                  R
R7      pV P                  VR4       V P                  VR4       V P                  \	        VP                  4       4      R.4       V P                  VR4       V P                  VR4       V P                  VR4       V P                  VR4       V P                  VR4       V P                  \	        VP                  4       4      R.4       V P                  VP                  4       4       R	# )rf  rd  r  r!  r"  r  r  r	  r
  Nr~  rx  r}  )r   r  r  r   r   r  r   rK  r#  s   & r   test_ns_events XMLPullParserTest.test_ns_events8  s    !!)?!@

6/0

678##%&,-	/ 	

6?@

65!

6:;

6/0

6;'f00236F5GH&,,.)r   c                b   \         P                  RR7      pV P                  VR4       V P                  VRR	.^R7       V P	                  VR
.^R7       V P                  VR4       V P	                  VRR.4       V P                  VR4       VP                  4        V P	                  VR.4       R# )rf  rd   <tag xmlns='abc' xmlns:p='xyz'>
r  
<child />
</tag>
N)rf  rt  ra  rf  )r   abcrf  )r  xyzrt  {abc}tagrt  
{abc}childra  r5  ra  r3  r   r  r  r   r  rK  r#  s   & r   test_ns_events_start&XMLPullParserTest.test_ns_events_startG  s    !!)E!F

6>?  %&*
  	! 	 	v!(
 	 	 	

6=)v#!(
 	
 	

6:&v(
 	r   c                   \         P                  RR7      pV P                  VR4       V P                  VRR	.^R7       V P	                  VR
.^R7       V P                  VR4       V P	                  VRR.4       V P                  VR4       VP                  4        V P	                  VR.^R7       V P                  VRR.4       R# )rf  rd  r*  r+  r,  r-  N)rf  rt  ra  rg  r.  r0  r2  r4  r6  r7  r}  r8  r#  s   & r   test_ns_events_start_end*XMLPullParserTest.test_ns_events_start_end^  s    !!)O!P

6>?  %&*
  	! 	 	v!(
 	 	 	

6=)v#!(
 	
 	

6:&v(
 	 	 	  *
 	r   c                   \         P                  R
R 7      pV P                  VR4       V P                  V. 4       \         P                  RR 7      pV P                  VR4       V P	                  V. 4       \         P                  RR 7      pV P                  VR4       V P                  VR.4       V P                  VR4       V P                  VR.4       V P                  VR4       V P                  VR.4       V P                  VR4       V P                  V. RO4       V P                  VR4       V P                  VP                  4       4       V P                  VR.4       \         P                  RR 7      pV P                  VR4       V P                  V. 4       V P                  VR4       V P                  VR.4       V P                  VR4       V P                  VR.4       V P                  VR4       V P                  V. 4       V P                  VR4       V P                  VRR.4       V P                  VR4       V P                  VP                  4       4       R	# )rd  z<root/>
<!-- text here -->
z<root>
r"  r  z8<element xmlns='foo'>text<empty-element/></element>tail
z</root>r  Nr   rs  rv  rw  rj  rt  {foo}elementrt  {foo}empty-element)r@  rB  )ra  rC  )ra  rA  rl  )rt  )r   r  r  r  r  r   rK  r#  s   & r   test_eventsXMLPullParserTest.test_eventsy  s%   !!!,

6;'vr*!!)9!:

61262&!!)9!:

6:&v(9':;

6?@v(<'=>

65!v(:';<

6N	Pv ( 	 	

69%&,,.)v'89!!!4

6/0vr*

6:&v(9':;

6?@v(<'=>

65!vr*

6N	Pv%+( 	 	

69%&,,.)r   c                   \         P                  RR7      pV P                  VR4       V P                  VR\         P                  R33.4       V P                  VR4       V P                  VR\         P                  R33.4       V P                  VR4       V P                  VR.4       V P                  VR4       V P                  VR\         P                  R	33.4       V P                  VR
4       V P                  VR.4       V P                  VR4       V P                  VR\         P                  R33.4       \         P                  RR7      pV P                  VR4       V P                  VR\         P                  R33.4       R# )rt  r  rd  r?  z text here z<!-- more text here -->
z more text here z<root-tag>textz<!-- inner comment-->
z inner commentz</root-tag>
z<!-- outer comment -->
z outer comment N)rt  r  ra  )rt  root-tag)ra  rG  )r  )r   r  r  r  r  r  r#  s   & r   test_events_comment%XMLPullParserTest.test_events_comment  sa   !!)D!E

6126Y]0K$L#MN

6676Y=O0P$Q#RS

6+,v(='>?

6456Y=M0N$O#PQ

6?+v(;'<=

6566Y=N0O$P#QR!!!6

6126Y]0K$L#MNr   c                :   \         P                  RR7      pV P                  VR4       V P                  VR\         P                  R33.4       \         P                  R	R7      pV P                  VR4       V P                  VR\         P                  R33.4       R# )
rt  r  rd  z<?pitarget?>
pitargetz<?pitarget some text ?>
zpitarget some text N)rt  r  ra  )r  )r   r  r  r  r   r#  s   & r   test_events_pi XMLPullParserTest.test_events_pi  s    !!)?!@

6+,6TBEE:+>$?#@A!!!1

6676TBEE3H+I$J#KLr   c                   R R0p\         P                  VR7      pV P                  VR4       V P                  VRR.4        ! R R4      p\         P                  V! 4       R7      pV P                  VR4       V P                  VRR.4       R# )	ra  rt  rd  z<foo>bar</foo>c                   2   a  ] tR tRt o R tR tR tRtV tR# )9XMLPullParserTest.test_events_sequence.<locals>.DummyIteri  c                *    \        . RO4      V n        R# )rt  N)rt  ra  rf  )r   re  r	  s   &r   __init__BXMLPullParserTest.test_events_sequence.<locals>.DummyIter.__init__  s    "#?@r   c                    V # r   r   r	  s   &r   __iter__BXMLPullParserTest.test_events_sequence.<locals>.DummyIter.__iter__  s    r   c                ,    \        V P                  4      # r   )r  re  r	  s   &r   r   BXMLPullParserTest.test_events_sequence.<locals>.DummyIter.__next__  s    DKK((r   rd  N)	rT   rU   rV   rW   rR  rU  r   rX   rY   rZ   s   @r   	DummyIterrP    s     A) )r   rY  N)rt  r  )ra  r  )r   r  r  r  )rH   eventsetrO  rY  s   &   r   test_events_sequence&XMLPullParserTest.test_events_sequence  s    7#!!!2

6+,v(8.'IJ	) 	) !!!5

6+,v(8.'IJr   c                    V P                  \        4      ;_uu_ 4        \        P                  RR7       RRR4       R#   + '       g   i     R# ; i)rt  rd  Nr  )r   r  r   r  r	  s   &r   test_unknown_event$XMLPullParserTest.test_unknown_event  s4    z**$=> +***s	   ?A	zExpat z" does not support reparse deferralc                <   \         P                  RR7      pR F  pVP                  V4       K  	  V P                  V. 4       \         \        J d4   V P                  VP                  P                  P                  4       4       VP                  4        V P                  VR.4       \         \        J d4   V P                  VP                  P                  P                  4       4       VP                  R4       VP                  4        V P                  VR.4       R# )rt  rd  </doc>Nrs  z<docr-  rt  r  ra  r  )
r   r  rJ  r  r   r   _parserGetReparseDeferralEnabledr  rK  rH   rO  chunks   &  r   #test_flush_reparse_deferral_enabled5XMLPullParserTest.test_flush_reparse_deferral_enabled  s     !!)9!:"EKK # 	vr*:OOFNN22LLNOv(8'9::OOFNN22LLNOHv'78r   c                   \         P                  RR7      pR F  pVP                  V4       K  	  \        P                  R8  dW   \         \
        J g   V P                  R4       VP                  P                  P                  R4       V P                  V. 4       \         \
        J d4   V P                  VP                  P                  P                  4       4       VP                  4        V P                  VR	.4       \         \
        J d4   V P                  VP                  P                  P                  4       4       VP                  R4       VP                  4        V P                  VR
.4       R# )rt  rd  zDXMLParser.(Get|Set)ReparseDeferralEnabled methods not available in CFra  Nrs  rb  r      r   rc  rd  )r   r  rJ  pyexpatversion_infor   skipTestre  SetReparseDeferralEnabledr  r  rf  r  rK  rg  s   &  r   $test_flush_reparse_deferral_disabled6XMLPullParserTest.test_flush_reparse_deferral_disabled  s   !!)9!:"EKK # 9,: !; <NN""<<UC""62.:V^^33MMOPv(8'9::V^^33MMOPHv'78r   r   )NFr   rl  )rT   rU   rV   rW   r  r  r   r  r  r  r  r  r  r$  r'  r9  r<  rD  rH  rL  r[  r^  unittestskipIfrn  ro  ri  rr  rX   rY   rZ   s   @r   r  r    s     
#
**77,
***.6,*\O&MK&? __W))I5g223 40 01919*9 9r   r  z<?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>
C1.xmlz<?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>
zdisclaimer.xmlz<?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>
C2.xml324387z	count.txtz<?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>
C2b.xmlz<?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>
C3.xmlzQ<?xml version='1.0'?>
<data>
  <item><![CDATA[Brooks & Shields]]></item>
</data>
zdata.xmlaW  <?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>
C5.xmlz<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>Example.</p>
  <xi:include href="{}"/>
</document>
default.xmla  <?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>The following is the source code of Recursive1.xml:</p>
  <xi:include href="C1.xml"/>
  <xi:include href="C1.xml"/>
  <xi:include href="C1.xml"/>
  <xi:include href="C1.xml"/>
</document>
include_c1_repeated.xmlz<?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>
B1.xmlzn<?xml version='1.0'?>
<div xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:fallback></xi:fallback>
</div>
B2.xmlz<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>The following is the source code of Recursive2.xml:</p>
  <xi:include href="Recursive2.xml"/>
</document>
Recursive1.xmlz<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>The following is the source code of Recursive3.xml:</p>
  <xi:include href="Recursive3.xml"/>
</document>
zRecursive2.xmlz<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>The following is the source code of Recursive1.xml:</p>
  <xi:include href="Recursive1.xml"/>
</document>
zRecursive3.xmlc                   R   a  ] tR tRt o RR ltRR ltR tR tR tR t	R	 t
R
tV tR# )XIncludeTesti  Nc                     \         V,          pTR8X  d   \        P	                  T4      pT#   \         d    \        R 4      hi ; i)resource not foundr3  )XINCLUDEKeyErrorOSErrorr   r   )rH   hrefrD  r^   r=   s   &&&& r   xinclude_loaderXIncludeTest.xinclude_loader  sH    	0D>D E>66$<D	  	0.//	0s	   - Ac                    R # r   r   )rH   r  rO  r^   s   &&&&r   none_loaderXIncludeTest.none_loader  s    r   c                    VR 8X  dC   \        VR4      ;_uu_ 4       p\        P                  V4      P                  4       uuRRR4       # R#   + '       g   i     R# ; i)r3  rc  N)rF  r   rD  r   )rH   r  rD  rN  s   &&& r   
_my_loaderXIncludeTest._my_loader  sG     E>dD!!Qxx{**, "!  "!!s   #AA	c                    ^ RI Hp V P                  R4      pVP                  W P                  4       V P                  \        V4      R4       R# )r   rC   r|  z<document>
  <p>Example.</p>
  <root>
   <element key="value">text</element>
   <element>text</element>tail
   <empty-element />
</root>
</document>N)rG   rD   r  includer  r   rj   )rH   rD   r  s   &  r   test_xinclude_default"XIncludeTest.test_xinclude_default  s@    ,""=1sOO43	r   c                   ^ RI Hp V P                  R4      pVP                  W P                  4       V P	                  \        V4      R4       V P                  R4      pVP                  W P                  4       V P	                  \        V4      R4       V P                  R4      pVP                  W P                  4       V P	                  \        V4      R4       V P                  R4      pVP                  W P                  4       V P	                  \        V4      R	4       V P                  R
4      pV P                  \        4      ;_uu_ 4       pVP                  W P                  4       RRR4       V P	                  \        XP                  4      R4       V P	                  \        V4      R4       R#   + '       g   i     LR; i)r   rC   rv  a  <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>rw  zO<document>
  <p>This document has been accessed
  324387 times.</p>
</document>ry  zX<document>
  <p>This document has been <em>accessed</em>
  324387 times.</p>
</document>rz  z<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>r{  Nr  aI  <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>)
rG   rD   r  r  r   rj   r   r  r   r  rH   rD   r  r  s   &   r   test_xincludeXIncludeTest.test_xinclude  s   , ''1x)=)=>8,	 ''1x)=)=>8,	 ''	2x)=)=>8,	 ''1x)=)=>8,	 ''1w''2""8-A-AB (R\\*,@A8,		 ('s   F77G	c                    ^ RI Hp V P                  R4      pVP                  W P                  4       V P	                  ^	\        VP                  R4      4      4       R# )r   rC   r}  z.//pN)rG   rD   r  r  r   r   r   )rH   rD   r  s   &  r   test_xinclude_repeated#XIncludeTest.test_xinclude_repeated  sJ    ,''(ABx)=)=>H$4$4V$< =>r   c                   ^ RI Hp \        P                  \        R,          4      pV P                  VP                  4      ;_uu_ 4       pVP                  W P                  R7       RRR4       V P                  \        XP                  4      R4       \        P                  \        R,          4      pV P                  VP                  4      ;_uu_ 4       pVP                  W P                  R7       RRR4       V P                  \        VP                  4      R4       \        P                  \        R,          4      pV P                  VP                  4      ;_uu_ 4       pVP                  W P                  R7       RRR4       V P                  \        VP                  4      R	4       \        P                  \        R
,          4      pV P                  VP                  4      ;_uu_ 4       pVP                  W P                  R7       RRR4       V P                  \        VP                  4      R4       V P                  R4      pV P                  VP                  4      ;_uu_ 4       pVP                  W P                  4       RRR4       V P                  \        VP                  4      R4       V P                  R4      pV P                  VP                  4      ;_uu_ 4       pVP                  W P                  RR7       RRR4       V P                  \        VP                  4      R4       V P                  R4      pV P                  VP                  4      ;_uu_ 4       pVP                  W P                  ^ R7       RRR4       V P                  \        VP                  4      R4       V P                  R4      pV P                  VP                  4      ;_uu_ 4       pVP                  W P                  ^R7       RRR4       V P                  \        VP                  4      R4       V P                  R4      pV P                  VP                  4      ;_uu_ 4       pVP                  W P                  ^R7       RRR4       V P                  \        VP                  4      R4       V P                  R4      pV P                  VP                  4      ;_uu_ 4       pVP                  W P                  ^R7       RRR4       V P                  \        VP                  4      R4       R#   + '       g   i     EL; i  + '       g   i     EL^; i  + '       g   i     EL; i  + '       g   i     ELl; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL-; i  + '       g   i     EL; i  + '       g   i     ELW; i  + '       g   i     L; i)r   rC   rv  )r   Nz%cannot load 'disclaimer.xml' as 'xml'rw  z!cannot load 'count.txt' as 'text'r~  z1unknown parse type in xi:include tag ('BAD_TYPE')r  zYxi:fallback tag must be child of xi:include ('{http://www.w3.org/2001/XInclude}fallback')r  z#recursive include of Recursive2.xml)	max_depthzAmaximum xinclude depth reached when including file Recursive2.xmlzAmaximum xinclude depth reached when including file Recursive3.xmlzAmaximum xinclude depth reached when including file Recursive1.xml)rG   rD   r   r   r  r   FatalIncludeErrorr  r  r   r   r  XINCLUDE_BADr  LimitedRecursiveIncludeErrorr  s   &   r   test_xinclude_failures#XIncludeTest.test_xinclude_failures  s   , 66(8,-~??@@B""84D4D"E AR\\*7	9 66(8,-~??@@B""84D4D"E AR\\*3	5 66,x01~??@@B""84D4D"E AR\\*C	E 66,x01~??@@B""84D4D"E AR\\*@	A
 ''(89~??@@B""8-A-AB AR\\*5	7 ''(89~??@@B""8-A-AT"R AR\\*5	7 ''(89~JJKKr""8-A-AQ"O LR\\*S	U ''(89~JJKKr""8-A-AQ"O LR\\*S	U ''(89~JJKKr""8-A-AQ"O LR\\*S	U ''(89~??@@B""8-A-AQ"O AR\\*5	7} A@@ A@@ A@@ A@@ A@@ A@@ LKK LKK LKK A@sx   
T5U	$U1U1/V,V+V-*W)W(W)5U		U	U.	1V	V	V*	-V>	W	W&	)W9	r   )r3  Nr   )rT   rU   rV   rW   r  r  r  r  r  r  r  rX   rY   rZ   s   @r   r  r    s0     >@?D7 D7r   r  c                     a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 t]P                  ! ]P                   ! 4       R4      R 4       tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R t#R t$R t%V t&R!# )"BugsTestiF  c                  a  V 3R  lp\         P                  ^{4      pV! V4       \         P                  R4      p^{Vn        V! V4       \         P                  R4      p^{Vn        V! V4       \         P                  R4      pVP	                  ^{R4       V! V4       \         P                  R4      pVP	                  R^{4       V! V4       R# )c                    < SP                  \        4      ;_uu_ 4       p\        V 4       R R R 4       SP                  \	        XP
                  4      R4       R #   + '       g   i     L7; i)Nzcannot serialize 123 (type int))r   r   rj   r   r   r  )re   r  rH   s   & r   r4  -BugsTest.test_bug_xmltoolkit21.<locals>.checkK  sG    ""9--$ .S.57 .-s   AA*	re   123N)r   r   r   r   r   )rH   r4  re   s   f  r   test_bug_xmltoolkit21BugsTest.test_bug_xmltoolkit21H  s    	7 zz#dzz&!	dzz&!	dzz&!edzz&!dr   c                    \         P                  \        4      p\         P                  V4      pV P	                  VP                  R 4      R4       V P	                  VP                  R4      R4       R# )rm   r   r  r  N)r   r   r  rB   r   r   )rH   re   ri   s   &  r   test_bug_xmltoolkit25BugsTest.test_bug_xmltoolkit25d  sR     vvj!~~d#u-v6}5yAr   c                    \         P                  R 4      pV P                  \        VP	                  R4      4      . 4       V P                  \        VP	                  R4      4      R.4       R# )"<doc><table><tbody/></table></doc>z.//theadz.//tbodytbodyN)r   r   r   ro   r   r   s   & r   test_bug_xmltoolkit28BugsTest.test_bug_xmltoolkit28l  sQ     vv:;Z(@A2FZ(@AG9Mr   c                   \         P                  R 4      p\        P                  ! 4       ;_uu_ 4       p\         P	                  V4       V P                  VP                  4       R4       RRR4       R#   + '       g   i     R# ; i)r  z$<doc><table><tbody /></table></doc>
N)r   r   r   r  r  r   rc   )rH   ri   r  s   &  r   test_bug_xmltoolkitX1BugsTest.test_bug_xmltoolkitX1s  sV     vv:;$$&&&GGDMV__.0WX '&&&s   6A33B	c                   \         P                  R 4      pV P                  \         P                  VR4      R4       \         P                  R4      pV P                  VP                  RR/4       V P                  \         P                  VR4      R4       \         P                  R4      pV P                  \         P                  VR4      R4       \         P                  R	4      pV P                  \         P                  VR4      R4       \         P                  R
4      pVP                  RR4       V P                  \         P                  VR4      R4       R# )s2   <?xml version='1.0' encoding='iso-8859-1'?><tg />r   s   <täg />sD   <?xml version='1.0' encoding='iso-8859-1'?><tag ttr='v&#228;lue' />u   ättru   välues   <tag ättr="välue" />s:   <?xml version='1.0' encoding='iso-8859-1'?><tg>text</tg>s   <täg>text</täg>r   rm   N)r   r   r   r3  r   r   r   r   s   & r   test_bug_xmltoolkit39BugsTest.test_bug_xmltoolkit39{  s    vvNOT735FGvv 6 7y*&=>T735	7 vv / 0T730	2 zz*%T735FGzz% l+T735	7r   c                    \         P                  R 4      pV P                  \        VRR7      R4       V P                  \        V4      R4       R# )z=<!DOCTYPE doc [<!ENTITY ldots '&#x8230;'>]><doc>&ldots;</doc>r6  rA  s   <doc>&#33328;</doc>u   <doc>舰</doc>Nr  r  s   & r   test_bug_xmltoolkit54BugsTest.test_bug_xmltoolkit54  sF     FF ( )1z:&	(1':;r   c                    V P                  \        P                  4      ;_uu_ 4       p\        P                  R 4       RRR4       V P	                  \        XP                  4      R4       R#   + '       g   i     L7; i)s?   <!DOCTYPE doc SYSTEM 'doc.dtd'><doc>&ldots;&ndots;&rdots;</doc>Nz+undefined entity &ldots;: line 1, column 36)r   r   r  r   r   r   r  )rH   r  s   & r   test_bug_xmltoolkit55BugsTest.test_bug_xmltoolkit55  sX     r}}--FF 7 8 . 	R\\*=	? .-s   A--A=	c                n     ! R  R4      pV P                  \        \        P                  V! 4       4       R# )c                   &   a  ] tR tRt o R tRtV tR# )5BugsTest.test_bug_xmltoolkit60.<locals>.ExceptionFilei  c                    \         hr   )r  rH   r   s   &&r   rG  :BugsTest.test_bug_xmltoolkit60.<locals>.ExceptionFile.read  s    r   r   N)rT   rU   rV   rW   rG  rX   rY   rZ   s   @r   ExceptionFiler    s      r   r  N)r   r  r   rD  )rH   r  s   & r   test_bug_xmltoolkit60BugsTest.test_bug_xmltoolkit60  s&    	 	 	'288]_=r   c                   R RRR/p\         P                  4       pVP                  P                  V4       VP	                  R4       VP                  4       pV P                  VP                  R4      P                  R4       R# )rsquou   ’lsquou   ‘aF  <?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>z.//paragraphu7   A new cultivar of Begonia plant named ‘BCT9801BEG’.N)	r   rH  r  updaterJ  rK  r   r   r   )rH   ENTITIESrO  ts   &   r   test_bug_xmltoolkit62BugsTest.test_bug_xmltoolkit62  sp     Xw9X& % 	& LLN/44K	Mr   zSkips under coverage.c                    R  pV! 4        \         P                  ! R4      p\        R4       F
  pV! 4        K  	  V P                  \         P                  ! R4      V4       R# )c                      \         P                  4       p V P                  R / 4       V P                  R4       V P	                  R 4       R# )rm   r   N)r   rL  rt  r=   ra  )ri   s    r   xmltoolkit634BugsTest.test_bug_xmltoolkit63.<locals>.xmltoolkit63  s3    >>#DJJub!IIfHHUOr   Ni  )rz   getrefcountr  r   )rH   r  countr  s   &   r   test_bug_xmltoolkit63BugsTest.test_bug_xmltoolkit63  sH    	 	%tAN .6r   c           	        \         P                  R RR7      pV P                  \         P                  V4      R4       V P                  \         P	                  \         P                  V4      4      P                  R4      R4       V P                  \         P                  \         P	                  \         P                  V4      4      4      R4       R# )SomeTagzdef _f():
  return 3
r   s0   <SomeTag text="def _f():&#10;  return 3&#10;" />r   N)r   r   r   r3  r   r   r  s   & r   test_bug_200708_newline BugsTest.test_bug_200708_newline  s     JJy'@JAQC	EA/33F;)	+RVVBKKN%;<C	Er   c                d   \         P                  4       pVP                  R 4       V P                  VP	                  4       P
                  R4        ! R R4      p\         P                  V! 4       R7      pVP                  R 4       V P                  VP	                  4       P
                  R4       R# )z<element>some text</element>r   c                   &   a  ] tR tRt o R tRtV tR# )2BugsTest.test_bug_200708_close.<locals>.EchoTargeti  c                ,    \         P                  R 4      # )r   r   r   r	  s   &r   rK  8BugsTest.test_bug_200708_close.<locals>.EchoTarget.close  s    zz),,r   r   NrT   rU   rV   rW   rK  rX   rY   rZ   s   @r   
EchoTargetr    s     - -r   r  rB  N)r   rH  rJ  r   rK  rm   )rH   rO  r  s   &  r   test_bug_200708_closeBugsTest.test_bug_200708_close  s}    23++Y7	- 	- Z\223++Y7r   c                   \         P                  R 4      p\         P                  VR 4      pV P                  \	        VRR7      R4       \         P                  R 4      p\         P                  VR 4      p\         P                  VR4      pV P                  \	        VRR7      R4       \         P                  R 4      p\         P                  VR 4      p\         P                  VR4      pV P                  \        4      ;_uu_ 4       p\	        VRR7       RRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)	z{default}elemr(  )r  z%<elem xmlns="default"><elem /></elem>z{not-default}elemzI<elem xmlns="default" xmlns:ns1="not-default"><elem /><ns1:elem /></elem>re   Nz<cannot use non-qualified names with default_namespace option)	r   r   r  r   rj   r   r  r   r  )rH   r  sr  s   &   r   !test_bug_200709_default_namespace*BugsTest.test_bug_200709_default_namespace  s    JJ'MM!_-1	B7	9 JJ'MM!_-MM!011	B	 JJ'MM!_-MM!V$z**ba95 +R\\*N	P +*s   EE	c                   \         P                  R 4      pV P                  \         P                  V4      R4       \         P	                  RR4       \         P                  R 4      pV P                  \         P                  V4      R4       \         P                  R4      pV P                  \         P                  V4      R4       R# )z/{http://namespace.invalid/does/not/exist/}titlesB   <ns0:title xmlns:ns0="http://namespace.invalid/does/not/exist/" />r  z(http://namespace.invalid/does/not/exist/sB   <foo:title xmlns:foo="http://namespace.invalid/does/not/exist/" />z'{http://purl.org/dc/elements/1.1/}titles8   <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/" />N)r   r   r   r3  register_namespacer  s   & r   "test_bug_200709_register_namespace+BugsTest.test_bug_200709_register_namespace  s    JJHIQQ	S
e%OPJJHIQQ	S
 JJ@AQG	Ir   c                   \         P                  R 4      pVP                  \         P                  R4      4       V P	                  V^ ,          P
                  \         P                  4       \         P                  R 4      pVP                  \         P                  R4      4       V P	                  V^ ,          P
                  \         P                  4       R# )r   r  N)r   r   r   r  r   rm   r   )rH   r   s   & r   test_bug_200709_element_comment(BugsTest.test_bug_200709_element_comment	  s     JJsO	E"#12::.JJsO	u1255)r   c                n   \         P                  R 4      p\         P                  VR4      p\         P                  VR4      p\         P                  R4      pVP                  ^ V4       V P	                  \        V4      . RO4       VP                  RV4       V P	                  \        V4      . RO4       R# )r   r   r   r   N)r   r   r   r  )r   r   r   r   )r   r   r  r   r   ro   rH   r   r   r   r   s   &    r   test_bug_200709_element_insert'BugsTest.test_bug_200709_element_insert	  s    JJsOMM!S!MM!S!JJsO	A*O<	Q*,@Ar   c                6   \         P                  R 4      p\         P                  VR4      p\         P                  R4      pVP	                  V4       V P                  \        VP                  \         P                  4      4      \         P                  .4       R# )r   r   zTEST-bN)r   r   r  r  r   r   ro   r   )rH   r   r   	comment_bs   &   r   test_bug_200709_iter_comment%BugsTest.test_bug_200709_iter_comment$	  sa    JJsOMM!S!JJx(		rzz(:;bjj\Jr   c                    \         P                  4       pVP                  R 4      pVP                  R/ 4      pVP	                  R4      pVP                  4       pV P                  \        V4      R4       R# )r=   rm   r8  N)r   rL  r=   rt  ra  rK  r   rj   )rH   r   r  s   &  r   test_bug_1534630BugsTest.test_bug_1534630.	  sX    nnHHVIIeR GGENIIK1y1r   c                    \         P                  R 4      pV P                  \         P                  VR4      R4       \         P                  R4      pV P                  \         P                  VR4      R4       R# )s7   <?xml version='1.0' encoding='utf-8'?><body>tãg</body>rU  s<   <?xml version='1.0' encoding='ascii'?>
<body>t&#227;g</body>s;   <?xml version='1.0' encoding='iso-8859-1'?><body>tg</body>Nr  r  s   & r   test_issue6233BugsTest.test_issue62336	  sj    FF . /Q0)	* FF * +Q0)	*r   c                    \         P                  R 4      pV P                  \        V4      R.4       \         P                  \        4      pVR,          VR&   V P                  \        V4      . RO4       R# )r   rm   r9  Nrm   rm   r  )r   r   r   ro   r  )rH   re   newelems   &  r   test_issue6565BugsTest.test_issue6565B	  sY    vv+,-w7&&$!*Q-/HIr   c                ^    \         P                  R R4       \         P                  R R4       R# )	test10777zhttp://myuri/N)r   r  r	  s   &r   test_issue10777BugsTest.test_issue10777I	  s$     	k?;
k?;r   c                4  a  ! V3R  lR4      p\         P                  R4      oV! 4       Sn        SP                  4       p\	        V4      pV P                  W14       V P                  SP                  \        4       V P                  SP                  R4       R# )c                   .   <a  ] tR tRt o V3R ltRtV tR# )%BugsTest.test_lost_text.<locals>.TextiR	  c                   < R Sn         R# changedTr  r  s   &r   __bool__.BugsTest.test_lost_text.<locals>.Text.__bool__S	  s    "r   r   NrT   rU   rV   rW   r  rX   rY   r[   r  s   @r   r   r  R	        r   r   rm   r  N)r   r   r   r   r  r   r   r   rH   r   r  r  r  s   &   @r   test_lost_textBugsTest.test_lost_textP	  sp    	 	
 JJuJJLGa&affc*+r   c                  a  ! V3R  lR4      p\         P                  R4      oSP                  \         P                  R4      4       V! 4       S^ ,          n        SP	                  4       p\        V4      pV P                  W14       V P                  S^ ,          P                  \        4       V P                  S^ ,          P                  R4       R# )c                   .   <a  ] tR tRt o V3R ltRtV tR# )%BugsTest.test_lost_tail.<locals>.Textia	  c                $   < R S^ ,          n         R# r  )r   r  s   &r   r  .BugsTest.test_lost_tail.<locals>.Text.__bool__b	  s    %!	r   r   Nr  r  s   @r   r   r  a	  r  r   r   rb  rm   r  N)	r   r   r   r   r   r  r   r   r   r  s   &   @r   test_lost_tailBugsTest.test_lost_tail_	  s    	 	
 JJv	E"#F!	JJLGa&adii-1I.r   c                4  aa  ! VV3R  lR4      p\         P                  R4      oSP                  \         P                  V! 4       4      4       SP                  \         P                  R4      4       SP                  R4      o \	        S4      pV P                  XP                  V4       V P                  S^ ,          P                  \        4       V P                  S^ ,          P                  R4       R#   \
         d    T P                  R4        Li ; i)c                   0   <a  ] tR tRt o VV3R ltRtV tR# )$BugsTest.test_lost_elem.<locals>.Tagiq	  c                N   < \         P                  R 4      S^ &   \        S4       R# r  )r   r   r  )rH   r)  r  r  s   &&r   r   +BugsTest.test_lost_elem.<locals>.Tag.__eq__r	  s    zz),!Qr   r   NrT   rU   rV   rW   r   rX   rY   )r[   r  r  s   @r   r   r   q	  s      r   r   rb  rm   zgenerators are not reentrantr  N)r   r   r   r   r  r  rp  r   rm   r   r   )rH   r   r  r  r  s   &  @@r   test_lost_elemBugsTest.test_lost_elemo	  s    	 	 JJv	CE"#	E"#FF5M	:QA 	aeeS)adhh,19-	  	:MM89	:s   C8 8DDc                    R V,          p\         P                  V4      pV P                  VP                  R4      VP	                  R4      4       R# )s   <a b="%s"/>r   r   N)r   r   r   r   decode)rH   r   r3  rb  s   &&  r   check_expat224_utf8_bug BugsTest.check_expat224_utf8_bug	  s:    t#vvc{#G(<=r   c                R    RpV P                  V4       RpV P                  V4       R# )s   àNs   ààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààs  xàààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààà)r(  r  s   & r   test_expat224_utf8_bugBugsTest.test_expat224_utf8_bug	  s*     "$$T*($$T*r   c                   \        \        R 4      ;_uu_ 4       pVP                  4       pRRR4       \        P	                  X4      pVP                  R4      pVP                  R4      P                  4       pVP                  RR4      pV^R pV P                  VP                  R4      V4       R#   + '       g   i     L; i)rc  Nr   r   r2  r  )
rF  UTF8_BUG_XMLFILErG  r   r   r   r'  stripr9   r   )rH   fprawrb  xmlattrr   s   &     r   test_expat224_utf8_bug_file$BugsTest.test_expat224_utf8_bug_file	  s    "D))R'')C *}}S!((3- zz'"((*||FC(Abz#- *)s   B11C	c                    V P                  \        \        P                  4       P                  R 4       V P                  \        \        P                  4       P                  R R4       R# )rm   N)r   r   r   rL  rt  r	  s   &r   test_39495_treebuilder_start%BugsTest.test_39495_treebuilder_start	  sB    )R^^%5%;%;UC)R^^%5%;%;UDIr   c           	       a V P                  \        \        P                  R 4      P                  R \        ^4       4       4       V P                  \        \        P                  R 4      P                  R4       R oV P                  \        R\        P                  R 4      P                  V3R l\        ^4       4       4       R# )rm   c              3   4   "   T F  p^^ ,          x  K  	  R# 5ir   Nr   .0r  s   & r   	<genexpr>EBugsTest.test_issue123213_correct_extend_exception.<locals>.<genexpr>	  s     111Q33   Nc                      \        R 4      h	mymessager   r   r   r   rN  =BugsTest.test_issue123213_correct_extend_exception.<locals>.f	      K((r   rC  c              3   2   <"   T F  pS! 4       x  K  	  R # 5ir   r   r=  r  rN  s   & r   r>  r?  	  s     &=HqqssH   )r   ZeroDivisionErrorr   r   r   r  r   r  )rH   rN  s   &@r   )test_issue123213_correct_extend_exception2BugsTest.test_issue123213_correct_extend_exception	  s    +RZZ->-E-E1a1	3 	)RZZ%6%=%=tD	) 	{JJu$$&=E!H&=	?r   r   N)'rT   rU   rV   rW   r  r  r  r  r  r  r  r  r  rt  ru  rz   gettracer  r  r  r  r  r  r  r  r  r  r  r  r  r  r$  r(  r+  r4  r7  rK  rX   rY   rZ   s   @r   r  r  F  s     8BNY72<?>M" __S\\^%<=7 >7	E8P.I
*BK2
*J<,/ .(>

+.J? ?r   r  c                   V   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tRtV tR# )BasicElementTesti	  c                   R pRR/p\         P                  W4      pV P                  V\         P                  4       V P                  R\	        V4      4       V P                  R\	        V4      4       V P                  R\	        V4      4       V P                  R\	        V4      4       V P                  VP                  V4       V P                  VP                  4       V P                  VP                  4       V P                  VP                  V4       V P                  VP                  V4       RVR&   V P                  VP                  V4       V P                  VP                  V4       R	# )
r  zixwyprm   r   r   r   bazr  N)r   r   r   r   r   r   rm   r   r   r   r;  r   r  )rH   rm   r   element_foos   &   r   test___init__BasicElementTest.test___init__	  s$   %!jj- 	k2::6eS-.hK 01fc+./fc+./ 	#.+**++**+ 	++V4++V4 u++V4K..7r   c                   \         P                  R RR/4      pVP                  \         P                  RRR/4      4       \        P                  ! V4      pV P	                  W!4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       \        P                  ! W4       F  w  r4V P                  W44       K  	  V P                  VP                  VP                  4       R# r  rQ  rR  r  rS  qixN)r   r   r   r   r;  r   rm   r   r   r   	itertoolszip_longestassertIsr   rH   rT  element_foo2r  r  s   &    r   test___copy__BasicElementTest.test___copy__	  s   jj%(892::eue-=>?yy- 	3 	));??;**K,<,<=**K,<,<= 	\*C,<= !* 5 5k PVMM&) !Q 	,,k.@.@Ar   c                   \         P                  R RR/4      pVP                  \         P                  RRR/4      4       \        P                  ! V4      pV P                  W!4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       V P                  \        V4      \        V4      4       \        P                  ! W4       F  w  r4V P                  W44       K  	  V P                  VP                  VP                  4       V P                  VP                  VP                  4       RVP                  R&   V P                  VP                  VP                  4       V P                  VP                  VP                  4       R# rX  )r   r   r   r   r!  r;  r   rm   r   r   r   rZ  r[  r   r  r]  s   &    r   test___deepcopy__"BasicElementTest.test___deepcopy__	  sp   jj%(892::eue-=>?}}[1 	3 	));??;**K,<,<=**K,<,<= 	\*C,<= !* 5 5k PVV, !Q 	,,k.@.@A,,k.@.@A %*5!,,k.@.@AL//1C1CDr   c           
        \         P                  R 4      pV P                  \        VP                  R4       V P                  \        VP
                  \         P                  R4      R.4       V P                  \        VP                  ^ R4       \         P                  R4      .VR&   V P                  \        4      ;_uu_ 4        RV^ &   RRR4       V P                  \        4      ;_uu_ 4        \         P                  R4      R.VR&   RRR4       \        VR4      '       d/   RRRR.R	R
RRRR/pV P                  \        VP                  V4       \        VR4      '       dM    ! R R\         P                  4      pV! R4      .VR&   V P                  \        \        P                  V4       R# R#   + '       g   i     L; i  + '       g   i     L; i)joer   r  r  r9  N__setstate__rm   	_childrenr   r   r   r   __deepcopy__c                   &   a  ] tR tRt o R tRtV tR# )9BasicElementTest.test_augmentation_type_errors.<locals>.Ei#
  c                    R # r   r   )rH   memos   &&r   rh  FBasicElementTest.test_augmentation_type_errors.<locals>.E.__deepcopy__$
  s    r   r   NrT   rU   rV   rW   rh  rX   rY   rZ   s   @r   Erj  #
  s        r   ro  )r   r   r   r   r   r   r   hasattrrf  r   r!  )rH   r  statero  s   &   r   test_augmentation_type_errors.BasicElementTest.test_augmentation_type_errors
  se   JJu)QXXs3)QXX

50A5/IJ)QXXq%8

5!"!y))AaD *y))JJu%u-AaD * 1n%%udV&E i?1n%% BJJ   eH:AaDi: & *)))s   F30G3G	G	c                
    ! R  R4      pV! 4       p\         P                  RVR7      Vn        \        P                  ! V4      p?\        4        V P                  V! 4       4       \         P                  R4      pV! 4       pWBn        \        P                  ! V4      p\         P                  VRVR7      p???\        4        V P                  V! 4       4       \         P                  R4      p\         P                  R4      p\         P                  R4      pVP                  V4       VP                  V4       VP                  V4       \        P                  ! V4      p???\        4        V P                  V! 4       4       R# )	c                       ] tR tRtRtR# ).BasicElementTest.test_cyclic_gc.<locals>.Dummyi*
  r   NrT   rU   rV   rW   rX   r   r   r   Dummyrv  *
      r   rx  re  )r   r  r"  r#  r$  N)	r   r   dummyrefweakrefrefr   r   r  r   )rH   rx  r   wrefr  r#  r"  r$  s   &       r   test_cyclic_gcBasicElementTest.test_cyclic_gc)
  s   	 	 GZZAZ.
{{1~$&! JJuG
{{1~]]1e!],q"$&! ZZZZZZ
		"
		"
		"{{2B$&!r   c                  a R oV3R lp\         P                  R4      p\        P                  ! W!4      pV P	                  V! 4       P
                  R4       ?\        4        V P	                  SR4       V P	                  V! 4       R4       R# )Fc                    < R oR# )TNr   )wflags   &r   wref_cb.BasicElementTest.test_weakref.<locals>.wref_cbN
  s    Dr   r  TN)r   r   r{  r|  r   rm   r   )rH   r  r  r}  r  s   &   @r   test_weakrefBasicElementTest.test_weakrefL
  sj    	 JJsO{{1&S)t$&r   c                    \         P                  R ^^^R7      pV P                  VP                  R^R7      ^4       V P                  VP                  R^R7      ^4       R# )r  )r   r   zr   )r(  r  N)r   r   r   r   )rH   r"  s   & r   test_get_keyword_args&BasicElementTest.test_get_keyword_argsY
  sR    ZZ!qAZ.Q/3Q/3r   c           	        \        ^\        P                  ^,           4       EF>  p\        V P                  ^R7       EF  w  r#VP                  R^*R7      pRVn        RVn        VP                  VR4      P                  VP                  R4      4       VP                  VP                  R4      4       VP                  R4      ^ ,          P                  R	R
4       V P                  VRW#V4      pV P                  VP                  R4       V P                  VP                  R,          ^*4       V P                  \!        V4      ^4       V P#                  WE4       EK!  	  EKA  	  R# )r   repeatr  )r  ztext goes herezopposite of headchild
grandchildz.//grandchildr   zother valuerL   r  N)r  r{   HIGHEST_PROTOCOLr   rt   r   r   r   r  r   r   r   r   r   rm   r   r   r   )rH   r   r   r   r  r#  s   &     r   test_pickleBasicElementTest.test_pickle^
  s   1f559:E")$,,q"A"ANN5bN1)+!!!W-44V^^L5QR01		/*1-11&-H))!-D*0%A   /  5!126  R!,((/ #B ;r   c           	        \        ^\        P                  ^,           4       F  p\        V P                  ^R7       F  w  r#RpVP                  V4      pV P                  VP                  4       R,          R4       V P                  VRW#V4      pV P                  VP                  R4       V P                  V^ ,          P                  R4       K  	  K  	  R# )r   r  z\<?xml version="1.0"?>
                    <group><dogs>4</dogs>
                    </group>rm   grouprL   dogsN)
r  r{   r  r   rt   r   r   __getstate__r   rm   )rH   r   r   r   XMLTEXTr"  r#  s   &      r   test_pickle_issue18997'BasicElementTest.test_pickle_issue18997q
  s    1f559:E")$,,q"A  &&w/  !25!97C))".E*0%A  1  AF3 #B ;r   r   N)rT   rU   rV   rW   rU  r_  rb  rr  r~  r  r  r  r  rX   rY   rZ   s   @r   rO  rO  	  s:     86B0E<;8!"F'4
0&4 4r   rO  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR t]P                  ! ^4      R 4       tR tR tR tR tR tR tR tR tRtV tR# )BadElementTesti
  c                4  a  ! V3R  lR4      pV! 4       .o\         P                  R4      p VP                  S4        ! R RV\         P                  4      pV! R4      .o\         P                  R4      pVP                  S4       R#   \         d     LXi ; i)c                   8   <a  ] tR tRt o ]V3R l4       tRtV tR# )2BadElementTest.test_extend_mutable_list.<locals>.Xi
  c                V   < \         P                  R 4      .SR&   \         P                  # )rS  r9  r  rH   Ls   &r   	__class__<BadElementTest.test_extend_mutable_list.<locals>.X.__class__
  s"    

5)*!zz!r   r   NrT   rU   rV   rW   propertyr  rX   rY   r[   r  s   @r   Xr  
       " "r   r  r  c                       ] tR tRtRtR# )2BadElementTest.test_extend_mutable_list.<locals>.Yi
  r   Nrw  r   r   r   Yr  
  ry  r   r  r   Nr   r   r   r   rH   r  r  r  r  s   &   @r   test_extend_mutable_list'BadElementTest.test_extend_mutable_list
  s    	" 	"
 SEJJu	HHQK	2:: 	sVHJJu	  		s   B	 	BBc                  a  ! V3R  lR4      pV! 4       \         P                  R4      .o\         P                  R4      p VP                  S4        ! R RV\         P                  4      pV! R4      \         P                  R4      .o\         P                  R4      pVP                  S4       R#   \         d     Lli ; i)c                   8   <a  ] tR tRt o ]V3R l4       tRtV tR# )3BadElementTest.test_extend_mutable_list2.<locals>.Xi
  c                *   < SR  \         P                  # r9  r  r  s   &r   r  =BadElementTest.test_extend_mutable_list2.<locals>.X.__class__
  s    aDzz!r   r   Nr  r  s   @r   r  r  
  r  r   r  rS  r  c                       ] tR tRtRtR# )3BadElementTest.test_extend_mutable_list2.<locals>.Yi
  r   Nrw  r   r   r   r  r  
  ry  r   r  r  Nr  r  s   &   @r   test_extend_mutable_list2(BadElementTest.test_extend_mutable_list2
  s    	" 	"
 S"**U#$JJu	HHQK	2:: 	uXrzz%()JJu	  		s   B1 1B?>B?c                *    V P                  R R7       R# TraisesNdo_test_remove_with_clearr	  s   &r   %test_remove_with_clear_assume_missing4BadElementTest.test_remove_with_clear_assume_missing
  s     	&&d&3r   c                *    V P                  R R7       R# Fr  Nr  r	  s   &r   &test_remove_with_clear_assume_existing5BadElementTest.test_remove_with_clear_assume_existing
  s     	&&e&4r   c                 a aa  ! R  R\         P                  4      p ! VV3R lRV4      p ! VV3R lRV4      pS'       d   V 3R lpM\        pS P                  VP                  \
        P                  4       VR3VR33 EF  w  rgS P                  S P                  VR	7      4       W&R
3WbR3WfR33 Fw  w  rp
S P                  V
4      ;_uu_ 4        V! R4      oSP                  V	! R4      .4       V! 4       ;_uu_ 4        SP                  V! R4      4       RRR4       RRR4       Ky  	  S P                  W&4      pV F~  w  rrS P                  V
4      ;_uu_ 4        V! R4      oSP                  V	! R4      V! R4      .4       V! 4       ;_uu_ 4        SP                  V! R4      4       RRR4       RRR4       K  	  S P                  R4      ;_uu_ 4        V! R4      oSP                  V! R4      4       \        V4      ;_uu_ 4       p\        V4      ;_uu_ 4       pSP                  S^ ,          4       RRR4       RRR4       XP                  4        XP                  4        RRR4       \        4       ;'       d    S;'       d    WdJ p\        4       '       d   S'       d	   WdJ d   EK2  S P                  W&4      pV F  w  rp
S P                  V
4      ;_uu_ 4        V! R4      oSP                  V	! R4      V! R4      .4       V! 4       ;_uu_ 4        SP                  S^,          4       RRR4       RRR4       K  	  EK  	  R#   + '       g   i     EL?; i  + '       g   i     EK  ; i  + '       g   i     EL; i  + '       g   i     EK^  ; i  + '       g   i     ELo; i  + '       g   i     EL{; i  + '       g   i     ELg; i  + '       g   i     L; i  + '       g   i     EK=  ; i)c                       ] tR tRtRtRtR# )3BadElementTest.do_test_remove_with_clear.<locals>.Ei
  z:Local class to be able to mock E.__eq__ for introspection.r   N)rT   rU   rV   rW   __doc__rX   r   r   r   ro  r  
  s    Lr   ro  c                   0   <a  ] tR tRt o VV3R ltRtV tR# )3BadElementTest.do_test_remove_with_clear.<locals>.Xi
  c                   < SR  S'       * # r  r   rH   or  rb  s   &&r   r   :BadElementTest.do_test_remove_with_clear.<locals>.X.__eq__
      G!z!r   r   Nr#  r[   r  rb  s   @r   r  r  
       " "r   r  c                   0   <a  ] tR tRt o VV3R ltRtV tR# )3BadElementTest.do_test_remove_with_clear.<locals>.Yi
  c                2   < SP                  4        S'       * # r   r   r  s   &&r   r   :BadElementTest.do_test_remove_with_clear.<locals>.Y.__eq__
  s    

!z!r   r   Nr#  r  s   @r   r  r  
  r  r   r  c                  .   < S P                  \        4      # r   r   r  r	  s   r   <lambda>:BadElementTest.do_test_remove_with_clear.<locals>.<lambda>
      $*;*;J*Gr   zdel root[:]zroot.clear())side_effectzremove missing E() from [Z()]zremove missing Z() from [E()]zremove missing Z() from [Z()]toponemissingNtwozremove root[0] from [Z()]rem)r   r   r   r\  r   r#   enterContextr$  r   r   'cases_for_remove_missing_with_mutationsr   r&   assert_not_calledr   (cases_for_remove_existing_with_mutations)rH   r  ro  r  r  get_checker_contextZr  RUdescriptioncasesVrN  g
is_specialrb  s   fd              @r   r  (BadElementTest.do_test_remove_with_clear
  s   	M

 	M	" 	" 	"
	" 	" 	"
 "G"-ahh. !=1A~3FGNAdll{lCD 676767&!k
 \\+..U8DKK5
+,..AiL1 / /.& @@FE(-$a\\+..U8DKK51U8 45,..AiL1 / /. ). 9::xAeH%"1%%M!,<,<KKQ( -=%##%##% ; 23IIII16J'))f EEaK).%A+k22 xQuXqx$89022 KKQ0 3 32 */k H /.. /.. /.. /.. -=,<,<%%% ;::: 32 322s   0M%	MM%	!7N	M:0N	3ON7$N#=N7(O&7O2	O6O2	M"	M%	%M7:N	N	N #N4.	N77O	OOO/*O2	2Pc                *    V P                  R R7       R# r  do_test_remove_with_mutate_rootr	  s   &r   +test_remove_with_mutate_root_assume_missing:BadElementTest.test_remove_with_mutate_root_assume_missing  s     	,,D,9r   c                *    V P                  R R7       R# r  r  r	  s   &r   ,test_remove_with_mutate_root_assume_existing;BadElementTest.test_remove_with_mutate_root_assume_existing  s     	,,E,:r   c          
     h  a aa
 \         P                  p ! VV
3R  lRV4      pS'       d   V 3R lpM\        pS P                  W#4      pV F~  w  rgrS P	                  V	4      ;_uu_ 4        V! R4      o
S
P                  V! R4      V! R4      .4       V! 4       ;_uu_ 4        S
P                  V! R4      4       RRR4       RRR4       K  	  S P                  W#4      pV F  w  rgp	S P	                  V	4      ;_uu_ 4        V! R4      o
S
P                  V! R4      V! R4      .4       V! 4       ;_uu_ 4        S
P                  S
^,          4       RRR4       RRR4       K  	  R#   + '       g   i     L; i  + '       g   i     EK?  ; i  + '       g   i     LF; i  + '       g   i     K  ; i)	c                   0   <a  ] tR tRt o VV3R ltRtV tR# )9BadElementTest.do_test_remove_with_mutate_root.<locals>.Zi  c                   < S^  S'       * # )r   r   r  s   &&r   r   @BadElementTest.do_test_remove_with_mutate_root.<locals>.Z.__eq__  r  r   r   Nr#  r  s   @r   r  r    r  r   r  c                  .   < S P                  \        4      # r   r  r	  s   r   r  @BadElementTest.do_test_remove_with_mutate_root.<locals>.<lambda>  r  r   r  r  r  r  Nr  )r   r   r   r  r$  r   r   r  )rH   r  ro  r  r  r  r  r  r  r  rb  s   fd        @r   r  .BadElementTest.do_test_remove_with_mutate_root  sH   JJ	" 	" 	"
 "G"- <<QB$) A!k**xQuXqx01(**KK)- + +* %* ==aC!&A+k**xQuXqx01(**KKQ( + +* "' +* +** +* +**sH   *7E8!E%9E8?7F 6FF %E50E88F
FF  F1c              #    "   W3W!3W"33 F5  w  r4R VP                    RVP                    RVP                    R2pWWE3x  K7  	  W3W3W!3W"33 F5  w  r4R VP                    RVP                    RVP                    R2pW#WE3x  K7  	  R# 5i)zremove missing z	() from [(), ()]NrT   )rH   ro  r  r  r  r  s   &&&   r   r  6BadElementTest.cases_for_remove_missing_with_mutations1  s      VaVaV,DA,QZZL 9 zzl$qzzl#?K&& -
 VaVaVaV4DA,QZZL 9 zzl$qzzl#?K&& 5s   BB	c              #     "   WR 3W!R3W"R33 F6  w  r4pRVP                    RVP                    RVP                    R2pWCV3x  K8  	  R# 5i)zremove root[1] from [E(), Z()]zremove root[1] from [Z(), E()]zremove root[1] from [Z(), Z()]zremove root[1] (of type z) from [r  r  Nr  )rH   ro  r  r  r  r  s   &&&   r   r  7BadElementTest.cases_for_remove_existing_with_mutations>  sn      343434"
A+
 6ajj\ B$$%JJ<tAJJ<sDK##"
s   AA
c           	        \         P                  R 4      p\        VRV4      ;_uu_ 4        V P                  \        4      ;_uu_ 4        \        V4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r  rm   N)r   r   r   r   RuntimeErrorr   r  s   & r   test_recursive_repr"BadElementTest.test_recursive_reprJ  sY     JJuq%##""<00Q 1 $#00 $##s#   A:	A'	A:'A72A::B	c                d  a  ! V3R  lR\         4      p\        P                  4       pVP                  R/ 4       VP	                  R4       VP	                  V! R4      4       VP	                  R4       VP                  R4       VP                  4       oV P                  SP                  R4       R# )c                   .   <a  ] tR tRt o V3R ltRtV tR# )/BadElementTest.test_element_get_text.<locals>.XiT  c                F   <  SP                    R #   \         d     R # i ; ir   )r   	NameErrorr  s   &r   __del__7BadElementTest.test_element_get_text.<locals>.X.__del__U  s!    II  s      r   NrT   rU   rV   rW   r  rX   rY   r[   re   s   @r   r  r  T        r   r  rm   ABCDEFGHIJKLABCDEFGHIJKLN)	r   r   rL  rt  r=   ra  rK  r   r   rH   r  r   re   s   &  @r   test_element_get_text$BadElementTest.test_element_get_textR  s{    	 	 NN	r	v	qy	v	ewwyN3r   c                  a  ! V3R  lR\         4      p\        P                  4       pVP                  R/ 4       VP                  R/ 4       VP	                  R4       VP                  R4       VP                  V! R4      4       VP                  R4       VP	                  R4       VP                  4       oV P                  S^ ,          P                  R4       R# )	c                   .   <a  ] tR tRt o V3R ltRtV tR# )/BadElementTest.test_element_get_tail.<locals>.Xig  c                T   <  S^ ,          P                    R#   \         d     R# i ; i)r   N)r   r  r  s   &r   r  7BadElementTest.test_element_get_tail.<locals>.X.__del__h  s%    GLL  s    ''r   Nr  r  s   @r   r  r   g  r  r   r  rb  rm   r  r  r  r  N)	r   r   rL  rt  ra  r=   rK  r   r   r  s   &  @r   test_element_get_tail$BadElementTest.test_element_get_taile  s    	 	 NN		r	e	v	qy	v	fwwya~6r   c                  a  ! V3R  lR4      p\         P                  R4      oSP                  \         P                  R4      4       SRV! 4         SP                  \         P                  R4      4       S^ ^
V! 4       1,           R# )c                   .   <a  ] tR tRt o V3R ltRtV tR# )%BadElementTest.test_subscr.<locals>.Xi|  c                   < SR  ^# r  r   r  s   &r   	__index__/BadElementTest.test_subscr.<locals>.X.__index__}  s    aDr   r   NrT   rU   rV   rW   r)  rX   rY   r  s   @r   r  r'  |        r   r  re   r  N)r   r   r   )rH   r  r  s   & @r   test_subscrBadElementTest.test_subscrz  sc    	 	
 JJv	G$%	$13	G$%	!Bqs(r   c                   a  ! V3R  lR4      p\         P                  R4      o\        ^
4       F(  pSP                  ^ \         P                  R4      4       K*  	  . S^ ^
V! 4       1&   R# )c                   .   <a  ] tR tRt o V3R ltRtV tR# ))BadElementTest.test_ass_subscr.<locals>.Xi  c                   < . SR &   ^# r  r   r  s   &r   r)  3BadElementTest.test_ass_subscr.<locals>.X.__index__  s    !r   r   Nr+  r  s   @r   r  r1    r,  r   r  re   r  N)r   r   r  r   )rH   r  r\  r  s   &  @r   test_ass_subscrBadElementTest.test_ass_subscr  sU    	 	
 JJvrAHHQ

7+,  !Bqs(r   c                    R  p\         P                  VR7      pVP                  R/ 4       VP                  R4       V P	                  \
        VP                  R/ 4       ?\        4        R# )c                     . # r   r   r   r   s   &&r   element_factory>BadElementTest.test_treebuilder_start.<locals>.element_factory      Ir   r9  rm   r  r   N)r   rL  rt  r=   r   AttributeErrorr   rH   r9  r   s   &  r   test_treebuilder_start%BadElementTest.test_treebuilder_start  sP    	NN?N;	r	v.!''62>r   c                    R  p\         P                  VR7      pVP                  R/ 4       VP                  R4       V P	                  \
        VP                  R4       ?\        4        R# )c                     . # r   r   r8  s   &&r   r9  <BadElementTest.test_treebuilder_end.<locals>.element_factory  r;  r   r<  rm   r  N)r   rL  rt  r=   r   r=  ra  r   r>  s   &  r   test_treebuilder_end#BadElementTest.test_treebuilder_end  sN    	NN?N;	r	v.!%%7r   c                  a  ! V3R  lR\         P                  4      p\         P                  R4      oV! R4      pSP                  V\         P                  R4      .4       \        4       '       d(   V P	                  \
        \        P                  S4       R# \        P                  ! S4      pV P                  \        V4      V.4       R# )c                   .   <a  ] tR tRt o V3R ltRtV tR# )-BadElementTest.test_deepcopy_clear.<locals>.Xi  c                (   < SP                  4        V # r   r  )rH   rl  rb  s   &&r   rh  :BadElementTest.test_deepcopy_clear.<locals>.X.__deepcopy__  s    

r   r   Nrn  )r[   rb  s   @r   r  rH    r  r   r  r   r   r   N)
r   r   r   r   r   r
  r   r!  assertListEqualr   )rH   r  evilr   rb  s   &   @r   test_deepcopy_clear"BadElementTest.test_deepcopy_clear  s    	

 	
 zz#vT2::c?+,#%%lDMM4@d#A  a4&1r   c                  aaa \         P                  R 4      o\         P                  R4      o\         P                  R4      p ! VVV3R lR\         P                  4      p\         P                  R4      oV! R4      V! R4      rCSP                  W1V.4       \        \        P
                  ! S4      4      pV P                  V^ ,          V4       V P                  V^,          V4       V P                  V^,          P                  VP                  4       T P                  VR,           Uu. uF  qP                  NK  	  upSP                  SP                  SP                  SP                  .4       R	# u upi )
r   r   r   c                   2   <a  ] tR tRt o VVV3R ltRtV tR# ),BadElementTest.test_deepcopy_grow.<locals>.Xi  c                L   < SP                  S4       SP                  S4       V # r   r  )rH   rl  r   r   rb  s   &&r   rh  9BadElementTest.test_deepcopy_grow.<locals>.X.__deepcopy__  s    AAr   r   Nrn  )r[   r   r   rb  s   @r   r  rQ    s      r   r  r  r  r     NNN)	r   r   r   r   r   r!  r\  r   rm   )	rH   r   r  evil1evil2childrenr   r   rb  s	   &     @@@r   test_deepcopy_grow!BadElementTest.test_deepcopy_grow  s    JJsOJJsOJJsO	 	

 	 zz% vqvuUu%&d+,hqk5)hqk5)!!%%0"6A%%6%%quu5	76s   ,E6r   N)rT   rU   rV   rW   r  r  r  r  r  r  r  r  r  r  r   infinite_recursionr  r  r#  r-  r4  r?  rD  rM  rY  rX   rY   rZ   s   @r   r  r  
  s     &&4
5
U1n:
;
)>'
$ # $4&7*

2&7 7r   r  c                   D   a  ] tR tRt o R tR t]P                  tRtV t	R# )MutationDeleteElementPathi  c                B    \         P                  ! V .VO5!  pWn        V# r   r   __new__re   r$   re   r,   rH   s   &&* r   r`  !MutationDeleteElementPath.__new__      {{3&&	r   c                     V P                   R  R# )r9  Tre   rH   r  s   &&r   r    MutationDeleteElementPath.__eq__  s    IIaLr   re  N
rT   rU   rV   rW   r`  r   r   __hash__rX   rY   rZ   s   @r   r]  r]         
 ||Hr   r]  c                   D   a  ] tR tRt o R tR t]P                  tRtV t	R# )MutationClearElementPathi  c                B    \         P                  ! V .VO5!  pWn        V# r   r_  ra  s   &&* r   r`   MutationClearElementPath.__new__  rc  r   c                :    V P                   P                  4        R # T)re   r   rf  s   &&r   r   MutationClearElementPath.__eq__  s    		r   re  Nrh  rZ   s   @r   rl  rl    rj  r   rl  c                   >   a  ] tR tRt o R t]P                  tRtV tR# )BadElementPathi  c                    ^^ ,          h)r   r   rf  s   &&r   r   BadElementPath.__eq__  s    c	r   r   N)	rT   rU   rV   rW   r   r   ri  rX   rY   rZ   s   @r   rs  rs    s      ||Hr   rs  c                   n   a a ] tR tRt oV 3R ltV 3R ltR tR tR tR t	R t
R	 tR
 tR tRtVtV ;t# )BadElementPathTesti  c                `   < \         SV `  4        ^ RIHp VP                  V n        / Vn        R# r   rE   N)supersetUprG   rF   r  
path_cacherH   rF   r  s   & r   r{  BadElementPathTest.setUp  s$    )%,,r   c                R   < ^ RI Hp V P                  Vn        \        SV `  4        R# ry  )rG   rF   r|  r  rz  tearDownr}  s   & r   r  BadElementPathTest.tearDown  s    )!__r   c           	     <   \         \        3 Fw  pV P                  V4      ;_uu_ 4        \        P	                  R 4      pVP                  \        P	                  R4      .4       VP                  V! VR4      4       RRR4       Ky  	  R#   + '       g   i     K  ; ir  r  r   N)r]  rl  r$  r   r   r   r   rH   r$   r  s   &  r   test_find_with_mutating*BadElementPathTest.test_find_with_mutating  sl    -/GHCc""JJu%"**U+,-s1c{# #" I"""   AB

Bc                    \         P                  R 4      pVP                  \         P                  R4      .4        VP                  \	        R4      4       R#   \
         d     R# i ; ir  )r   r   r   r   rs  rJ  r  s   & r   test_find_with_error'BadElementPathTest.test_find_with_error  sP    JJu	"**U#$%	FF>#&'  		   A A'&A'c           	     <   \         \        3 Fw  pV P                  V4      ;_uu_ 4        \        P	                  R 4      pVP                  \        P	                  R4      .4       VP                  V! VR4      4       RRR4       Ky  	  R#   + '       g   i     K  ; ir  )r]  rl  r$  r   r   r   r   r  s   &  r   test_findtext_with_mutating.BadElementPathTest.test_findtext_with_mutating  sl    -/GHCc""JJu%"**U+,-

3q#;' #" I"""r  c                    \         P                  R 4      pVP                  \         P                  R4      .4        VP                  \	        R4      4       R#   \
         d     R# i ; ir  )r   r   r   r   rs  rJ  r  s   & r   test_findtext_with_error+BadElementPathTest.test_findtext_with_error  sP    JJu	"**U#$%	JJ~c*+  		r  c                    \         P                  R 4      p\         P                  VR4      pR^ R. R/ .pV F*  pWBn        V P	                  VP                  R4      V4       K,  	  R# )r  r  r   F./barNr   r   r   r  r   r   r   )rH   	root_elemsub_elemfalseyvals   &    r   (test_findtext_with_falsey_text_attribute;BadElementPathTest.test_findtext_with_falsey_text_attribute%  s\    JJu%	==E2aB+CMY//8#> r   c                    \         P                  R 4      p\         P                  VR4      pRVn        V P	                  VP                  R4      R4       R# )r  r  Nr  r   r  )rH   r  r  s   &  r   &test_findtext_with_none_text_attribute9BadElementPathTest.test_findtext_with_none_text_attribute-  sB    JJu%	==E2++G4b9r   c           	     <   \         \        3 Fw  pV P                  V4      ;_uu_ 4        \        P	                  R 4      pVP                  \        P	                  R4      .4       VP                  V! VR4      4       RRR4       Ky  	  R#   + '       g   i     K  ; ir  )r]  rl  r$  r   r   r   r   r  s   &  r   test_findall_with_mutating-BadElementPathTest.test_findall_with_mutating3  sl    -/GHCc""JJu%"**U+,-		#a+& #" I"""r  c                    \         P                  R 4      pVP                  \         P                  R4      .4        VP                  \	        R4      4       R#   \
         d     R# i ; ir  )r   r   r   r   rs  rJ  r  s   & r   test_findall_with_error*BadElementPathTest.test_findall_with_error:  sP    JJu	"**U#$%	IInS)*  		r  )r|  )rT   rU   rV   rW   r{  r  r  r  r  r  r  r  r  r  rX   rY   __classcell__)r  r[   s   @@r   rw  rw    s<      
$(?:' r   rw  c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	ElementTreeTypeTestiC  c                   V P                  \        P                  \        4       V P                  \        P                  \        4       V P                  \        P
                  \        4       V P                  \        P                  \        4       V P                  \        P                  \        4       V P                  \        P                  \        4       R # r   )	r   r   r  r  r  rB   r   rL  rH  r	  s   &r   test_istypeElementTreeTypeTest.test_istypeD  sz    bmmT2bhh-bnnd3bjj$/bnnd3bllD1r   c                (    ! R  R\         P                  4      pV! R4      pV P                  V\         P                  4       V P                  W!4       V P                  VP                  R4       RVn        V P                  VP
                  R4       R# )c                       ] tR tRtRtR# )DElementTreeTypeTest.test_Element_subclass_trivial.<locals>.MyElementiM  r   Nrw  r   r   r   	MyElementr  M  ry  r   r  r  re  N)r   r   r   r   rm   r   rH   r  myes   &  r   test_Element_subclass_trivial1ElementTreeTypeTest.test_Element_subclass_trivialL  sq    	

 	 c2::.c-%( 5)r   c                   a  ! V3R  lR\         P                  4      oS! RR^R^/^^R7      pV P                  VP                  R4       V P                  \	        VP                  4       4      . RO4       R# )	c                   <   <a a ] tR tRt o/ 3VV 3R lltRtVtV ;t# )HElementTreeTypeTest.test_Element_subclass_constructor.<locals>.MyElementiZ  c                :   < \         SV `  ! VR ,           V3/ VB  R# )__N)rz  rR  )rH   rm   r   extrar  r  s   &&&,r   rR  QElementTreeTypeTest.test_Element_subclass_constructor.<locals>.MyElement.__init__[  s    i/d
FLeLr   r   )rT   rU   rV   rW   rR  rX   rY   r  )r  r[   r  s   @@r   r  r  Z  s     +- M M Mr   r  r  r   r   )r   r   foo__N))r   r   )r   r   )r   rU  )r      )r   r   r   rm   r4  r   )rH   r  r  s   & @r   !test_Element_subclass_constructor5ElementTreeTypeTest.test_Element_subclass_constructorY  sb    	M

 	M QQ/1:'*		,4	6r   c                     ! R  R\         P                  4      pV! R4      pV P                  VP                  4       R4       R# )c                   &   a  ] tR tRt o R tRtV tR# )GElementTreeTypeTest.test_Element_subclass_new_method.<locals>.MyElementid  c                    V P                   # r   rl   r	  s   &r   	newmethodQElementTreeTypeTest.test_Element_subclass_new_method.<locals>.MyElement.newmethode  s    xxr   r   N)rT   rU   rV   rW   r  rX   rY   rZ   s   @r   r  r  d  s        r   r  re  N)r   r   r   r  r  s   &  r    test_Element_subclass_new_method4ElementTreeTypeTest.test_Element_subclass_new_methodc  s4    	 

 	  %0r   c                    ! R  R\         P                  4      p\         P                  R4      pRVn        V! R4      pRVn        VP                  V4       V P	                  VP                  R4      R4       V P	                  VP                  R4      P                  R4       \        VP                  R4      4      pV P	                  \        V4      ^V4       V P	                  V^ ,          P                  R4       R# )c                       ] tR tRtRtR# )AElementTreeTypeTest.test_Element_subclass_find.<locals>.MyElementil  r   Nrw  r   r   r   r  r  l  ry  r   r  r  r   r  r  N)r   r   r   r   r   r   r   rm   r   r   r   )rH   r  r  subfounds   &    r   test_Element_subclass_find.ElementTreeTypeTest.test_Element_subclass_findk  s    	

 	 JJu	E*I6**E2QYYu%&UQ.qu-r   r   N)rT   rU   rV   rW   r  r  r  r  r  rX   rY   rZ   s   @r   r  r  C  s#     2*61. .r   r  c                   P   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
tV tR# )ElementFindTesti{  c                   \         P                  \        4      pV P                  VP	                  R 4      P
                  R 4       V P                  VP	                  R4      P
                  R 4       V P                  VP	                  R4      P
                  R 4       \         P                  \        4      V^&   V P                  VP	                  R4      P
                  R4       V P                  VP                  R4      R4       V P                  VP                  R4      R4       V P                  VP                  R4      R4       V P                  VP                  RR4      R4       V P                  VP                  R	4      4       V P                  VP                  R	R4      R4       V P                  \         P                  R
4      P                  R4      R4       R# )rm   r  ./tagzsection/nexttagnexttagr   r  r   r(  togz<tag><empty /></tag>emptyN)	r   r   r  r   r   rm   SAMPLE_SECTIONr   r   r  s   & r   test_find_simple ElementFindTest.test_find_simple|  sb   FF:**E2.22E:,,e4vvn%! 1266	BG,f5M2I> 	$56;$5yA2F 	!**U+,E95yA 	 67@@I2Nr   c                8   R p\         P                  V4      pV P                  VP                  R4      P                  R,          R4       V P                  VP                  R4      P                  R,          R4       V P                  VP                  R4      P                  R,          R4       V P                  VP                  R4      P                  R,          R	4       V P                  VP                  R
4      P                  R,          R4       V P                  \        RVP                  R4       V P                  \        RVP                  R4       V P                  \        RVP                  R4       V P                  \        RVP                  R4       R# )z
        <body>
            <tag class='a'/>
            <tag class='b'/>
            <tag class='c'/>
            <tag class='d'/>
        </body>z./tag[1]classr   z./tag[2]r   z./tag[last()]r   z./tag[last()-1]r   z./tag[last()-2]XPathz./tag[0]z	./tag[-1]z./tag[last()-0]z./tag[last()+1]N)r   r   r   r   r   r  SyntaxError)rH   
LINEAR_XMLr  s   &  r   test_find_xpathElementFindTest.test_find_xpath  s3   
 FF: 	
+227;SA
+227;SA077@#F 1299'BCH 1299'BCH{GQVVZH{GQVV[I{GQVV=NO{GQVV=NOr   c                   \         P                  \        4      p\         P                  \        4      V^&   V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R4      4      RR.4       V P	                  \        VP                  R4      4      . 4       V P	                  \        VP                  R4      4      . 4       V P	                  \        VP                  R4      4      . R8O4       V P	                  \        VP                  R4      4      R.^,          4       V P	                  \        VP                  R	4      4      R.4       V P	                  \        VP                  R
4      4      R.^,          4       V P	                  \        VP                  R4      4      . R9O4       V P	                  \        VP                  R4      4      . R:O4       V P	                  \        VP                  R4      4      . R:O4       V P	                  \        VP                  R4      4      . R9O4       V P	                  \        VP                  R4      4      . R:O4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R4      4      R.^,          4       V P	                  \        VP                  R4      4      R.^,          4       V P	                  \        VP                  R4      4      R.^,          4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R4      4      R.^,          4       V P	                  \        VP                  R4      4      R.^,          4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R4      4      . 4       V P	                  \        VP                  R4      4      . 4       V P	                  \        VP                  R4      4      R.^,          4       V P	                  VP                  R4      VP                  R4      4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R 4      4      R.4       V P	                  \        VP                  R!4      4      R.4       V P	                  \        VP                  R"4      4      R.4       V P	                  \        VP                  R#4      4      R.4       V P	                  \        VP                  R$4      4      . 4       V P	                  \        VP                  R%4      4      . 4       V P	                  \        VP                  R&4      4      . 4       V P	                  \        VP                  R'4      4      . 4       V P	                  \        VP                  R(4      4      . 4       V P	                  \        VP                  R)4      4      R.4       V P	                  \        VP                  R*4      4      R.4       V P	                  \        VP                  R+4      4      R.4       V P	                  \        VP                  R,4      4      R.4       V P	                  \        VP                  R-4      4      R.4       V P	                  \        VP                  R.4      4      . 4       V P	                  \        VP                  R/4      4      . 4       V P	                  \        VP                  R04      4      R.^,          4       V P	                  \        VP                  R14      4      R.^,          4       V P	                  \        VP                  R24      4      R.^,          4       V P	                  \        VP                  R34      4      R.^,          4       V P	                  \        VP                  R44      4      R.^,          4       V P	                  \        VP                  R54      4      R.^,          4       V P	                  \        VP                  R64      4      R.^,          4       V^,          V^&   V P	                  \        VP                  R"4      4      RR.4       V P	                  \        VP                  R-4      4      RR.4       R7# );r   r  rV  rm   r  ztog/foor   r  z.//tagr  zsection//tagz	section/*z
section//*zsection/.//*z*/*z*//*z*/tagz*/./tagr  z././tagz.//tag[@class]z.//tag[@class="a"]z.//tag[@class!="a"]z.//tag[@class="b"]z.//tag[@class!="b"]z.//tag[@id]z.//section[tag]z.//section[element]z../tagzsection/../tagz	section//z.//section[tag='subtext']z.//section[tag ='subtext']z.//section[tag= 'subtext']z.//section[tag = 'subtext']z.//section[ tag = 'subtext' ]z.//section[tag!='subtext']z.//section[tag !='subtext']z.//section[tag!= 'subtext']z.//section[tag != 'subtext']z.//section[ tag != 'subtext' ]z.//tag[.='subtext']z.//tag[. ='subtext']z.//tag[.= "subtext"]z.//tag[ . = "subtext" ]z.//tag[. = 'subtext']z.//tag[. = 'subtext ']z.//tag[.= ' subtext']z.//tag[.!='subtext']z.//tag[. !='subtext']z.//tag[.!= "subtext"]z.//tag[ . != "subtext" ]z.//tag[. != 'subtext']z.//tag[. != 'subtext ']z.//tag[.!= ' subtext']Nr  )rm   r  nextsection)rm   r  r  rm   )r   r   r  r  r   ro   r   r  s   & r   test_findallElementFindTest.test_findall  s   FF:vvn%!		#7&B		%(89E5>J		%(892>		)(<=rB		#7%	'		((;<GaK			-(@AE7K		.(ABUGaKP		+(>?-	/		,(?@4	6		.(AB4	6		%(89-	/		&(9:4	6		'(:;eWE		)(<=wG		'(:;eWq[I		)(<=w{K		2B(CDGaK			2F(GHG			2G(HIGaK			2F(GHGaK			2G(HIG			-(@AG			2C(DEK			2G(HI2N		((;<bA		2B(CDGaK	;/<1HI		2M(NOK			2N(OPK			2N(OPK			2O(PQK			2Q(RSK	
 			2N(OP			2O(PQ			2O(PQ			2P(QR			2R(ST	 			2G(HI	"		2H(IJ	"		2H(IJ	"		2K(LM	"		2I(JK	"		2J(KL			2I(JK	
 			2H(IJ1	&		2I(JK1	&		2I(JK1	&		2L(MN1	&		2J(KL1	& 			2K(LM1	&		2J(KL1	& t!		2O(PQ#Y/	1		2I(JK	)r   c                T   \         P                  \        4      pV P                  \	        VP                  R 4      4      . 4       V P                  \	        VP                  R4      4      R.^,          4       V P                  \	        VP                  R4      4      R.^,          4       R# )rm   z{http://effbot.org/ns}tagz.//{http://effbot.org/ns}tagN)r   r   r  r   ro   r   r  s   & r   test_test_find_with_ns&ElementFindTest.test_test_find_with_ns  s    FF=!		%(892>199%@AB()A-	/ 	199%CDE()A-	/r   c           	     \   \         P                  R 4      pRR/pV P                  \        VP	                  RVR7      4      ^4       V P                  \        VP	                  RVR7      4      ^4       RR/pV P                  \        VP	                  RVR7      4      ^4       V P                  \        VP	                  RVR7      4      ^4       RRRR/pV P                  \        VP	                  RVR7      4      ^4       V P                  \        VP	                  RVR7      4      ^4       R# )	
            <a xmlns:x="X" xmlns:y="Y">
                <x:b><c/></x:b>
                <b/>
                <c><x:b/><b/></c><y:b/>
            </a>xxr  z.//xx:b)r  .//br  r   N)r   r   r   r   r   )rH   rb  nsmaps   &  r   test_findall_different_nsmaps-ElementFindTest.test_findall_different_nsmaps#  s   vv   sT\\)\FGKT\\&U\CDaHsT\\)\FGKT\\&U\CDaHsB$T\\)\FGKT\\&U\CDaHr   c                   \         P                  R 4      pVP                  \         P                  R4      4       V P	                  \        VP                  R4      4      . RO4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R	4      4      R.4       V P	                  \        VP                  R
4      4      RR.4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R4      4      \        VP                  R4      4      4       V P	                  \        VP                  R4      4      . RO4       V P	                  \        VP                  R4      VR,          .,           4      \        VP                  R4      4      4       V P	                  \        VP                  R4      4      . RO4       V P	                  \        VP                  R4      4      RR.4       V P	                  \        VP                  R4      4      RR.4       V P	                  \        VP                  R4      4      R.4       V P	                  \        VP                  R4      4      . RO4       V P	                  \        VP                  R4      4      RR.4       V P	                  \        VP                  R4      4      \        VP                  R4      4      4       R# )r  r/   z{*}b{X}br   {Y}bz{*}cr   z{X}*z{Y}*r  z{}br  r   z.//{*}bz.//{*}cz.//{X}*z.//{Y}*z.//{}*z.//{}br  N)r  r   r  )r  r   r   r  r  )r  r   r  r   r  )r   r   r   r   )r   r   r   r  r   ro   r   r  s   & r   test_findall_wildcard%ElementFindTest.test_findall_wildcard4  s   vv   	BJJv&'V(<=.	0V(<=	 V(<= 	#V(<= 	#U(;<s	%U(;<	 U(;<'S(9:	<V(<=3	5 	V(<Rz(IJ'S(9:	< 	Y(?@;	=Y(?@s	%Y(?@ &)	+Y(?@ 	#X(>?-	/X(>?s	%X(>?'V(<=	?r   c                    \         P                  \        4      pV P                  \        R 4      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)zcannot use absolute pathz/tagN)r   r   r  r  r  r   r  s   & r   test_bad_findElementFindTest.test_bad_find`  s@    FF:##K1KLLIIf MLLLs   AA%	c                   \         P                  \        4      pV P                  \         P	                  V4      P                  R 4      P                  R 4       V P                  \         P	                  V4      P                  R 4      R4       V P                  \        \         P	                  V4      P                  R 4      4      R .^,          4       RpV P                  \        V4      ;_uu_ 4        \         P	                  V4      P                  R4      pRRR4       V P                  \        X4      R .^,          4       R#   + '       g   i     L5; i)rm   r   zThis 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 '.+'z//tagN)r   r   r  r   rB   r   rm   r   ro   r   assertWarnsRegexFutureWarning)rH   r  r   r   s   &   r   test_find_through_ElementTree-ElementFindTest.test_find_through_ElementTreee  s    FF:*//6::EB*33E:FCq(9(A(A%(HIGaK	# ""=#66"**73B 7+eWq[9 76s   1%EE	r   N)rT   rU   rV   rW   r  r  r  r  r  r  r  r  rX   rY   rZ   s   @r   r  r  {  s8     O.P,n)`/I"*?X
: :r   r  c                   H   a  ] tR tRt o R
R ltR tR tR tR tR t	R	t
V tR# )ElementIterTestit  Nc                6    \        VP                  V4      4      # r   )ro   r   )rH   re   rm   s   &&&r   _ilistElementIterTest._ilistu  s    diin--r   c           	        \         P                  R 4      pV P                  V P                  V4      . RO4       V P                  V P                  VP	                  R4      4      RR.4       V P                  \        VP                  4       4      P                  R4       V P                  RP                  VP                  4       4      R4       V P                  RP                  VP	                  R4      P                  4       4      R4       V P                  \        VP                  4       4      R4       \        VRR	7      pV P                  \        \         P                  V4      4      ^ ,          R
4       \        VRR	7      p\         P                  \         P                  4       R7      pV P                  \        \         P                  W#R7      4      ^ ,          R
4       \         P                  R4      pV P                  \         VP                  4       \         P                  R4      pV P                  RP                  VP                  4       4      R4       R# )z7<html><body>this is a <i>paragraph</i>.</body>..</html>r~  rV  r  r   zthis is a paragraph...zthis is a paragraph.z
this is a F)rf   ra  rB  )rO  Nz*<root>a&amp;<sub>b&amp;</sub>c&amp;</root>za&b&c&)r~  rV  r  )r   r   r   r  r   r  r   rm   rX  r   rj   r  rH  rL  rB   r   r=  )rH   r  
sourcefilerO  ri   s   &    r   
test_basicElementIterTest.test_basicx  s   ffNOS)+@ASXXf%56Fchhj)--v602JK&!1!:!:!<="	$clln-|< se4
bll:67:EB se4
R^^%56bll:lEFqI5Q~~d#.$))4 ffAB0(;r   c                .   \         P                  R 4      pV P                  V P                  V4      R .4       \         P	                  VR4      pV P                  V P                  V4      R R.4       \         P	                  VR4      pV P                  V P                  V4      . RO4       \         P	                  VR4      pV P                  V P                  V4      . RO4       V^,          V^ &   V^ V P                  V P                  V4      R R.4       R# )r   r   r   r   N)r   r   r   )r   r   r   r   )r   r   r   r  r  r  s   &    r   test_cornersElementIterTest.test_corners  s    JJsOQ#/ MM!S!Q#s4 MM!S!Q9 MM!S!Q)=> t!aDQ#s4r   c                   \         P                  R 4      pV P                  V P                  VR4      R.^,          4       V P                  V P                  VR4      R.^,          4       V P                  \	        VP                  RR7      4      R.^,          4       . ROpV P                  \	        VP                  4       4      V4       V P                  V P                  V4      V4       V P                  V P                  VR4      V4       R# )aJ  
            <document>
                <house>
                    <room>bedroom1</room>
                    <room>bedroom2</room>
                </house>
                <shed>nothing here
                </shed>
                <house>
                    <room>bedroom8</room>
                </house>
            </document>roomhouserl   r   N)r  r  r  r  shedr  r  )r   r   r   r  ro   r   )rH   r  all_tagss   &  r   test_iter_by_tag ElementIterTest.test_iter_by_tag  s    ff   	S&1F8a<@S'2WIMB 	3888/0HqL	
-
3X>S)84S#.9r   c                    \         P                  R 4      pVP                  4       pV P                  \        4      ;_uu_ 4        \
        P
                  ! V4       RRR4       R#   + '       g   i     R# ; ir   N)r   r   r   r   r   r   )rH   r   r   s   &  r   r%  ElementIterTest.test_copy  sE    JJsOVVXy))IIbM *)))s   A$$A5	c                ^   \         P                  R 4      pVP                  4       p\        \        P
                  ^,           4       FO  pV P                  \        \        P                  34      ;_uu_ 4        \        P                  ! W#4       RRR4       KQ  	  R#   + '       g   i     Kf  ; ir  )
r   r   r   r  r{   r  r   r   r~   r|   )rH   r   r   r   s   &   r   r  ElementIterTest.test_pickle  so    JJsOVVX622Q67E""Iv/C/C#DEER' FE 8EEEs   6BB,r   r   )rT   rU   rV   rW   r  r  r  r	  r%  r  rX   rY   rZ   s   @r   r  r  t  s(     .<45,::( (r   r  c                      a  ] tR tRt o RtRtR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tRtV tR# )TreeBuilderTesti  z<!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>z<toplevel>sometext</toplevel>c                $   V P                  VP                  R 4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  / 4       \        V4      pV P                  \        V4      ^4       V^ ,          pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  / 4       R# )r~  r   Ndivr  r   )r   rm   r   r   r   r   r   )rH   r  rX  r  s   &&  r   _check_sample1_element&TreeBuilderTest._check_sample1_element  s    '(&2&7X*E*Y/V,r*r   c                8    ! R  R4      p ! R RV4      p\         P                  V! 4       R7      pVP                  V P                  4       V P	                  VP                  4       ^*4       \         P                  V! 4       R7      pVP                  V P                  4       V P	                  VP                  4       ^*4       \         P                  \        4       R7      pVP                  V P                  4       V P                  VP                  4       4       R# )c                   &   a  ] tR tRt o R tRtV tR# )<TreeBuilderTest.test_dummy_builder.<locals>.BaseDummyBuilderi  c                    ^*# )*   r   r	  s   &r   rK  BTreeBuilderTest.test_dummy_builder.<locals>.BaseDummyBuilder.close  s    r   r   Nr  rZ   s   @r   BaseDummyBuilderr    s      r   r  c                   $    ] tR tRtR ;t;ttRtR# )8TreeBuilderTest.test_dummy_builder.<locals>.DummyBuilderi  c                     R # r   r   )r   s   *r   r  ATreeBuilderTest.test_dummy_builder.<locals>.DummyBuilder.<lambda>  s    Dr   r   N)rT   rU   rV   rW   r=   rt  ra  rX   r   r   r   DummyBuilderr    s    !00D053r   r!  rB  N)r   rH  rJ  sample1r   rK  r#   r   )rH   r  r!  rO  s   &   r   test_dummy_builder"TreeBuilderTest.test_dummy_builder  s    	 		1+ 	1 \^4DLL!,%5%78DLL!,VX.DLL!&,,.)r   c                   \         P                  4       pV P                  VP                  R 4      P                  \         P
                  4       V P                  VP                  R 4      P                  R 4       \         P                  \         P
                  R7      pV P                  VP                  R 4      P                  \         P
                  4       V P                  VP                  R 4      P                  R 4       \         P                  \        R7      pV P                  VP                  R 4      \        R 4      4       R# )ctext)comment_factoryN)r   rL  r   r  rm   r  r   r   rH   r   s   & r   test_treebuilder_comment(TreeBuilderTest.test_treebuilder_comment  s    NN7+//<7+00':NN2::N67+//<7+00':NN3N/7+S\:r   c                   \         P                  4       pV P                  VP                  R R4      P                  \         P
                  4       V P                  VP                  R R4      P                  R 4       \         P                  \         P
                  R7      pV P                  VP                  R 4      P                  \         P
                  4       V P                  VP                  R 4      P                  R 4       V P                  VP                  RR4      P                  \         P
                  4       V P                  VP                  RR4      P                  R4       \         P                  R R7      pV P                  VP                  R 4      \        R 4      R34       V P                  VP                  RR4      \        R4      R34       R# )rC  N)
pi_factoryrK  z text zpitarget  text c                     \        V 4      V3# r   )r   )rC  r   s   &&r   r  5TreeBuilderTest.test_treebuilder_pi.<locals>.<lambda>  s    CK;Nr   )r   rL  r   r  rm   r   r   r   r(  s   & r   test_treebuilder_pi#TreeBuilderTest.test_treebuilder_pi  sE   NNh-112559h-22H=NNbeeN,h++RUU3h,,h7j(377?j(388:KLNN&NNOh#h-)>?j(3c*ox5PQr   c                h    ! R  R\         P                  4      pRp\         P                  V4      pV P                  VP                  R4       \         P                  V! 4       R7      pVP                  V4       VP                  4       pV P                  VP                  R4       Rp\         P                  V4      pV P                  VP                  R4       Rp\         P                  V! 4       R7      pVP                  V4       VP                  4       pV P                  VP                  R4       R# )c                       ] tR tRtRtR# );TreeBuilderTest.test_late_tail.<locals>.TreeBuilderSubclassi  r   Nrw  r   r   r   TreeBuilderSubclassr3    ry  r   r4  z<a>text<!-- comment -->tail</a>texttailrB  z<a>text<?pi data?>tail</a>N)r   rL  r   r   r   rH  rJ  rK  )rH   r4  r3  r   rO  s   &    r   test_late_tailTreeBuilderTest.test_late_tail  s    	".. 	 0MM#,%8%:;CLLN,*MM#,*%8%:;CLLN,r   c                t    ! R  R\         P                  4      pRp\         P                  \         P                  RR7      R7      pVP                  V4       VP	                  4       pV P                  V^ ,          P                  R4       V P                  V^ ,          P                  R4       V P                  VP                  R4       \         P                  V! RR7      R7      pVP                  V4       VP	                  4       pV P                  V^ ,          P                  R4       V P                  V^ ,          P                  R4       V P                  VP                  R4       R	p\         P                  \         P                  RR
7      R7      pVP                  V4       VP	                  4       pV P                  V^ ,          P                  R4       V P                  V^ ,          P                  R4       V P                  VP                  R4       \         P                  V! RR
7      R7      pVP                  V4       VP	                  4       pV P                  V^ ,          P                  R4       V P                  V^ ,          P                  R4       V P                  VP                  R4       R# )c                       ] tR tRtRtR# )KTreeBuilderTest.test_late_tail_mix_pi_comments.<locals>.TreeBuilderSubclassi2  r   Nrw  r   r   r   r4  r:  2  ry  r   r4  z/<a>text<?pi1?> <!-- comment -->
<?pi2?>tail</a>T)insert_commentsrB  r  z
tailztext z+<a>text<!-- comment -->
<?pi data?>tail</a>)
insert_piszpi datar   ztext
N)r   rL  rH  rJ  rK  r   r   r   )rH   r4  r3  rO  r   s   &    r   test_late_tail_mix_pi_comments.TreeBuilderTest.test_late_tail_mix_pi_comments/  s   	".. 	 AR^^D^%IJCLLN1K01H-)%8%NOCLLN1K01H-)<R^^t^%DECLLN1I.1F+*%8D%IJCLLN1I.1F+*r   c                    \         P                  \         P                  R R7      R7      pVP                  V P                  4       VP                  4       pV P                  V4       R # )Nr<  rB  )r   rH  rL  rJ  r"  rK  r  rH   rO  r  s   &  r   $test_treebuilder_elementfactory_none4TreeBuilderTest.test_treebuilder_elementfactory_noneS  sF    R^^D^%IJDLL!LLN##A&r   c                ,    ! R  R\         P                  4      pV! 4       pV P                  VP                  ^
4      ^4       \         P	                  VR7      pVP                  V P                  4       VP                  4       pV P                  V4       R# )c                   &   a  ] tR tRt o R tRtV tR# )4TreeBuilderTest.test_subclass.<locals>.MyTreeBuilderiZ  c                    V^,          # r   r   r  s   &&r   r  ;TreeBuilderTest.test_subclass.<locals>.MyTreeBuilder.foobar[      1ur   r   NrT   rU   rV   rW   r  rX   rY   rZ   s   @r   MyTreeBuilderrE  Z        r   rK  rB  N)	r   rL  r   r  rH  rJ  r"  rK  r  rH   rK  tbrO  r  s   &    r   test_subclassTreeBuilderTest.test_subclassY  sl    	BNN 	 _2+R(DLL!LLN##A&r   c                    ! R  R\         P                  4      pV! \         P                  \         P                  R7      pV P	                  VP                  ^
4      ^4       \         P                  VR7      pVP                  V P                  4       VP                  R4       VP                  4       pV P                  V4       R# )c                   &   a  ] tR tRt o R tRtV tR# )?TreeBuilderTest.test_subclass_comment_pi.<locals>.MyTreeBuilderih  c                    V^,          # rG  r   r  s   &&r   r  FTreeBuilderTest.test_subclass_comment_pi.<locals>.MyTreeBuilder.foobari  rI  r   r   NrJ  rZ   s   @r   rK  rS  h  rL  r   rK  )r'  r,  rB  z<!-- a comment--><?and a pi?>N)r   rL  r  r   r   r  rH  rJ  r"  rK  r  rM  s   &    r   test_subclass_comment_pi(TreeBuilderTest.test_subclass_comment_pig  s    	BNN 	 2::"%%H2+R(DLL!34LLN##A&r   c                   a . oV3R  lp\         P                  VR7      p\         P                  VR7      pVP                  V P                  4       VP                  4        V P                  SR.4       R# )c                 P   < SP                  V 4       \        P                  W4      # r   )r   r   r   )rm   r   lsts   &&r   	myfactory7TreeBuilderTest.test_element_factory.<locals>.myfactoryx  s    JJsO::c**r   r<  rB  toplevelN)r   rL  rH  rJ  sample2rK  r   )rH   r[  rN  rO  rZ  s   &   @r   test_element_factory$TreeBuilderTest.test_element_factoryv  sZ    	+
 ^^I^6R(DLL!zl+r   c                    \         P                  VR 7      p\         P                  VR7      pVP                  V P                  4       VP                  4       pV P                  WA4       V P                  V4       R# )r<  rB  N)r   rL  rH  rJ  r"  rK  r   r  )rH   r$   rN  rO  r  s   &&   r   _check_element_factory_class,TreeBuilderTest._check_element_factory_class  sY    ^^C^0R(DLL!LLNa%##A&r   c                Z     ! R  R\         P                  4      pV P                  V4       R# )c                       ] tR tRtRtR# )@TreeBuilderTest.test_element_factory_subclass.<locals>.MyElementi  r   Nrw  r   r   r   r  rf    ry  r   r  N)r   r   rb  )rH   r  s   & r   test_element_factory_subclass-TreeBuilderTest.test_element_factory_subclass  s     	

 	)))4r   c                    \         P                  pV P                  VP                  R 4        ! R RV\        4      pV P                  V4       R# )rL   c                       ] tR tRtRtR# )LTreeBuilderTest.test_element_factory_pure_python_subclass.<locals>.MyElementi  r   Nrw  r   r   r   r  rk    ry  r   r  N)r   _Element_Pyr   rU   r  rb  )rH   baser  s   &  r   )test_element_factory_pure_python_subclass9TreeBuilderTest.test_element_factory_pure_python_subclass  s>     ~~*AB	j 	)))4r   c                     ! R  R4      p\         P                  V! 4       R7      pVP                  V P                  4       V P	                  VP                  4       R4       R# )c                   0   a  ] tR tRt o RtR tR tRtV tR# )3TreeBuilderTest.test_doctype.<locals>.DoctypeParseri  Nc                    WV3V n         R # r   _doctype)rH   r   pubidsystems   &&&&r   doctype;TreeBuilderTest.test_doctype.<locals>.DoctypeParser.doctype  s    !%f 5r   c                    V P                   # r   rt  r	  s   &r   rK  9TreeBuilderTest.test_doctype.<locals>.DoctypeParser.close  s    }}$r   rt  )	rT   rU   rV   rW   ru  rx  rK  rX   rY   rZ   s   @r   DoctypeParserrr    s     H6% %r   r|  rB  Nr~  z&-//W3C//DTD XHTML 1.0 Transitional//ENz7http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd)r   rH  rJ  r"  r   rK  )rH   r|  rO  s   &  r   test_doctypeTreeBuilderTest.test_doctype  sM    	% 	% ]_5DLL!H	Ir   c                    ! R  R4      p\         P                  V! 4       R7       R FF  pV P                  \        V4      ;_uu_ 4        \         P                  V! V4      R7       RRR4       KH  	  \         P                  V! \        R7      R7       R F_  p\         P                  V! V\        R7      R7      pVP                  V P                  4       V P                  VP                  4       4       Ka  	  R#   + '       g   i     K  ; i)c                   4   a  ] tR tRt o R]3R ltR tRtV tR# )BTreeBuilderTest.test_builder_lookup_errors.<locals>.RaisingBuilderi  Nc                    Wn         W n        R # r   raise_inwhat)rH   r  r  s   &&&r   rR  KTreeBuilderTest.test_builder_lookup_errors.<locals>.RaisingBuilder.__init__  s     ( 	r   c                b    WP                   8X  d   V P                  V P                   4      hR  pV# )c                      R # r   r   )r,   s   *r   handle^TreeBuilderTest.test_builder_lookup_errors.<locals>.RaisingBuilder.__getattr__.<locals>.handle  s    r   r  )rH   r   r  s   && r   __getattr__NTreeBuilderTest.test_builder_lookup_errors.<locals>.RaisingBuilder.__getattr__  s)    ==())DMM22r   r  )	rT   rU   rV   rW   r  rR  r  rX   rY   rZ   s   @r   RaisingBuilderr    s     (,: ! r   r  rB  N)r  )rt  r=   ra  r  r  )	r   rH  r  r  r=  rJ  r"  r   rK  )rH   r  r  rO  s   &   r   test_builder_lookup_errors*TreeBuilderTest.test_builder_lookup_errors  s    
	 
	 	N,->E''
E::N5$9: ;: ? 	N?@>E\\N)S\TFKK%flln- ?	 ;::s   	C::Dr   N)rT   rU   rV   rW   r"  r^  r  r#  r)  r/  r6  r=  rA  rO  rV  r_  rb  rg  rn  r~  r  rX   rY   rZ   s   @r   r  r    sf     2G
 2G+*(
;R-0"+H''','5
5I". .r   r  c                   V   a  ] tR tRt o RtRtRtR tR tR t	R t
R	 tR
 tR tRtV tR# )XMLParserTesti  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>uX   <?xml version="1.0" encoding="iso-8859-1"?>
<money value="$£€𐅻">$£€𐅻</money>c                    V P                  VP                  R 4       V P                  V^ ,          P                  R4       V P                  V^ ,          P                  R4       R# )rh   line22N)r   rm   r   r  s   &&r   _check_sample_element#XMLParserTest._check_sample_element  sF    '16*1D)r   c                    \         P                  R \         P                  4       R7      pVP                  V P                  4       V P                  VP                  4       4       R# )r   )r^   rC  N)r   rH  rL  rJ  r"  r  rK  )rH   r  s   & r   test_constructor_args#XMLParserTest.test_constructor_args  sE    ,,&(nn&6  8T\\"""7==?3r   c                     ! R  R\         P                  4      pV! 4       pVP                  V P                  4       V P	                  VP                  4       4       R# )c                       ] tR tRtRtR# )-XMLParserTest.test_subclass.<locals>.MyParseri  r   Nrw  r   r   r   MyParserr    ry  r   r  N)r   rH  rJ  r"  r  rK  )rH   r  rO  s   &  r   rO  XMLParserTest.test_subclass  s=    	r|| 	DLL!""6<<>2r   c                .   \         P                  ! 4       ;_uu_ 4        \         P                  ! R \        4       \        P                  4       pVP                  V P                  4       VP                  4        RRR4       R#   + '       g   i     R# ; i)errorN)	warningscatch_warningssimplefilterDeprecationWarningr   rH  rJ  r^  rK  r#  s   & r   test_doctype_warning"XMLParserTest.test_doctype_warning  sU    $$&&!!'+=>\\^FKK%LLN	 '&&&s   ABB	c                  aa R o ! V3R lR\         P                  4      pV! 4       pV P                  \        R4      ;_uu_ 4        VP	                  V P
                  4       R R R 4       VP                  4        V P                  S4       R ;oo\        P                  ! 4       ;_uu_ 4        \        P                  ! R\        4       \        P                  ! R\        4        ! V3R lR4      pV! V! 4       R7      pVP	                  V P
                  4       VP                  4        V P                  S4       V P                  SR4       R R R 4       R #   + '       g   i     L; i  + '       g   i     R # ; i)	Nc                   .   <a  ] tR tRt o V3R ltRtV tR# )@XMLParserTest.test_subclass_doctype.<locals>.MyParserWithDoctypei  c                   < W3oR # r   r   )rH   r,   r-   ru  s   &*,r   rx  HXMLParserTest.test_subclass_doctype.<locals>.MyParserWithDoctype.doctype  s
     >r   r   NrT   rU   rV   rW   rx  rX   rY   )r[   ru  s   @r   MyParserWithDoctyper    s     * *r   r  rx  r  c                   .   <a  ] tR tRt o V3R ltRtV tR# ):XMLParserTest.test_subclass_doctype.<locals>.DoctypeParseri  c                   < WV3oR # r   r   )rH   r   rv  rw  	_doctype2s   &&&&r   rx  BXMLParserTest.test_subclass_doctype.<locals>.DoctypeParser.doctype  s    !%f 5Ir   r   Nr  )r[   r  s   @r   r|  r    s     6 6r   r|  rB  r}  )r   rH  r  RuntimeWarningrJ  r^  rK  r   r  r  r  r  r   )rH   r  rO  r|  ru  r  s   &   @@r   test_subclass_doctype#XMLParserTest.test_subclass_doctype  s   	*",, 	*
 %&"">9==KK% >(###9$$&&!!'+=>!!'>:6 6
 )@FKK%LLNh'YLM '& >= '&&s   E,B E)E&	)E:	c                |   \         P                  ! 4       ;_uu_ 4        \         P                  ! R\        4       \         P                  ! R\        4        ! R R\
        P                  4      pV! 4       pVP                  V P                  4       VP                  4        RRR4       R#   + '       g   i     R# ; i)z:Ensure that ordinary usage is not deprecated (Issue 19176)r  c                       ] tR tRtRtR# )DXMLParserTest.test_inherited_doctype.<locals>.MyParserWithoutDoctypei  r   Nrw  r   r   r   MyParserWithoutDoctyper    s    r   r  N)
r  r  r  r  r  r   rH  rJ  r^  rK  )rH   r  rO  s   &  r   test_inherited_doctype$XMLParserTest.test_inherited_doctype
  sr    $$&&!!'+=>!!'>: +-FKK%LLN '&&&s   BB**B;	c                b   \         P                  \         P                  4       R 7      pVP                  V P                  4       VP                  4       pV P                  VP                  R4       V P                  VP                  R,          R4       V P                  VP                  R4       R# )rB  moneyr   u
   $£€𐅻N)
r   rH  rL  rJ  sample3rK  r   rm   r   r   r@  s   &  r   test_parse_stringXMLParserTest.test_parse_string  sw    R^^%56DLL!LLN('*,CD!89r   r   N)rT   rU   rV   rW   r"  r^  r  r  r  rO  r  r  r  r  rX   rY   rZ   s   @r   r  r    sB     -GGMG*
43M<	: :r   r  c                   &   a  ] tR tRt o R tRtV tR# )NamespaceParseTesti  c                F   R RRR/p\         P                  \        4      pV P                  \	        VP                  RV4      4      ^4       V P                  \	        VP                  RV4      4      ^4       V P                  \	        VP                  RV4      4      ^4       R# )hhellorN  r  z{hello}tablez.//{hello}tdz.//{foo}nameN)r   r   SAMPLE_XML_NS_ELEMSr   r   r   )rH   r  r  s   &  r   test_find_with_namespace+NamespaceParseTest.test_find_with_namespace  s    gsE*mm/0S[[?@!DS[[?@!DS[[?@!Dr   r   N)rT   rU   rV   rW   r  rX   rY   rZ   s   @r   r  r    s     E Er   r  c                   n   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tRtV tR# )ElementSlicingTesti(  c                B    V Uu. uF  q"P                   NK  	  up# u upi r   rl   )rH   elemlistr  s   && r   
_elem_tagsElementSlicingTest._elem_tags)  s    '(x!x(((rp   c                6    V P                  \        V4      4      # r   )r  r   r  s   &&r   _subelem_tags ElementSlicingTest._subelem_tags,  s    tDz**r   c                    \         P                  R4      p\        V4       F   p\         P                  VRV,          4       K"  	  V# )zeCreate an Element with a tag 'a', with the given amount of children
named 'a0', 'a1' ... and so on.

r   za%s)r   r   r  r  )rH   numchildrenr  r  s   &&  r   _make_elem_with_children+ElementSlicingTest._make_elem_with_children/  s7    
 JJsO{#AMM!UQY' $r   c                  a V P                  ^
4      oV P                  S^,          P                  R4       V P                  SR,          P                  R4       V P                  \        V3R l4       V P                  \        V3R l4       R# )
   a1a8c                     < S ^,          # )   r   r  s   r   r  ?ElementSlicingTest.test_getslice_single_index.<locals>.<lambda>?  s	    aer   c                     < S R,          # )r  ir   r  s   r   r  r  @  s	    afr   N)r  r   rm   r   
IndexErrorr  s   &@r   test_getslice_single_index-ElementSlicingTest.test_getslice_single_index9  sc    ))"-14(2D)*m4*n5r   c                   V P                  ^4      pV P                  V P                  VR,          4      . RO4       V P                  V P                  VR,          4      . RO4       V P                  V P                  VR,          4      . RO4       V P                  V P                  VR,          4      RR.4       V P                  V P                  V^R 4      RR.4       V P                  V P                  VR,          4      RR	.4       R
# )rm  rT  a3a4:rU  rm  N:rU     N:rU  r  N:Nr   Na0r  N)r  r  a5r  )r  r   r  r  s   & r   test_getslice_range&ElementSlicingTest.test_getslice_rangeB  s    ))!,2/1CD302DE413EF304,?1R1D$<@2/$>r   c           	     n   V P                  ^
4      pV P                  V P                  VR,          4      RR.4       V P                  V P                  VR,          4      . RO4       V P                  V P                  VR,          4      RR.4       V P                  V P                  VR,          4      R	R.4       V P                  V P                  V^R
\        P                  1,          4      R.4       V P                  V P                  V^R
\        P                  ^@,          1,          4      R.4       R
# )r  :   r  r   r  a9:NNrU  r  r  :NNr  :r   Nr  r  N)r  r  a6r  r  r   r  rz   maxsizer  s   & r   test_getslice_steps&ElementSlicingTest.test_getslice_stepsL  s    ))"-63dD\B302JK304,?41D$<@1>ckk>):;dVD1+=ckk2o+=)>?$Hr   c           	     Z   V P                  ^4      pV P                  V P                  VRRR1,          4      . RO4       V P                  V P                  VRRR1,          4      RR.4       V P                  V P                  V^R\        P                  ) 1,          4      R.4       V P                  V P                  V^R\        P                  ) ^,
          1,          4      R.4       V P                  V P                  V^R\        P                  ) ^@,          1,          4      R.4       R# )r  Nr  r  r  )r  a2r  r  r  r  r  s   & r   test_getslice_negative_steps/ElementSlicingTest.test_getslice_negative_stepsV  s    ))!,4R413KL4R41D$<@1?s{{l?);<tfE1+<s{{l1n+<)=>G1+>s{{lB.>+>)?@4&Ir   c                   V P                  ^4      pVR V P                  V P                  V4      RR.4       V P                  ^4      pVR V P                  V P                  V4      . 4       V P                  ^4      pVRRR
1 V P                  V P                  V4      . 4       V P                  ^4      pVRRR1 V P                  V P                  V4      RR.4       V P                  ^4      pVR V P                  V P                  V4      RR.4       V P                  ^4      pVR V P                  V P                  V4      R	.4       R# )r  r  r  r  :r   NNNr  :r   Nr   :NNr   r  r  r  )r  r   r  r  s   & r   test_delslice ElementSlicingTest.test_delslice_  sD   ))!,cF++A.t=))!,bE++A.3))!,ddG++A.3))!,ddG++A.t=))!,dG++A.t=))!,cF++A.7r   c                   V P                  ^4      p\        P                  R4      V^&   V P                  V P	                  V4      . RO4       \        P                  R4      VR&   V P                  V P	                  V4      . RO4       V P                  \        4      ;_uu_ 4        \        P                  R4      V^&   RRR4       V P                  \        4      ;_uu_ 4        \        P                  R4      VR&   RRR4       V P                  V P	                  V4      . RO4       R#   + '       g   i     Ls; i  + '       g   i     LH; i)	r  r   r   r   Nr  r   r  r  r  )r  r   r   r  )r  r   r   r   r  r   r  r  s   & r   test_setslice_single_index-ElementSlicingTest.test_setslice_single_indexx  s    ))!,zz#!++A.0GH

3"++A.0FGz**::c?AaD +z**JJsOAbE +++A.0FG	 +***s   %D)#D<)D9	<E	c                d   V P                  ^4      p\        ^4       Uu. uF  p\        P                  RV,          4      NK!  	  upVR&   V P	                  V P                  V4      . RO4       V P                  ^4      p\        P                  R4      .VR&   V P	                  V P                  V4      . RO4       V P                  ^4      p\        ^4       Uu. uF  p\        P                  RV,          4      NK!  	  upVR&   V P	                  V P                  V4      . RO4       R# u upi u upi )r  b%s:r   rU  Nr   N)r  b0b1r  )r  r   r  )r  r  r  b2r  )r  r  r   r   r   r  rH   r  r  s   &  r   test_setslice_range&ElementSlicingTest.test_setslice_range  s    ))!,16q:A"**UQY':#++A.0HI))!,**S/"#++A.0AB))!,16q:A"**UQY':#++A.0NO ; ;s   %D(%D-c           	        V P                  ^4      p\        ^4       Uu. uF  p\        P                  RV,          4      NK!  	  upVR&   V P	                  V P                  V4      . RO4       V P                  ^4      pV P                  \        4      ;_uu_ 4        \        P                  R4      .VR&   RRR4       V P                  \        4      ;_uu_ 4        \        ^4       Uu. uF  p\        P                  RV,          4      NK!  	  upVR&   RRR4       V P                  \        4      ;_uu_ 4        . VR&   RRR4       V P	                  V P                  V4      . RO4       V P                  ^4      p\        P                  R4      .V^R\        P                  1&   V P	                  V P                  V4      . RO4       \        P                  R4      .V^R\        P                  ^@,          1&   V P	                  V P                  V4      . R	O4       R# u upi   + '       g   i     ELv; iu upi   + '       g   i     EL1; i  + '       g   i     EL; i)
rm  r  :r   r  r   r   Nr   )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  rz   r  r  s   &  r   test_setslice_steps&ElementSlicingTest.test_setslice_steps  s   ))!,388<8aBJJuqy)8<%++A.0TU))!,z**

3(AeH +z**7<Qx@x!

519-x@AeH +z**AeH +++A.0TU))!,ZZ_-!.S[[.++A.0GH!#C 1!
S[["_
++A.0GH! = +** A +*****s;   %HH"H;(%H6H;8I"H3	6H;;I	I 	c           	        V P                  ^4      p\        ^4       Uu. uF  p\        P                  RV,          4      NK!  	  upV^^ R1&   V P	                  V P                  V4      . RO4       V P                  ^4      pV P                  \        4      ;_uu_ 4        \        P                  R4      .V^^ R1&   RRR4       V P                  \        4      ;_uu_ 4        \        ^4       Uu. uF  p\        P                  RV,          4      NK!  	  upV^^ R1&   RRR4       V P                  \        4      ;_uu_ 4        . V^^ R1&   RRR4       V P	                  V P                  V4      . RO4       V P                  ^4      p\        P                  R4      .V^R\        P                  ) 1&   V P	                  V P                  V4      . R	O4       \        P                  R4      .V^R\        P                  ) ^,
          1&   V P	                  V P                  V4      . R
O4       \        P                  R4      .V^R\        P                  ) ^@,          1&   V P	                  V P                  V4      . RO4       R# u upi   + '       g   i     EL; iu upi   + '       g   i     EL; i  + '       g   i     ELq; i)r  r  r   Nr   r   r  )r  r  r  r  )r  r  r  r  r  r	  )r  r   r  r  r
  r  s   &  r   test_setslice_negative_steps/ElementSlicingTest.test_setslice_negative_steps  s#   ))!,49!H=HqRZZ	*H=!Ab&	++A.0HI))!,z**C)Aa"fI +z**8=aA1EAI.AAa"fI +z**Aa"fI +++A.0HI))!, jjo.!/ckk\/++A.0GH "

30!
ckk\!^
++A.0GH"$**S/!2!
ckk\2
++A.0GH% > +** B +*****s;   %J J J.%J	J	J2J	JJ/	2K	c                  a \         P                  R 4      pV P                  \        4      ;_uu_ 4        R \	        ^4       4       VR&   RRR4       V P                  \
        4      ;_uu_ 4        RVR&   RRR4       R oV P                  \
        R4      ;_uu_ 4        V3R l\	        ^4       4       VR&   RRR4       R#   + '       g   i     L; i  + '       g   i     Lg; i  + '       g   i     R# ; i)rm   c              3   4   "   T F  p^^ ,          x  K  	  R# 5ir;  r   r<  s   & r   r>  IElementSlicingTest.test_issue123213_setslice_exception.<locals>.<genexpr>  s     +(QQqSS(r@  :Nr   NNc                      \        R 4      hrB  rD  r   r   r   rN  AElementSlicingTest.test_issue123213_setslice_exception.<locals>.f  rF  r   rC  c              3   2   <"   T F  pS! 4       x  K  	  R # 5ir   r   rH  s   & r   r>  r    s     +(QQSS(rI  )r   r   r   rJ  r  r   r  )rH   r  rN  s   & @r   #test_issue123213_setslice_exception6ElementSlicingTest.test_issue123213_setslice_exception  s    JJu011+%(+AbE 2 y))AbE *	) ##I{;;+%(+AbE <; 21 *) <;;s#   C/CC'C	C$	'C8	r   N)rT   rU   rV   rW   r  r  r  r  r  r  r  r  r  r  r  r  r  rX   rY   rZ   s   @r   r  r  (  sQ     )+6?IJ82HPI(I,, ,r   r  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR t ! R R4      tR tR tR tR tR tR tR tRtV tR# )IOTesti  c           
     h   \         P                  R 4      pRVn        V P                  \	        V4      R4       R Fk  pV P                  V4      ;_uu_ 4        V P                  \	        WR7      R4       V P                  \	        WP                  4       R7      R4       RRR4       Km  	  R F  pV P                  V4      ;_uu_ 4        V P                  \	        WR7      RV,          P                  V4      4       VP                  4       pV P                  \	        WR7      RV,          P                  V4      4       RRR4       K  	  \         P                  R 4      pR	Vn        V P                  \	        V4      R
4       V P                  \	        VRR7      R4       V P                  \	        VRR7      R4       R F5  pV P                  \	        WR7      RV,          P                  V4      4       K7  	  \         P                  R 4      pR	VP                  R&   V P                  \	        V4      R4       V P                  \	        VRR7      R4       V P                  \	        VRR7      R4       R F5  pV P                  \	        WR7      RV,          P                  V4      4       K7  	  \         P                  R 4      pRVn        V P                  \	        V4      R4       V P                  \	        VRR7      R4       V P                  \	        VRR7      R4       R F5  pV P                  \	        WR7      RV,          P                  V4      4       K7  	  \         P                  R 4      pRVP                  R&   V P                  \	        V4      R4       V P                  \	        VRR7      R4       V P                  \	        VRR7      R4       R F5  pV P                  \	        WR7      RV,          P                  V4      4       K7  	  R#   + '       g   i     EK  ; i  + '       g   i     EK  ; i)rm   r/  z<tag>abc</tag>r   r6  rA  s   <tag>abc</tag>Nz2<?xml version='1.0' encoding='%s'?>
<tag>abc</tag>z<&"'>z<tag>&lt;&amp;"'&gt;</tag>s   <tag>&lt;&amp;"'&gt;</tag>z><?xml version='1.0' encoding='%s'?>
<tag>&lt;&amp;"'&gt;</tag>r   z"<tag key="&lt;&amp;&quot;'&gt;" />s"   <tag key="&lt;&amp;&quot;'&gt;" />zF<?xml version='1.0' encoding='%s'?>
<tag key="&lt;&amp;&quot;'&gt;" />u   åöö<>u   <tag>åöö&lt;&gt;</tag>s   <tag>åöö&lt;&gt;</tag>s%   <tag>&#229;&#246;&#246;&lt;&gt;</tag>u=   <?xml version='1.0' encoding='%s'?>
<tag>åöö&lt;&gt;</tag>u   <tag key="åöö&lt;&gt;" />s   <tag key="åöö&lt;&gt;" />s(   <tag key="&#229;&#246;&#246;&lt;&gt;" />u@   <?xml version='1.0' encoding='%s'?>
<tag key="åöö&lt;&gt;" />)r   r6  )r7  r?  utf-32)r7  r?  rA  r@  r  )	r   r   r   r   rj   r$  upperr<   r   )rH   re   encr  s   &   r   rz  IOTest.test_encoding  s   zz% 	4*:;(Cc""  4!>)+  4))+!F)+ #" ) 6Cc""  4!>*,/017> 		  4!@*,12396#;@ #" 6 zz% 	4*GH4':.	04*=.	05CYt:3589:@&+G 6
 zz% &E4*OP4':6	84*=6	85CYt:<>ABCI6#;P 6
 zz% $	4*KL4':>	@4*=8	:5CYt:13678>sE 6
 zz% -E4*NO4':A	C4*=;	=MCYt:68;<=CVC[J Nu #"" #""s   AP
A5P
PP1c                r   V P                  \        P                  \        4       \        P                  \        P                  R 4      4      pVP                  \        4       \        \        R4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       R#   + '       g   i     R# ; i)   <site>ø</site>rc     <site>&#248;</site>N)r  r   r  r   r   rB   r   rb   rF  r   rG  rH   ri   rN  s   &  r   test_write_to_filenameIOTest.test_write_to_filename  so    	((&1~~bff%<=>

6&$1QVVX'AB  s   :!B%%B6	c                ^   V P                  \        P                  \        4       \        P                  \        P                  R 4      4      pVP                  \        RR7       \        \        R4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       VP                  \        RR7       \        \        R4      ;_uu_ 4       pV P                  VP                  4       \        R4      4       RRR4       R#   + '       g   i     Ls; i  + '       g   i     R# ; i)r   r   rA  rc     <site>ø</site>Nr#  :   <?xml version='1.0' encoding='ISO-8859-1'?>
<site></site>)r  r   r  r   r   rB   r   rb   rF  r   rG  r>   r"  s   &  r   $test_write_to_filename_with_encoding+IOTest.test_write_to_filename_with_encoding  s    	((&1~~bff%<=>

6G
,&$1QVVX'CD   	

6L
1&$1QVVX{6(7 8  	    s   <!D*DD	D,	c                *   V P                  \        P                  \        4       \	        \        R 4      ;_uu_ 4       pVP
                  pRRR4       \        P                  ! \        4       \        P                  \        P                  R4      4      pVP                  \        RR7       \	        \        R4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r  Nr   r]   rA  rc  r&  )r  r   r  r   rF  r^   r   rB   r   rb   r   rG  )rH   rN  r^   ri   s   &   r   !test_write_to_filename_as_unicode(IOTest.test_write_to_filename_as_unicode(  s    	((&1&#!zzH  ~~bff%<=>

6I
.&$1QVVX'?@     s   C.!D.C>	D	c                   V P                  \        P                  \        4       \        P                  \        P                  R 4      4      p\        \        RRR7      ;_uu_ 4       pVP                  VRR7       V P                  VP                  4       RRR4       \        \        R4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       \        \        RRR	R
7      ;_uu_ 4       pVP                  VRR7       V P                  VP                  4       RRR4       \        \        R4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       \        \        RRR7      ;_uu_ 4       pVP                  VRR7       V P                  VP                  4       RRR4       \        \        R4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       R#   + '       g   i     ELy; i  + '       g   i     ELL; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)r   r  r   rA  r]   Nrc  r&  rU  xmlcharrefreplace)r^   errorsr!  r#  s   <site></site>r  r   r  r   r   rB   r   rF  rb   r  r  r   rG  r"  s   &  r   test_write_to_text_fileIOTest.test_write_to_text_file3  s   	((&1~~bff%<=>&#00AJJq9J-QXX& 1 &$1QVVX'CD   &#8KLLPQJJq9J-QXX& M &$1QVVX(BC   &#55JJq9J-QXX& 6 &$1QVVX'?@   100   MLL   65  sH   '/H6!H:/H.	!I/I!I(H	H+	.H?	I	I%	(I9	c                   V P                  \        P                  \        4       \        P                  \        P                  R 4      4      p\        \        R4      ;_uu_ 4       pVP                  V4       V P                  VP                  4       RRR4       \        \        R4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       R#   + '       g   i     LS; i  + '       g   i     R# ; i)r   rh  Nrc  r!  r0  r"  s   &  r   test_write_to_binary_file IOTest.test_write_to_binary_fileH  s    	((&1~~bff%<=>&$1JJqMQXX&   &$1QVVX'AB      s   %-C2!C0C-	0D	c                x   V P                  \        P                  \        4       \        P                  \        P                  R 4      4      p\        \        R4      ;_uu_ 4       pVP                  VRR7       V P                  VP                  4       RRR4       \        \        R4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       \        \        R4      ;_uu_ 4       pVP                  VRR7       V P                  VP                  4       RRR4       \        \        R4      ;_uu_ 4       pV P                  VP                  4       R4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Ly; i  + '       g   i     R# ; i)	r   rh  r   rA  Nrc  r&  r#  r'  r0  r"  s   &  r   'test_write_to_binary_file_with_encoding.IOTest.test_write_to_binary_file_with_encodingQ  s$   	((&1~~bff%<=>&$1JJq7J+QXX&   &$1QVVX'CD   &$1JJq<J0QXX&   &$1QVVX67          s0   %/E/4!F5/F!F(/E?	F	F%	(F9	c                   V P                  \        P                  \        4       \        P                  \        P                  R 4      4      p\        \        R4      ;_uu_ 4       pVP                  VRR7       V P                  VP                  4       RRR4       \        \        R4      ;_uu_ 4       pV P                  VP                  4       RP                  R4      4       RRR4       \        \        R^ R7      ;_uu_ 4       pVP                  VRR7       V P                  VP                  4       RRR4       \        \        R4      ;_uu_ 4       pV P                  VP                  4       RP                  R4      4       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)r   rh  r?  rA  Nrc  u7   <?xml version='1.0' encoding='utf-16'?>
<site>ø</site>)	buffering)r  r   r  r   r   rB   r   rF  rb   r  r  r   rG  r<   r"  s   &  r   "test_write_to_binary_file_with_bom)IOTest.test_write_to_binary_file_with_bomb  sA   	((&1~~bff%<=>&$1JJq8J,QXX&   &$1QVVX,,2F8,<>  
 &$!,,JJq8J,QXX& - &$1QVVX,,2F8,<>      
 -,  s0   %/F40F#/F60G	F 	#F3	6G		G	c                    \         P                  4       p\        P                  ! R 4      pVP	                  V4       V P                  VP                  4       P                  R4       R# z"<?xml version="1.0"?><site></site>siteN)r   rB   r_   ra   rD  r   r   rm   rH   ri   rM  s   &  r   test_read_from_stringioIOTest.test_read_from_stringiov  sE    ~~EF

6++V4r   c                    \         P                  \         P                  R 4      4      p\        P                  ! 4       pVP                  VRR7       V P                  VP                  4       R 4       R# r   r]   rA  N)r   rB   r   r_   ra   rb   r   rc   r@  s   &  r   test_write_to_stringioIOTest.test_write_to_stringio|  sM    ~~bff%<=>

6I
.*,CDr   c                    \         P                  4       p\        P                  ! R 4      pVP	                  V4       V P                  VP                  4       P                  R4       R# s"   <?xml version="1.0"?><site></site>r?  N)r   rB   r_   r`   rD  r   r   rm   rH   ri   r2  s   &  r   test_read_from_bytesioIOTest.test_read_from_bytesio  sD    ~~jjBC

3++V4r   c                    \         P                  \         P                  R 4      4      p\        P                  ! 4       pVP                  V4       V P                  VP                  4       R4       R# r   r!  N)r   rB   r   r_   r`   rb   r   rc   rI  s   &  r   test_write_to_bytesioIOTest.test_write_to_bytesio  sG    ~~bff%<=>jjl

3)CDr   c                       ] tR tRtRtR# )IOTest.dummyi  r   Nrw  r   r   r   dummyrQ    s    r   rR  c                   \         P                  ! R 4      pV P                  4       pVP                  Vn        \        P                  4       pVP                  V4       V P                  VP                  4       P                  R4       R# r>  )
r_   ra   rR  rG  r   rB   rD  r   r   rm   )rH   rM  readerri   s   &   r   test_read_from_user_text_reader&IOTest.test_read_from_user_text_reader  s[    EFkk~~

6++V4r   c                (   \         P                  \         P                  R 4      4      p\        P                  ! 4       pV P                  4       pVP                  Vn        VP                  VRR7       V P                  VP                  4       R 4       R# rD  )	r   rB   r   r_   ra   rR  rb   r   rc   )rH   ri   rM  writers   &   r   test_write_to_user_text_writer%IOTest.test_write_to_user_text_writer  sc    ~~bff%<=>||

6I
.*,CDr   c                :   \         P                  ! R 4      pV P                  4       pVP                  Vn        \        P                  4       pVP                  V4       V P                  VP                  4       P                  R4       \        P                  4       pR# rH  )
r_   r`   rR  rG  r   rB   rD  r   r   rm   )rH   r2  rT  ri   s   &   r   !test_read_from_user_binary_reader(IOTest.test_read_from_user_binary_reader  sg    jjBChh~~

6++V4~~r   c                $   \         P                  \         P                  R 4      4      p\        P                  ! 4       pV P                  4       pVP                  Vn        VP                  V4       V P                  VP                  4       R4       R# rM  )	r   rB   r   r_   r`   rR  rb   r   rc   rH   ri   r2  rX  s   &   r    test_write_to_user_binary_writer'IOTest.test_write_to_user_binary_writer  s^    ~~bff%<=>jjlyy

6)CDr   c                x   \         P                  \         P                  R 4      4      p\        P                  ! 4       pV P                  4       pVP                  Vn        R Vn        VP                  Vn        VP                  VRR7       V P                  VP                  4       RP                  R4      4       R# )z<site />c                      R # rp  r   r   r   r   r  BIOTest.test_write_to_user_binary_writer_with_bom.<locals>.<lambda>  s    $r   r?  rA  z0<?xml version='1.0' encoding='utf-16'?>
<site />N)r   rB   r   r_   r`   rR  rb   seekabletellr   rc   r<   r_  s   &   r   )test_write_to_user_binary_writer_with_bom0IOTest.test_write_to_user_binary_writer_with_bom  s    ~~bff^45jjlyy&hh

6H
-%vh/	1r   c           	     T   \         P                  R 4      pV P                  \         P                  VR4      RP	                  \         P                  VR4      4      4       V P                  \         P                  VR4      RP	                  \         P                  VR4      4      4       R# )z<tag>foo</tag>r]   r   r?  r   N)r   r   r   r3  rX  rY  r  s   & r   test_tostringlist_invariant"IOTest.test_tostringlist_invariant  sy    }}-.KKi(GGBOOD)45	7 	KKh'HHR__T845	7r   c                   \         P                  R 4      pV P                  \         P                  VR4      R4       V P                  \         P                  VRRR7      R4       V P                  \         P                  VRRR7      R4       R# )z<tag>a<x />b<y></y>c</tag>r]   z<tag>a<x />b<y />c</tag>T)short_empty_elementsFz<tag>a<x></x>b<y></y>c</tag>N)r   r   r   r3  r  s   & r   test_short_empty_elements IOTest.test_short_empty_elements  sz    }}9:KKi(&	( 	KKidKC&	( 	KKieKD*	,r   r   N)rT   rU   rV   rW   rz  r#  r(  r+  r1  r4  r7  r;  rA  rE  rJ  rN  rR  rU  rY  r\  r`  rg  rj  rn  rX   rY   rZ   s   @r   r  r    s~     CJJC8	AA*C7">(5E5E 5E E
17
, 
,r   r  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )ParseErrorTesti  c                V    V P                  \        P                  4       \        4       R # r   )r   r   r  r  r	  s   &r   rO  ParseErrorTest.test_subclass  s    bmmo{;r   c                z     \         P                  V4       R #   \         P                   d   pTu R p?# R p?ii ; ir   )r   r   r  )rH   r  r  s   && r   
_get_errorParseErrorTest._get_error  s,    	MM!}} 	H	s    :5::c                   V P                  V P                  R 4      P                  R4       V P                  V P                  R4      P                  R4       V P                  V P                  R4      P                  R4       R# )r  z<tag>&foo;</tag>zfoobar<N)r   r   )r   r  )r   rm  )r   ru  positionr	  s   &r   test_error_position"ParseErrorTest.test_error_position  s`    /88&A);<EEvN3<<fEr   c                    ^ RI Hu Hu Hp V P	                  V P                  R4      P                  VP                  VP                  ,          4       R# )r   Nr  )	xml.parsers.expat.errorsparsersexpatr/  r   ru  codecodesXML_ERROR_SYNTAX)rH   ERRORSs   & r   test_error_codeParseErrorTest.test_error_code  s9    11/44V445	7r   r   N)
rT   rU   rV   rW   rO  ru  ry  r  rX   rY   rZ   s   @r   rq  rq    s     <F
7 7r   rq  c                   &   a  ] tR tRt o R tRtV tR# )KeywordArgsTesti  c                   \         P                  R 4      pV P                  VP                  RR4      VP                  RRR7      4       V P                  VP	                  RRR4      VP	                  RRRR7      4       V P                  VP                  RR4      VP                  RRR7      4       V P                  \        VP                  RR4      4      \        VP                  RRR7      4      4       V P                  \         P                  R4      P                  / 4       \         P                  R\        RRR7      4      \         P                  R\        RRR7      R7      \         P                  R\        RR	7      RR
7      \         P                  RRRR7      \         P                  R\        RRR7      RRR7      .pV FF  pV P                  VP                  R4       V P                  VP                  \        RRR7      4       KH  	  \         P                  V^ ,          RRR/R7      pV P                  VP                  R,          R4       V P                  \        R4      ;_uu_ 4        \         P                  RR4       RRR4       V P                  \        R4      ;_uu_ 4        \         P                  RRR7       RRR4       R#   + '       g   i     LP; i  + '       g   i     R# ; i)z
<a>foo</a>r   N)pathr  )r  r(  r  #r  )r  r  )r   )r  )r  r  key1value1zmust be dict, not strzI'm not a dict)r   r   r   r   r   r   r   r   r   r   r   rm   r  r  r   )rH   r   elementsr  r#  s   &    r   test_issue14818KeywordArgsTest.test_issue14818  s@   FF< T*ST:	<Ct4dtL	N3-=	?ajjd34ajjcdjCD	F 	C//4JJsDce45JJs4SU#;J<JJsDcNuJ5JJsJ/JJsDce435JI
 AQUUC(QXXt'?@  ]]8A;&(9K]L6*H5##I/FGGJJs,- H##I/FGGJJs#3J4 HG HGGGGs   1K.K#K 	#K4	r   N)rT   rU   rV   rW   r  rX   rY   rZ   s   @r   r  r    s     5 5r   r  c                   6   a  ] tR tRt o ]R 4       tR tRtV tR# )NoAcceleratorTesti  c                N    \         \        Jd   \        P                  ! R 4      hR# )zonly for the Python versionN)r   r   rt  SkipTestru   s   &r   rv   NoAcceleratorTest.setUpClass  s     T>##$ABB r   c                    V P                  \        P                  P                  \        P
                  4       V P                  \        P                  P                  \        P
                  4       R # r   )r   r   r   rR  typesFunctionTyperH  r	  s   &r   test_correct_import_pyET*NoAcceleratorTest.test_correct_import_pyET  sD     	dll33U5G5GHdnn55u7I7IJr   r   N)	rT   rU   rV   rW   r   rv   r  rX   rY   rZ   s   @r   r  r    s%     C C
K Kr   r  c                   &   a  ] tR tRt o R tRtV tR# )BoolTesti  c                   \         P                  R 4      pRpV P                  \        V4      ;_uu_ 4        \	        V4      pRRR4       V P                  XR4       \         P                  VR4       V P                  \        V4      ;_uu_ 4        \	        V4      pRRR4       V P                  XR4       R#   + '       g   i     L~; i  + '       g   i     L7; i)z<a style="new"></a>zTesting an element's truth value will always return True in future versions.  Use specific 'len\(elem\)' or 'elem is not None' test instead.NFr   T)r   r   r  r  boolr\  r  )rH   r  r   r   
new_results   &    r   test_warningBoolTest.test_warning  s    MM/0N 	 ""#5s;;!WF < 	fe$ 	a""#5s;;aJ <j$' <; <;s   B8C8C	C	r   N)rT   rU   rV   rW   r  rX   rY   rZ   s   @r   r  r    s     ( (r   r  c                 0    \         P                  ! V 3/ VB # r   )r   canonicalize)r3  rg   s   &,r   c14n_roundtripr  1  s    S,G,,r   c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )C14NTesti5  Nc                <   V P                  \        R 4      R4       V P                  \        R4      R4       V P                  \        R4      R4       V P                  \        R4      R4       V P                  \        R4      R	4       V P                  \        R
4      R4       V P                  \        R4      R4       V P                  \        R4      R4       V P                  \        R4      R4       V P                  \        R4      R4       V P                  \        R4      R4       V P                  \        R4      R4       RpV P                  \        V4      V4       RpV P                  \        V4      V4       RpV P                  \        V4      V4       R# )z<doc/>z<doc></doc>z<doc xmlns='uri'/>z<doc xmlns="uri"></doc>z <prefix:doc xmlns:prefix='uri'/>z,<prefix:doc xmlns:prefix="uri"></prefix:doc>z+<doc xmlns:prefix='uri'><prefix:bar/></doc>z7<doc><prefix:bar xmlns:prefix="uri"></prefix:bar></doc>z<elem xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' />z<elem></elem>z*<doc>Hello, world!<!-- Comment 1 --></doc>z<doc>Hello, world!</doc>z<value>&#x32;</value>z<value>2</value>zG<compute><![CDATA[value>"0" && value<"10" ?"valid":"error"]]></compute>zI<compute>value&gt;"0" &amp;&amp; value&lt;"10" ?"valid":"error"</compute>zS<compute expr='value>"0" &amp;&amp; value&lt;"10" ?"valid":"error"'>valid</compute>z{<compute expr="value>&quot;0&quot; &amp;&amp; value&lt;&quot;10&quot; ?&quot;valid&quot;:&quot;error&quot;">valid</compute>z7<norm attr=' &apos;   &#x20;&#13;&#xa;&#9;   &apos; '/>z/<norm attr=" '    &#xD;&#xA;&#x9;   ' "></norm>z6<normNames attr='   A   &#x20;&#13;&#xa;&#9;   B   '/>z=<normNames attr="   A    &#xD;&#xA;&#x9;   B   "></normNames>z7<normId id=' &apos;   &#x20;&#13;&#xa;&#9;   &apos; '/>z1<normId id=" '    &#xD;&#xA;&#x9;   ' "></normId>z5<X xmlns="http://nps/a"><Y targets="abc,xyz"></Y></X>zJ<X xmlns="http://nps/a"><Y xmlns="http://nsp/b" targets="abc,xyz"></Y></X>zN<X xmlns="http://nps/a"><Y xmlns:b="http://nsp/b" b:targets="abc,xyz"></Y></X>N)r   r  rH   r3  s   & r   test_simple_roundtripC14NTest.test_simple_roundtrip;  s   1=A(<=)	+(JK:	<(UVE	G  )M  N	 	(TU&	((?@	 (qrW	Y  )B  C J	K(ab?	A(`aK	M(abA	C F,c2Z,c2^,c2r   c           	     &   \         P                  ! R 4      pV P                  \        VRR7      R4       V P                  \        VRR.R7      R4       V P                  \        VRR.R7      R	4       V P                  \        VRR.R.R
7      R4       V P                  \        VRRR.R7      R4       V P                  \        VRR.R7      R4       V P                  \        VRRR.R7      R4       V P                  \        VRR.R7      R4       R# )z        <root xmlns:x="http://example.com/x">
            <a x:attr="attrx">
                <b>abtext</b>
            </a>
            <b>btext</b>
            <c>
                <x:d>dtext</x:d>
            </c>
        </root>
        T)
strip_textz<root><a xmlns:x="http://example.com/x" x:attr="attrx"><b>abtext</b></a><b>btext</b><c><x:d xmlns:x="http://example.com/x">dtext</x:d></c></root>z{http://example.com/x}attr)r  exclude_attrszc<root><a><b>abtext</b></a><b>btext</b><c><x:d xmlns:x="http://example.com/x">dtext</x:d></c></root>z{http://example.com/x}d)r  exclude_tagszb<root><a xmlns:x="http://example.com/x" x:attr="attrx"><b>abtext</b></a><b>btext</b><c></c></root>)r  r  r  z4<root><a><b>abtext</b></a><b>btext</b><c></c></root>r   r   zC<root><c><x:d xmlns:x="http://example.com/x">dtext</x:d></c></root>)r  za<root>
    
    
    <c>
        <x:d xmlns:x="http://example.com/x">dtext</x:d>
    </c>
</root>zI<root><a xmlns:x="http://example.com/x" x:attr="attrx"></a><c></c></root>zu<root>
    <a xmlns:x="http://example.com/x" x:attr="attrx">
        
    </a>
    
    <c>
        
    </c>
</root>N)r  r  r   r  r  s   & r   test_c14n_exclusionC14NTest.test_c14n_exclusionc  sA   oo 
 
 	340	 	34@\?]^	 	34?X>YZ	 	34@\?])B(CE	 	34sCjI	
 	3c3Z8	 	34?XZ]>^_	 	3.G-MN
	r   c                B   \        R RR7      p\        \        P                  P                  V4      p\        \        P                  ! V4      4       Uu. uF!  pVP                  R4      '       g   K  VRR* NK#  	  ppV Uu. uF  pVP                  R4      '       g   K  VNK   	  ppV UUu/ uF  pVP                  R4      '       g   K  T\        P                  V! V4      R,           4      P                  4        Uu/ uFJ  pVP                  P                  R4      R+,          VP                  ;'       g    RP                  4       V3bKL  	  upbK  	  pppV UUu/ uFr  pTV Uu. uFa  pVP                  R	V R
24      '       g   K   VP!                  R
^4      R+,          V9   g   K@  W7VP!                  R
^4      R+,          ,          3NKc  	  upbKt  	  p	ppT P#                  ^\%        V	P'                  4        U
Uu. uF  p
V
 F  pVNK  	  K  	  upp
4      4       R,R lpV	P)                  4        EF  w  rV
 EF  w  rV! VR4      R8H  pV! VR4      R8H  pV! VR4      R8H  pRV9   d   VR,          ^,          P+                  R4       Uu. uF)  pRVP-                  R4       RVP-                  R4       2NK+  	  ppVR,          ^,          P+                  R4       Uu. uF)  pRVP-                  R4       RVP-                  R4       2NK+  	  ppMR;ppRP	                  R \        VP)                  4       4       4       4      pV P/                  V RV R24      ;_uu_ 4        VR8X  d   V'       g   V P1                  RV 24       VR8X  d   V'       g   V P1                  RV 24       RV9   d7   VR,          ^,          P3                  R4       e   V P1                  RV 24       V! VR,           4      pVR 8X  d   \5        V! R!4      R"4      ;_uu_ 4       p\5        VR"4      ;_uu_ 4       p\6        P8                  ! VP;                  4       P=                  R#VP;                  4       4      4      pRRR4       RRR4       \        P?                  VVVVVVR$7      p\5        V! VR,           4      R%R&R'7      ;_uu_ 4       pVP;                  4       pVR(8X  d%   VP=                  R)R4      pVP=                  R)R4      pRRR4       V P#                  XV4       RRR4       EK  	  EK  	  R# u upi u upi u upi u uppi u upi u uppi u upp
i u upi u upi   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     EKg  ; i)-zc14n-20r   r   z.xmlNinc14n}r   out_r\  c                 6    V P                  WR34      ^ ,          # )r   r   )r   )configoption_namer(  s   &&&r   
get_option+C14NTest.test_xml_c14n2.<locals>.get_option  s    ::kR=9!<<r   IgnoreCommentstrueTrimTextNodesPrefixRewrite
sequential
QNameAwarez/{http://www.w3.org/2010/xml-c14n2}QualifiedAttr{NSNamez){http://www.w3.org/2010/xml-c14n2}Element,c              3   z   "   T F1  w  pw  r#T R T;'       g    RP                  R V 4       4       2x  K3  	  R# 5i)=r  c              3   d   "   T F&  qP                   P                  R 4      R,          x  K(  	  R# 5i)r  Nr  )rm   split)r=  r   s   & r   r>  4C14NTest.test_xml_c14n2.<locals>.<genexpr>.<genexpr>  s#     /WhC0@0D0Dhs   .0N)rX  )r=  r   r   rX  s   &   r   r>  *C14NTest.test_xml_c14n2.<locals>.<genexpr>  sB      (3I//u fAeWWsxx/Wh/W'WXY3Is   ;#;()
inNsRedeclz2Redeclared namespace handling is not supported in inNsSuperfluousz.{http://www.w3.org/2010/xml-c14n2}XPathElementz2QName rewriting in XPath text is not supported in inC14N5z	world.txtrc  s   &ent2;)	from_filewith_commentsr  rewrite_prefixesqname_aware_tagsqname_aware_attrsrr  rA  inC14N3z attr="default"r.  r  r   ) r
   r   r:   r  rX  r4  listdirendswith
startswithr   rD  r   rm   r  r   r0  rsplitr   r   valuesr   r   r   r$  rp  r   rF  r_   r`   rG  r9   r  )rH   datadir	full_pathfilenamefilesinput_filesoptionconfigs
input_filetestsoutput_filesoutput_filer  r  keep_commentsr  r  r  qattrsqtagsconfig_descrrN  entity_filer   r   s   &                        r   test_xml_c14n2C14NTest.test_xml_c14n2  s   9];BGGLL'2	/5bjj6I/J //J8%%f- #2/J / &+
%*""4( HU 	 
 "
 """6*H !hhy':V'CDLLN OF 

  %b)V[[->->B,E,E,G+PPN 
 " 	 
" *
 *
  % %H&&j\';< A OOC+B/7: A8??3#:2#>?@ %  * 	 
 	S,1LLN"-,:L+ + N"- . 	/	= ).$J'3# *,!.17!8'O-067
#-O$-0<$= 6) #)"6q"9"A"AM#O#OB RVVD\N"RVVF^,<=#O   #)"6q"9"A"AG#I#IB RVVD\N"RVVF^,<=#I  E &*)EF  #xx (39&,,.3I(  
 \\[M<."BCC!\1:JPQ\P]^`!%66?OPQ\P]^`#v-&2Fq2I2N2NL3NUY3ZPQ\P]^` "*v"56A!Y.!)K"8$??;!%a!$&JJqvvx/?/?	;K[K[K]/^$_ "/ @ ??"#&3#-)9).& + JD if(<=sVTTXY#$668%2'/'7'78I2'NH#'<<0A2#FD U $$Xt4A DC7 (4 )6E/



"- 
< "/ @? UT5 DCCs   T#1	T# T(T(+T2	3T2<8T-5T-T2
T=%T8T8'%T8T=:U	/U	/UV	/"V	BV	U&(AU+U&3AV	9<U95V	-T28T=U#U&&U61V	9V	V	Vr   )
rT   rU   rV   rW   maxDiffr  r  r  rX   rY   rZ   s   @r   r  r  5  s#     G
&3PG`b5 b5r   r  c                    \        R R.R7      sV f   \        p T sR p\        P                  ! V4       ^ RIHp \        P                  P                  pVP                  4       p\        P                  ! VP                  V4       \        P                  ! VP                  4       VP                  p\        P                  ! \        VRV4       VP                  4       Vn        \        \        R4      '       d[   \        P                  \        P                   \        P"                  4      p\        P                  ! \        P                  .VO5!   R# R# )rL   rN   )blockedNc                      R ;s sR # r   r   r   r   r   cleanupsetUpModule.<locals>.cleanup&  s    Tr   rE   r  _set_factories)r   r   r   rt  addModuleCleanuprG   rF   r  _namespace_mapr   r  r   r  setattrrp  r  r  r   )moduler  rF   r  
nsmap_copyr|  old_factoriess   &      r   setUpModuler    s     6(6'79D~ 
B g& &!!00EJellJ7ekk* ##Jg{HjI#*K r#$$))"**bee<!!""3"3DmD %r   __main__)Tr]   r   )[r   r2   r~  r_   rZ  r   r:   r{   rn  rz   r  r  rt  unittest.mockr!   r  r{  
contextlibr   r   r   r   r/   r   test.supportr   r	   r
   r   r   r   test.support.import_helperr   test.support.os_helperr   r   r   r  r<   UnicodeEncodeErrorr  rE  r/  r  r  r  r  r  r  r  r   r&   r6   r>   TestCaser@   rj   ro   rr   r   r  r  formatescaper  r  r  rO  r  r   r]  rl  rs  rw  r  r  r  r  r  r  r  r  rq  r  r  r  r  r  r  rT   mainr   r   r   <module>r     s      	   	   
       "  %  " ( C C : ) 	,}=A'" _]C 3MJ 
 "
 E% 4
L"" 
L&= =@CPh'' CPL(l9)) l9b	  	   !      F4;;~t,- 	 	'	" # X X 	 	 	 p78$$ p7lm?x   m?hB4(9(9 B4JX7_h&7&7 X7v

 

s 
S E(*;*; EP5.(++ 5.pv:h'' v:r\(h'' \(~t.h'' t.nQ:H%% Q:hE** Ed,** d,LC,X C,L7X&& 7* 5h''  5HK)) K (x   ((-`5x   `5H"EJ zMMO aP  A


?
@@As   M M/