403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.59
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/__pycache__/test_xml_etree.cpython-315.pyc
R
>lqj��c�:�]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PH s]PH$s	]PH(s
]PH,s]PH0s]PH4Gs]PH<s]PH@s]QHDGs]QHGs]QHGsGs]QHXGs]QH`Gs]QH`Gs]QH`GsGsGsGs]QH|G s ]Q	H�G"s"Pr#Pr$\Q
QQ5s%\%OMQ
2\QQQ5s)\QQQ5s*Qs+Qs,Qs-Qs.Qs/Qs0Qs1Qs2Qs3QP
-Qks4Qs5QQ\Ol2s7QvQks8Q s9Q!Q"2s:Q#Q$\Ol2s;Q%Q&\Ol2s<Q'Q(\Ol2s=-s>Q)\>Q*$Q+\>Q,$Q-\>Q.$Q/\>Q0$Q1\>Q2$Q3\>Q4$Q5\>Q6$Q7\>Q8$Q9O\O�\%P	22\>Q:$Q;\>Q<$-sAQ=\AQ>$Q?\AQ@$QA\>QB$QC\>QD$QE\>QF$QGQH\Ol2sBQIQJ\Ol2sCQKQL\:\Ol2sDQMQN\:\Ol2sEQOQP\F2sGQQQR\F2sHQSQT\F2sIQUQV\:\Ol2sJQWQX\Ol2sKQYQZ\Ol2sLQ[Q\\Ol2sMQ]Q^\Ol2sNQ_Q`\Ol2sOQaQb\Ol2sPQcQd\Ol2sQQeQf\Ol2sRQgQh\Ol2sSQiQj\Ol2sTQkQl\Ol2sUQmQn\Ol2sVQosWQpQq\Ol2sXQrQs\Ol2sYQwQtksZ\[Qu6Xc\O�2P!P!\'c\OPQ2gh9h)x�)�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.xmlzexpat224_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�X�[ePQ2g[ePQ2g[[I!)NzET must be initializedzpyET must be initialized��ET�pyET���(C:\Python315\\Lib\test\test_xml_etree.py�is_python_implementationr~s.��
�>�3�3�3�>���7�7�7��
��:�rc�b�UOo[OOUQP	UQ5!)z�Mock cls.__eq__ to check whether it has been called or not.

The behaviour of cls.__eq__ (side-effects included) is left as is.
�__eq__)�autospec�wraps)r�mock�patch�object)�cls�eqs& r�
equal_wrapperr$�s+��


���B��:�:���S�(�T���D�Dr�quietc�``�UU1QkoU!)c�J:`�UUU1Qko[OUR2U!)c�:�[ORQR-9^tt^2RU-U@PPP2P!)%fhP!9h)r%)r�check_warnings)�args�kwargs�filtersr%�tests*,���r�newtest�1checkwarnings.<locals>.decorator.<locals>.newtest�s6��� �/�/��F��F�F��d�%�f�%�G�F�F�F�s�
6�A	�A	)�	functools�update_wrapper)r-r.r,r%sf ��r�	decorator� checkwarnings.<locals>.decorator�s���	&�	� � ��$�/��rr)r%r,r2sdj r�
checkwarningsr4�s�����rc�`�UOQ[OO22!)�
)�replace�os�linesep�encode)�datas&r�convlinesepr<�s ���<�<��r�z�z�0�0�2�3�3rc�.`�\sQs]�snQsQsQsUsP!)�
ModuleTestc�,�]QHGo]QHGo]QHGoP!)r)�ElementTree��ElementInclude��ElementPath)�	xml.etreer@rBrD)�selfr@rBrDs&   r�test_sanity�ModuleTest.test_sanity�s
��	*�,�)rc�H�Qo[OU[UQQ5P!)�xml.etree.ElementTree)�not_exported)rJ�_elementtree)�
HTML_EMPTY)r�check__all__r)rF�namess& r�test_all�ModuleTest.test_all�s��9�����T�2�u�?�Krr)�__name__�
__module__�__qualname__�__firstlineno__rGrP�__static_attributes__�__classdictcell__��
__classdict__s@rr>r>�s����*�L�Lrr>c��UQ6wc[O2oL[O2o[O	U2oUO
U1QU-U@U%cUO
2!UO]2U!)�unicode�encoding)�io�BytesIO�StringIOrr@�write�getvalue�seek)�elem�	to_stringr\�options�file�trees&&&,  r�	serializerh�sc���9���z�z�|���{�{�}��
�>�>�$��D��J�J�t�2�h�2�'�2���}�}����	�	�!���rc�F�STt,tFDpOMJ	to!ttoh�N��tag)�seqrcs& r�summarize_listrn�s��!$�%���H�H��%�%��%��c�>`�\sQs]�sn\Q2sQsQsQsUs	P!)�ElementTestCasec�*�[[.UmP!rj)rr�modules�r"s&r�
setUpClass�ElementTestCase.setUpClass�s
���R�j��rc�J�[[OV#29^tt^2[OV2oPPP2[[OV$29^tt^2[O
W2oPPP2U!)%fhKS9h)%fhW!9h[Oc`o[[Q1[Q1,2o	[OQS8QS	OX328QS	OXD2802SgPo=hh9h)N�cETrzFailed to round-trip z from z to )
r�sysrs�pickle�dumps�loads�
PicklingError�dictrrr�
TestFailed�get)
rF�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��2�u�+��f�~�6�7�E��$�$�(+�(-�	�	�&�(A�(-�	�	�&�(A�&C�D�JL�
L��	L�s^�"B.�B�*B.�&B�=B.�B	�B	�B.�B+	�#B+	�%B.�+B.�.D"�D"�AD�D"c���UOU[O[O12UOU[O[O12UO	[[
U22[[
U222[V2FDvq4UOV42J	[OQQQQ2oUO	UU2UU22P!)rl�tail�text�attrib)�assertIsInstancer�Elementr�assertEqual�len�list�zip�assertEqualElements�operator�
attrgetter)rF�alice�bob�x�y�
propertiess&&&   rr��#ElementTestCase.assertEqualElements�s������e�b�j�j�$�,�,�%?�@����c�B�J�J����#=�>�����T�%�[�)�3�t�C�y�>�:���O�D�A��$�$�Q�*�$��(�(�����I�
�����E�*�J�s�O�<rr)
rRrSrTrU�classmethodrur�r�rVrWrXs@rrqrq�s&�����!��!�
�=�=rrqc�`�\sQs]�snQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Qs"Q s#Q!s$Q"s%Q#s&Q$s'Q%s(Q&s)Q's*Q(s+Q)s,Q*s-Q+s.Q,s/Q-s0Q.s1\2OfQ/Q72Q02s4Q1s5Q2s6Q3s7Q4s8Q5s9Q6s:Us;P!)8�ElementTreeTestc�>�UO[U2U2P!rj)r�rh)rFrc�expecteds&&&r�serialize_check�ElementTreeTest.serialize_check�s������4��(�3rc�f�UO[29^tt^2[OP2oPPP2UO[29^tt^2[O[O22oPPP2P!)%fhK_9h)%fhP!9h��)�assertRaises�	TypeErrorrr@�rFrgs& r�test_constructor� ElementTreeTest.test_constructor�si���
�
�y�
)�
)��>�>�"�%�D�*�
�
�
�y�
)�
)��>�>�"�.�.�"2�3�D�*�
)�*�
)��
)�
)�
)�s#�B�(B�B	�B	�B0	�(B0	c��[O2o[OQ2oUOU2UO	UO2OQ2UO	UO2U2[O2oUO[29^tt^2UOP2PPP2UO[29^tt^2UO[O22PPP2UO[29^tt^2UOP2PPP2P!)%fhK�9h)%fhK\9h)%fhP!9hrk)	rr@r��_setrootr��getrootrlr�r�)rFrg�elements&  r�test_setroot�ElementTreeTest.test_setroot�s����~�~����*�*�U�#���
�
�g���������+�+�U�3���������1��~�~���
�
�
�y�
)�
)��M�M�"��*�
�
�
�y�
)�
)��M�M�"�.�.�*�+�*�
�
�
�y�
)�
)��M�M�$��*�
)�	*�
)��
)�
)��
)�
)�
)�s6�7E�.$E&�7E9�E#	�E#	�&E6	�/E6	�9F
	�F
	c�```�UU1Qkn[OQ2oRU2[OU2oRUO22[OQQQ5o[OU2oRO	[U2Q2[OQQQ5oU1QknRUO2RUO2RUO2RUO2RUO2RUO2RUO2RUO2RUO2RUO2RUO 2RUO"2RUO$2RUO&2RUO(2U1QkoUUOQ22UUOQ22UUOQ22UUOQ22RO+[O,[O.2RO+[O0[O22P!)	c�2:�RO[OU2QQ5[U2oQFD.oRO	V2ROV!QU*Q5J0	RO
UO[2RO
UO[2UOd!RO
UO[2UOd!RO
UO[2SFDoRU2J
	P!)znot an element��msgzno %s visible by dir)rlr�r�r�)
�
assertTruer�	iselement�dir�
assertHasAttr�assertInr�rl�strr�r~r�r�)r��direlem�attrrc�
check_elementrFs&   ��rr��5ElementTreeTest.test_interface.<locals>.check_element�s�����O�O�B�L�L��1�7G�O�H��'�l�G�7���"�"�7�1��
�
�d�2�T�9��;�8�

�!�!�'�+�+�s�3��!�!�'�.�.�$�7��|�|�'��%�%�g�l�l�C�8��|�|�'��%�%�g�l�l�C�8����d�#� rrl�täg�value��keyz^<Element 't\xe4g' at 0x.*>$c�@:�ROUQQU*Q5P!)�__call__z%s not callabler�)r�)�methodrFs&�r�check_method�4ElementTreeTest.test_interface.<locals>.check_methods"������v�z�)�F�2�
�
4rc�.:�RUO2P!rj)�__next__)�itr�s&�r�
check_iter�2ElementTreeTest.test_interface.<locals>.check_iter-s�������%r�*)rr�r@r��assertRegex�repr�append�extend�insert�remove�find�iterfind�findall�findtext�clearr��set�keys�items�iter�itertextr��XML�
fromstring�PI�ProcessingInstruction)rFr�rgr�r�r�sf   @@r�test_interface�ElementTreeTest.test_interface�s����	$�"�*�*�U�#���g���~�~�g�&���d�l�l�n�%��*�*�X�7�*�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�9rc�^�[OQ2oUOUOQ2QUmUOUOQ2QUmUOUOQ2UO	UO
2QUmUOUO
Q2QUmUOUO
Q2UO	UO2QUmUOUOQ2QUmUOUOQ2UOUO-2QQQ	Q
-UmUOUOQQQ	Q
-2QQQ
Q-UmUOUOQQQ
Q-2P!)rl�Tag�TAG�Text�TEXT�Tail�TAIL�a�b�c�d�A�B�C�D)rr�r�rl�assertIsNoner�r�r�)rFr�s& r�test_set_attribute�"ElementTreeTest.test_set_attribute:sX���*�*�U�#��������e�,����������e�,����������e�,����'�,�,�'����������v�.����������v�.����'�,�,�'����������v�.����������v�.��������,��s�C��-���������#�s�C��)=�>��s�C��-���������#�s�C��)=�>rc��[OQ2oUOUQ2[OQ2oUO	U2UOUQ2UOU2UOUQ2UO
]U2UOUQ2UOU2UOU,2UOUQ2UOU2UO[U,22UOUQ2UOU2[OQQQ5oUOUQ2[OQ	2oUO	U2UOUQ
2UO
]U2UOUQ2UOU2UOUQ
2UOU2UOUQ2UO[29^tt^2UOU2PPP2UOUQ2VDU,UQ$UOU]*Q
2UOUQ*U]*U]*,2UOUQ*U]*U]*,2UQUOUQ2P!)%fhK�9h)�<body><tag/></body>�<body><tag /></body>�tag2z<body><tag /><tag2 /></body>z<body><tag2 /><tag /></body>rlr�r�z<tag key="value" />�subtagz!<tag key="value"><subtag /></tag>z+<tag key="value"><subtag /><subtag /></tag>:rrNz
<subtag />:��	N:Nr���r�rN)rr�r�r�r�r�r�r�r�r��
ValueErrorr�)rFrc�er��
subelements&    r�test_simpleops�ElementTreeTest.test_simpleopsUsO���v�v�+�,�����T�#9�:��J�J�v������A�����T�#A�B����A�����T�#9�:����A�q�����T�#A�B����A�����Q�C�����T�#A�B����A�����D�!��I�����T�#A�B����A���*�*�U��*�0�����W�&;�<��Z�Z��)�
����z�"����W�&I�J����q�*�%����W�=�	?����z�"����W�&I�J����z�"����W�&;�<�
�
�
�z�
*�
*��N�N�:�&�+����W�&;�<�"�
�;�������W�Q�Z��6���������
�G�A�J�'?�@����������W�Q�Z�(@�A��C�L����W�=�	?�+�
*�s�K	�	K	�K	c��UO[29^tt^2[OQQ5PPP2[OQQQ-QQ5oUO	UO
Q2UO	UO
Q2Q2UO	UO
Q2Q2P!)%fhK�9h)�failrkrr��foo�bar)r�rlrl)r�r�rr�r�rlr��rFrs& r�test_positional_only_parameter�.ElementTreeTest.test_positional_only_parameter�s����
�
�y�
)�
)��J�J�6�J�"�*�
�J�J�s�H�e�#4�%�J�@���������$�������x��%�0�������u��u�-�*�
)�s�B8�8C	�C	c���UO[OQ2Q2UO[OQ2Q2UO[OQ2Q2P!)z<tag>hello</tag>z)<tag>&#104;&#101;&#108;&#108;&#111;</tag>z<tag><![CDATA[hello]]></tag>)r�rr��rFs&r�
test_cdata�ElementTreeTest.test_cdata�s[��	
���R�V�V�$6�7�"�	$����R�V�V�$O�P�"�	$����R�V�V�$B�C�"�	$rc��[O[OQ22o[OUQ5oUO
UOQ2OQ2UO
UOQ2OQ2[O[Q5oUO
UOQ2OQ2UO
UOQ2OQ2P!)r)rfrl�section/tagr�zelement/../empty-element�
empty-element)
r]r^�
SAMPLE_XMLr:rr@r�r�rl�SIMPLE_XMLFILE)rF�
stringfilergs&  r�test_file_init�ElementTreeTest.test_file_init�s����Z�Z�
� 1� 1�'� :�;�
��~�~�:�~�.��������5�)�-�-�u�5�������=�1�5�5�u�=��~�~�>�~�2��������9�-�1�1�9�=�������#=�>�B�B��	!rc��]QHGo[O[2oUO
O
2[]
2FD7o[OU2OQ[U2*2J9	[UO
2o[]
2FD7o[OU2OQ[U2*2J9	UO[UO
2U2[]2FD7o[OU2OQ[U2*2J9	UO[UO
2U2[Q2FD7o[OU2OQ[U2*2J9	UO[UO
2Q2P!)rrCz./�X��)rErDrr�r�_cacher��ranger@r�r�r�r��
assertGreater�
assertLess)rFrDrc�i�cache_len_10s&    r�test_path_cache�ElementTreeTest.test_path_cache�s*��	*��v�v�j�!����� � �"��r��A�B�N�N�4�0�5�5�d�3�q�6�k�B���;�-�-�.���r��A�B�N�N�4�0�5�5�d�3�q�6�k�B������[�/�/�0�,�?��r��A�B�N�N�4�0�5�5�d�3�q�6�k�B�����3�{�1�1�2�L�A��s��A�R�^�^�D�1�6�6�t�C��F�{�C������K�.�.�/��5rc��]PHo[OQ2oUOU2oUOU2oQUO	Q2mUO
UQ2UO
UQ2UO
UQ2P!)rz<tag>hello<foo/></tag>r
r	z<tag>hello<bar /></tag>z<tag>hello<foo /></tag>)�copyrr��deepcopyr�rlr�)rFr&�e1�e2�e3s&    r�	test_copy�ElementTreeTest.test_copy�st��	�
�V�V�,�
-��
�Y�Y�r�]��
�]�]�2�
��"����������R�!:�;����R�!:�;����R�!:�;rc�H�[OQ2oUOQ2UOUOQQ2Q2UO	QQ2UOUOQ2Q2[OQQQ5oUOUOQ2Q2UOUO
QQ-2QQ-o[OQU2oUO
2UOUOQ2Q2UOUO
QQ-2QQ-o[OQ-U@oUO
2UOUOQ2Q2UOUO
QQ-2[OQQQ-QQ5oUOUOQ2Q2UOUO
QQ-2[OQ2oQUmUO	QQ	2UO	Q
Q2UO[OU2Q2UO[UO22QQ
,2UO[UO22QQ,2UOUO
Q
*Q2Q
UO
Q
$QUO
Q$UO[OU2Q2[OQ2oUO	QQ2UO	QQ2UO	QQ2UO	QQ2UO[OU2Q2P!)rlr��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;  " />rk)r1r2)r3r4)rr�r�r�r�r�r�r��tostring�sortedr�r�)rFrcr�s&  r�test_attrib�ElementTreeTest.test_attrib�s����z�z�%� �������������%��3�Y�?������ �������%��'�2��z�z�%�W�z�-��������%��'�2�������u�g�&6�7���!���z�z�%��(������������%��'�2�������u�g�&6�7���!���z�z�*�6�*������������%��'�2�������u�g�&6�7��z�z�%�%��!1�w�z�?��������%��'�2�������u�g�&6�7��z�z�&�!����	�����)�$�����'�"�������T�*�@�	B������	�	��,�w��.@�A������
�
��-�%�'9�:�	<�������W�-�w�7�&����G��&����G��������T�*�N�	P��z�z�&�!������d������f������i� �����&�'�������T�*�n�	prc� �[OQ2oUO[29^tt^2[O	UQQ5PPP2UO[29^tt^2[O	UQQ5PPP2[O	UQQQ-Q5oUOUO
Q2Q2[O	UQQ	Q
-QQQ
5oUOUOQ2UOUO
Q	2Q
2UOUO
Q2Q2UOUO
Q2Q2P!)%fhCK&9h)%fhK�9h)�parentr)r>rlrk�sub1r�r��r��sub2r�r	r
�baz)r�rlr>rl)rr�r�r��
SubElementr�r�rl)rFr>r?rAs&   r�)test_subelement_positional_only_parameter�9ElementTreeTest.test_subelement_positional_only_parameter�s'�����H�%���
�
�y�
)�
)��M�M��V�M�4�*�
�
�
�y�
)�
)��M�M�&�f�M�-�*��}�}�V�V�U�G�4D�}�E��������%��'�2��}�}�V�V�X�u�4E�!&�u��6��������6�*�������(�+�U�3�������%��%�0�������(�+�U�3�*�
)�
)��
)�
)�s#�E)�1E=�)E:	�2E:	�=F
	�F
	c�$�[OQ2oQQ-oUOQU2oUOUOUQQ5UOU2UO
UQ2UO2UO
UQ2UOU2UO
UQ2UOV3,2UO
UQ2U,UQ	$UO
UQ2[U,2UQ	$UO
UQ2P!)
rlr�r�r�zattrib aliasingr�z!<tag><subtag key="value" /></tag>�<tag />zM<tag><subtag key="value" /><subtag key="value" /><subtag key="value" /></tag>�NNN)
rr��makeelement�assertIsNotr�r�r�r�r��tuple)rFrcr��subelems&   r�test_makeelement� ElementTreeTest.test_makeelement
s����z�z�%� ����!���"�"�8�V�4���������5F��G����G�����T�#F�G��
�
�����T�9�-����G�����T�#F�G����W�&�'����T�[�	]��)��Q�����T�#F�G���	�"��Q�����T�#F�Grc��[O[2o[O2oUOUQQ5UO
UO2Q2[O[2o[O2oUOUQQ5UO
UO2Q2[[29^tt^2oUO2oPPP2[O2oUOUOQ2UOW2UOUO!2Q2[O#2o[OUQ5oUOU2UOUO!2Q2P!)%fhK�9h)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>z^Expat ��target)r�parserr]r_r`r�ra�SIMPLE_NS_XMLFILE�open�read�	XMLParserr��version�feedr��close�TreeBuilder)rFrg�stream�fr;�parserrRs&      r�test_parsefile�ElementTreeTest.test_parsefile sF���x�x��'��������
�
�6�I�
�.�������*��	��x�x�)�*��������
�
�6�I�
�.�������*��	��.�
!�
!�Q��6�6�8�D�"�������������4����D�����V�\�\�^��	����!�����V��,�����D�����V�\�\�^��	�!"�
!�s�F2�2G	�;G	c�6�[OQ2oUO[OUQQ5Q2[O	Q2oUO[OUQQ5Q2,Q	No[OU2oUO[OU2Q2UOQO
[OU22Q2UO[OUQ2Q2[OQ2vq4UO[U2]2[OQ2vq4UO[U2]2UOUQ*OQ2P!)
�<html><body>text</body></html>r[rP�<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>�body)z<html><body>ztext</boz
dy></html>)rr�r�r9r��fromstringlist�join�tostringlist�XMLIDr�rl)rFr��sequence�_�idss&    r�test_parseliteral�!ElementTreeTest.test_parseliteralMs:���&�&�9�:��������W�y��A�0�	2��-�-� @�A��������W�y��A�0�	2�=���#�#�H�-��������W�-�1�	3�������"�/�/�'�":�;�1�	3�������W�g�6�2�	3����:�;�������S��1�%����D�E�������S��1�%�����V����&�1rc��[OQ2oQUmUOUQ2Q[O	UQ2mUOUQ2PUmUOUQ2UO
][OQ22UOUQ2[OQ	Q
2U]$UOUQ2P!)rlr�z<tag>text</tag>�subtextr�z'<tag>text<subtag>subtext</subtag></tag>ztext<subtag>subtext</subtag>�commentz*text<!--comment--><subtag>subtext</subtag>r�r�z)text<?key value?><subtag>subtext</subtag>)	rr�r�r�rCrlr��Commentr��rFrcs& r�test_writefile�ElementTreeTest.test_writefilecs����z�z�%� ����	����T�#4�5�-6��
�
�d�H�%�*����T�#L�M�������T�#A�B����A�r�z�z�)�,�-����T�<�	>��%�%��w�'��Q�����T�#N�Orc�X�[[29^tt^2oUO2oPPP2QQ[2oU2o[OUQ5oUO
W2UOU,QN2[[29^tt^2oUO2oPPP2QQ[2oU2o[OUQ5oUO
U2UOU,QN2P!)%fhK�9h)%fhKv9h)Nc�4`�\sQsQsnQsQsQsQsUsP!)�4ElementTreeTest.test_custom_builder.<locals>.Builder�yc�.�UOQU12P!��start�r��rFrlr�s&&&rr|�:ElementTreeTest.test_custom_builder.<locals>.Builder.startz������W�c�N�+rc�.�UOQU12P!��endr}�rFrls&&rr��8ElementTreeTest.test_custom_builder.<locals>.Builder.end|������U�C�L�)rc��P!rjr�rFr�s&&rr;�9ElementTreeTest.test_custom_builder.<locals>.Builder.data~���rr)	rRrSrTrUr|r�r;rVrWrXs@r�Builderrxys����
,�
*�
�
rr�rQc�L`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sUsP!)
rx�c�.�UOQU12P!r{r}r~s&&&rr|r�r�rc�.�UOQU12P!r�r}r�s&&rr�r��r�rc��P!rjrr�s&&rr;r��r�rc�.�UOQV12P!��pir})rFrRr;s&&&rr��7ElementTreeTest.test_custom_builder.<locals>.Builder.pi�s�����T�6�0�1rc�.�UOQU12P!�rqr})rFr;s&&rrq�<ElementTreeTest.test_custom_builder.<locals>.Builder.comment�s�����Y��-�.rc�.�UOQV12P!��start-nsr})rF�prefix�uris&&&r�start_ns�=ElementTreeTest.test_custom_builder.<locals>.Builder.start_ns�s�����Z��5�6rc�.�UOQU12P!��end-nsr}�rFr�s&&r�end_ns�;ElementTreeTest.test_custom_builder.<locals>.Builder.end_ns�������X�v�.�/rr)
rRrSrTrUr|r�r;r�rqr�r�rVrWrXs@rr�rx�s-����
,�
*�
�
2�
/�
7�
0�
0r��r|�root�r|r��r�r�r�r�)r|r�r�r�r�r�))r�r�r;)rq�	 comment )r�r��	namespace�r|�{namespace}root�r|�{namespace}element�r�r�r�r��r|�{namespace}empty-element�r�r��r�r��r�r�)	rUrrVr�rrWrYr�rT)rFr]r;r��builderr^s&     r�test_custom_builder�#ElementTreeTest.test_custom_builderts����.�
!�
!�Q��6�6�8�D�"�	�d�	��)�����W��-�����D������	#�		��#�
$�
$���6�6�8�D�%�	0�d�	0��)�����W��-�����D������
#�
	�W"�
!��.%�
$�s#�D�D�D	�D	�D)	�"D)	c���QQ[2oU2o[OUQ5oUO[O
Q22UO
U,QN2P!)c�(`�\sQsQsnQsQsUsP!)�@ElementTreeTest.test_custom_builder_only_end_ns.<locals>.Builder�c�.�UOQU12P!r�r}r�s&&rr��GElementTreeTest.test_custom_builder_only_end_ns.<locals>.Builder.end_ns�r�rr)rRrSrTrUr�rVrWrXs@rr�r��s����
0�
0rr�rQa            <?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>
            ))r�r�)r��pr�)r�rrWrY�textwrap�dedentr�)rFr�r�r^s&   r�test_custom_builder_only_end_ns�/ElementTreeTest.test_custom_builder_only_end_ns�sZ��	0�d�	0��)�����W��-�����H�O�O�%��	�	
����#�	rc��[OPQ5oUOUO[O2[O2oUOUO[O2P!)NrQ)rrWr�rRr[)rFr^�parser2s&  r�%test_initialize_parser_without_target�5ElementTreeTest.test_initialize_parser_without_target�sO�����T��*�����f�m�m�R�^�^�<��,�,�.�����g�n�n�b�n�n�=rc	��[[Q29^tt^2o[OU2oPPP2SO	WO2O
2Tt,tFDo[U2MJ	to,QN,,,,2SO	UO
2Tt,tFDo[U2MJ	to,QN,,,,2[O[2oUO	[[U22]2UO	[[U]*22]2UO	UQ*[U22U]*oU]*oUQUO	[[U22]2UO	VC]*2UO	VS]*2VT,UQ$UO	VS]*2UO	VC]*2UOVC]*2UO2UO	[U2,2P!)%fhCK
9httohttoh)�rbrHr�rrN)r�r�r)rUrrrSr�r�r�rnr�rr�r��assertNotEqualr�)rFr]rgrc�child1�child2s&     r�
test_children�ElementTreeTest.test_children�s����.�$�
'�
'�1��8�8�A�;�D�(����&*�l�l�n�&9�&9�&;�=�&;�d�)��.�&;�=�7����	?�	�	
���&*�i�i�k�3�&1�d�)��.�&1�3�7����	5�	��v�v�j�!������T�$�Z��!�,�����T�$�q�'�]�+�Q�/�����a��$�t�*�-��a����a�����I�����T�$�Z��!�,�����a��)�����a��)��$��S�	�����a��)�����a��)����F��G�,��
�
������d��R�(�A(�
'�
'��=��3s�H4�"I�"I
�4I	�=I	c���[OQ2oUO[OU2Q2[O	Q2oUO[OU2Q2P!)rbrc)rr�r�r9r�rss& r�test_writestring� ElementTreeTest.test_writestring�sT���v�v�6�7��������T�*�,M�N��}�}�=�>��������T�*�,M�Nrc��[OQ2o[OU2UO[O	U2Q2[OQ2o[OU2UO[O	U2Q2[OQ2o[OU2UO[O	U2Q2[OQ2o[OU2UO[O	U2Q2[OQ2o[OU2UO[O	U2Q2[OQ	2o[OU2UO[O	U2Q
2P!)z
<root></root>s<root />rbs"<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>�rr��indentr�r9rss& r�test_indent�ElementTreeTest.test_indent�sD���v�v�o�&��
�	�	�$��������T�*�K�8��v�v�6�7��
�	�	�$��������T�*�,S�T��v�v�9�:��
�	�	�$��������T�*�,S�T��v�v�:�;��
�	�	�$��������T�*�,U�V��v�v�W�X��
�	�	�$������K�K���
�	
��v�v�P�Q��
�	�	�$������K�K���
�	
rc�L�[OQ2o[OUQQ5UO[O	U2Q2[OQ2o[OUPQ5UO[O	U2Q2P!)r��	)�spacesD<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�rss& r�test_indent_space�!ElementTreeTest.test_indent_space's����v�v�P�Q��
�	�	�$�d�	�#�����K�K���
�	
��v�v�P�Q��
�	�	�$�b�	�!�����K�K���
�	
rc�p�[OQ2o[OU2SOUO	2Tt.tFDp"O
jJ	to.Ql2SOUO	2Tt.tFDp"OjJ	to.Ql2SO[UO	2Tt.tFDp"O
jJ	to2[UO	2Tt.tFDo[UO
2jJ	to22P!ttohttohttohttoh)z@<html><body><p>par</p><p>text</p><p><br/></p><p /></body></html>>N�
�
  �
    >N�parr�r�r��
      )	rr�r�r�r�r�r�r��id)rFrc�els&  r�test_indent_space_caching�)ElementTreeTest.test_indent_space_caching@s����v�v�X�Y��
�	�	�$�����#�y�y�{�+�{��W�W�{�+�*�	
�	
���#�y�y�{�+�{��W�W�{�+�?�	
�	
����4�9�9�;�/�;�R���;�/�0��t�y�y�{�3�{���B�G�G��{�3�4�	
��
,��
,��0��3s�D$�D)�D.�7 D3c�8�[OQ2oUO[29^tt^2[O	UPQ5PPP2UO[O
U2Q2[O	U]Q5UO[O
U2Q2[OQ2o[O	U]QQ5UO[O
U2Q2P!)%fhK�9h)r�)�levels9<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>)rr�r�rr�r�r9rss& r�test_indent_level�!ElementTreeTest.test_indent_levelPs����v�v�P�Q��
�
�
�z�
*�
*��I�I�d�"�I�%�+�����K�K���H�	
�
	�	�	�$�a�	� �����K�K���
�	
��v�v�P�Q��
�	�	�$�a�s�	�+�����K�K���
�	
�)+�
*�s�D	�	D	�D	c���[OQ2oUO[OUQQ5Q2UO[OUQQQ5Q2P!��0<body xmlns="http://effbot.org/ns"><tag/></body>r[rPzA<ns0:body xmlns:ns0="http://effbot.org/ns"><ns0:tag /></ns0:body>�http://effbot.org/ns�r\�default_namespacez1<body xmlns="http://effbot.org/ns"><tag /></body>�rr�r�r9rss& r�test_tostring_default_namespace�/ElementTreeTest.test_tostring_default_namespacepsX���v�v�H�I������K�K��y�K�1�O�	
�	
����K�K��y�DZ�K�[�?�	
rc��[OQ2oUO[OUQQQ5Q2P!)r�r[�foobarr�zP<ns1:body xmlns="foobar" xmlns:ns1="http://effbot.org/ns"><ns1:tag /></ns1:body>r�rss& r�3test_tostring_default_namespace_different_namespace�CElementTreeTest.test_tostring_default_namespace_different_namespace{s4���v�v�H�I������K�K��y�H�K�M�^�	
rc���[OQ2oQoUO[U29^tt^2[O	UQQQ5PPP2P!)%fhP!9h)r�z>^cannot use non-qualified names with default_namespace option$r[r�r�)rr��assertRaisesRegexrr9)rFrc�EXPECTED_MSGs&  r�5test_tostring_default_namespace_original_no_namespace�EElementTreeTest.test_tostring_default_namespace_original_no_namespace�sJ���v�v�+�,��W��
�
#�
#�J��
=�
=��K�K��y�H�K�M�>�
=�
=�
=�s�A�A+	�#A+	c��[OQ2oUO[OUQQ5Q2P!)r�r[rPr�r�rss& r� test_tostring_no_xml_declaration�0ElementTreeTest.test_tostring_no_xml_declaration�s2���v�v�+�,������K�K��y�K�1�"�	
rc��[OQ2oUO[OUQP	Q5Q2P!)r��utf8�r\�xml_declarations:<?xml version='1.0' encoding='utf8'?>
<body><tag /></body>r�rss& r�test_tostring_xml_declaration�-ElementTreeTest.test_tostring_xml_declaration�s4���v�v�+�,������K�K��v�t�K�D�J�	
rc��[OQ2oUO[OUQP	Q5Q2P!)r�r[r�;<?xml version='1.0' encoding='utf-8'?>
<body><tag /></body>r�rss& r�.test_tostring_xml_declaration_unicode_encoding�>ElementTreeTest.test_tostring_xml_declaration_unicode_encoding�s4���v�v�+�,������K�K��y�$�K�G�J�	
rc��[OQ2o,QNoSFDVvq4oUOQUQU029^tt^2UO[O	UUUQ5U2PPP2JX	P!)%fhJm9h)�<body><tag>ø</tag></body>z	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)rr[N)rNF)rrF)rrF)s<body><tag>�</tag></body>rF)rr[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>rT)sH<?xml version='1.0' encoding='US-ASCII'?>
<body><tag>&#248;</tag></body>rT)rrT)uA<?xml version='1.0' encoding='utf-8'?>
<body><tag>ø</tag></body>r[T)rr��subTestr�r9)rFrc�	TESTCASES�expected_retvalr\rs&     r�#test_tostring_xml_declaration_cases�3ElementTreeTest.test_tostring_xml_declaration_cases�s����v�v�2�3��
�	�<;D�6�O�����	�(��41�1@�0A�C�D�D�� � ��K�K��!)�(7� ��
$�
�D�D�;D�D�D�D�s�)A:	�:B
�B
c
��[OQ2oUOPO[O	UQQ52Q2UOPO[O	UQQQ52Q2P!r�)rr�r�rgrhrss& r�#test_tostringlist_default_namespace�3ElementTreeTest.test_tostringlist_default_namespace�sj���v�v�H�I������G�G�B�O�O�D�9�O�=�>�O�	
�	
����G�G�B�O�O�D�9�Pf�O�g�h�?�	
rc	���[OQ2oUOPO[O	UQQ52Q2UOQO[O	UP	Q52Q2[O	UQP	Q5oUOPOU2Q2UOU]*Q	2UO,QNUQ
*2P!)r�r[rPr�r)rs><?xml version='1.0' encoding='us-ascii'?>
<body><tag /></body>rrz%^<\?xml version='1.0' encoding='.+'?>:r�NN)z<body�>z<tagz />z</body>)rr�r�rgrhr�)rFrc�
stringlists&  r�!test_tostringlist_xml_declaration�1ElementTreeTest.test_tostringlist_xml_declaration�s����v�v�+�,������G�G�B�O�O�D�9�O�=�>�"�	
�	
����H�H�R�_�_�T�4�_�@�A�N�	
�
�_�_�T�I�t�_�T�
�����G�G�J��J�	
�	
����A��(P�Q����A�:�b�>�Rrc�V``�QNU1QkkoUQQ2UQQ2UQQ2UQQ2UQ	Q
2UQQ2QNQ
knQNU1Qkko,QMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQ MQ	MQ!MQ"MQ#MQ$MQ%MQ&MQ'MQ(MQ)MQ*MQ+MQ,MQ-MQ.MQ/MQ0MQ1MQ2MQ3MQ4MQ5MQ6MQ7MQ8MQ9MQ:MQ;MQ<MQ=MQ>MQ?MQ@MQMQAMQBMQCMQDMQEMQFMoSFD�oROUQG59^tt^2RO[O[O	UU222QH2QIOUQJ2O
U2]*oRO[O[O	UVE222QK[U2*O22PPP2J�	,QONoSFDQoROUQG59^tt^2RO[[OUU22PPP2JS	,QPNoSFD[oROUQG59^tt^2RO[O[OUU22PPP2J]	RO[[ORQL2OQ22RO[[ORQM2OQ22P!)%fhCJ69h)%fhCJX9h)%fhCJ9h)Qr�c�:�QU8QU8Q0oRO[OUOU22OU2RO[OU2OU2P!�z<?xml version='1.0' encoding='z'?><xml>z</xml>)r�rr�r:r�)r\re�xmlrFs&& �r�check�,ElementTreeTest.test_encoding.<locals>.check�sU����d�$�C����R�V�V�C�J�J�x�$8�9�>�>��E����R�V�V�C�[�-�-�t�4rrdr��us-ascii�
iso-8859-1�½ziso-8859-15u€�cp437u√z	mac-romanu˚c��QU8QU8Q0!r&r)r\res&&rr'�*ElementTreeTest.test_encoding.<locals>.xml�s��IQ�SW�X�Xrc�4:�RV2OU2!rj)r:)r\rer's&&�r�bxml�+ElementTreeTest.test_encoding.<locals>.bxml�s����x�&�-�-�h�7�7rr�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-greekzmac-icelandz
mac-latin2zmac-turkishzkoi8-rzkoi8-tzkoi8-u�kz1048�ptcp154rPs<xml />u
éπяא،€�ignorez<xml>&#%d;</xml>�	undefined�xxxr�)�big5�	big5hkscs�cp932�cp949�cp950zeuc-jpzeuc-jis-2004zeuc-jisx0213zeuc-kr�gb2312�gbk�gb18030z
iso2022-kr�johabz	shift-jiszshift-jis-2004zshift-jisx0213zutf-7)
�cp037�cp424�cp500�cp864�cp875�cp1026�cp1140�utf_32�	utf_32_be�	utf_32_le)rr�rr9r�r:�decode�ordr�r�
ParseError�LookupError)	rFr(r1�supported_encodingsr\r��&unsupported_ascii_compatible_encodings�(unsupported_ascii_incompatible_encodingsr's	f       @r�
test_encoding�ElementTreeTest.test_encoding�sG���	5�
	�g�s��
�j�#��
�l�F�#�
�m�X�&�
�g�x� �
�k�8�$�	Y�	8�

��

��

�)�

�+5�

��

�$�

�&1�

�3>�

�@K�

�
�

�%�

�'2�

�4?�

�AM�

�
�	

�'�	

�)5�	

�7C�	

�

�

�
�

�
&�

�
(/�

�
18�

�
:A�

�
�


��


�&�


�(/�


�18�


�:A�


�CJ�


�
�

��

�&�

�(/�

�18�

�:B�

�DL�

�
�

��

�!)�

�+3�

�5=�

�?G�

�
�

��

�!)�

�
�

�(�

�*7�

�9E�

�
�

�'�

�
�

��

�!)�

�+3�

�5>�

��,�H����x��0�0�� � ����R�V�V�D��N�-C�!D�j�Q�+�2�2�8�X�F�M�M�h�W�XY�Z��� � ����R�V�V�D��4E�-F�!G�"4�s�1�v�"=�!E�!E�!G�I�1�0�,�2
�.�?�H����x��0�0��!�!�*�b�f�f�d�8�n�E�1�0�?�4
�0�A�H����x��0�0��!�!�"�-�-�����h��H�1�0�A�	
���*�b�f�f�c�+�.>�.E�.E�g�.N�O����+�r�v�v�s�5�z�/@�/@��/I�J�91�0�0�� 1�0�0��1�0�0�s7�%CK,	�,L	�46L	�,K>
�5K>
�L
�
L
�L(
�L(
c�^�[OQ2oQUmUO[	U2Q2UO[	UPQ5Q2UO[	UQQ5Q2UO[	UQQ5Q2UO[	UQQ5Q2P!)	z-<html><link/><script>1 &lt; 2</script></html>r�z/<html><link /><script>1 &lt; 2</script></html>
�r�r'�htmlz*<html><link><script>1 < 2</script></html>
r�z1 < 2
)rr�r�r�rhrs& r�test_methods�ElementTreeTest.test_methods%s���
�F�F�B�C���������1��B�	D�����1�T�2�B�	D�����1�U�3�B�	D�����1�V�4�=�	?�����1�V�4�i�@rc��[OQ2oUO[U2Q2UO[UQQ5Q2P!)z(<html><CamelCase>text</CamelCase></html>rurt�rr�r�rhrs& r�test_issue18347�ElementTreeTest.test_issue183474sB���F�F�=�>������1��:�	<�����1�V�4�:�	<rc�F�[OQ2oUO[UQQ5Q2UO	UQ2UO[O29^tt^2o[OQ2PPP2UO[WO2Q2UO[O29^tt^2o[O[2PPP2UO[UO2Q2[O2oQUOQ	$UO[2UO2oUO	UQ
2UO[O29^tt^2o[O[2PPP2UO[UO2Q2P!)%fhCKn9h)%fhCK9h)%fhK_9h)z*<document title='&#x8230;'>test</document>r*rPs*<document title="&#33328;">test</document>u%<document title="舰">test</document>z<document>&entity;</document>z#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)rr�r�rhr�r�rlr��	exception�
ENTITY_XMLrWr}rYrZ�EXTERNAL_ENTITY_XML)rFr�cmr^r�s&    r�test_entity�ElementTreeTest.test_entity;sx��

�F�F�?�@������1�z�:�=�	?����Q� J�K��
�
�r�}�}�
-�
-���F�F�2�3�.�����R�\�\�*�5�	7��
�
�r�}�}�
-�
-���F�F�:��.�����R�\�\�*�>�	@�
�����"(��
�
�h�����J���|�|�~�����T�#>�?��
�
�r�}�}�
-�
-���F�F�&�'�.�����R�\�\�*�>�	@�-.�
-�
-��
.�
-�
-��.�
-�s6�-G(�G<�H�(G9	�1G9	�<H
	�H
	�H 	�H 	c��[OQ2oUOUQ2[OQ2oUOUQ2[OQ2oUOUQ2[OQ2oUOUQ2[O[2oUOUQ2P!)	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>)rr�r��
SAMPLE_XML_NSrss& r�test_namespace�ElementTreeTest.test_namespace`s���
�v�v�-�.�����T�#:�;��v�v�[�\�����T�Q�	S��v�v�O�P�����T�E�	G��v�v�_�`�����T�S�	U��v�v�m�$�����T�
�	rc���[OQ2oUOUQ2[O[OQ22oUOUQ2[O[OQQ22oUOUQ2[O[OQQ22o[O	U[OQQ22o[O	U[OQQ22oUOUQ2UO2QUOQ$UOUQ	2UO2QUO[OQ2$UOUQ	2UO2Q
UOQ$UOUQ2UO2[OQ
2UOQ$UOUQ2UO2[OQ2o[OQ
2UOQ$UOU2UOU2UOUQ2UO[[OQQ22Q2UO[[OQ22Q2[OQQ2o[OQQ2oUOV42[OQQ2oUOV42UOUQ2UOUQ2P!)z{uri}tagz<ns0:tag xmlns:ns0="uri" />r�rl�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-tagzns:tag)rr�r��QNamerCr�r�r�r�r�r�)rFrcrL�q1�q2s&    r�
test_qname�ElementTreeTest.test_qname�s���
�z�z�*�%�����T�#@�A��z�z�"�(�(�:�.�/�����T�#@�A��z�z�"�(�(�5�%�0�1�����T�#@�A��z�z�"�(�(�5�%�0�1���-�-��b�h�h�u�f�&=�>���-�-��b�h�h�u�f�&=�>�����T�I�	K�
	
�
�
��")����J�����T�9�	;�	
�
�
��,3����B�H�H�Z�(�)����T�9�	;�	
�
�
��".����J�����T�>�	@�	
�
�
��"$�(�(�<�"8����J�����T�=�	?�	
�
�
���*�*�U�#��&(�h�h�}�&=����{�#����G�����G�����T�
�	�	
����R�X�X�d�E�2�3�Y�?�����R�X�X�i�0�1�9�=�
�X�X�d�E�
"��
�X�X�d�E�
"������ �
�X�X�d�K�
(�����B�#����B��)�����Y�'rc�2�[OQ2oP!)z�<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>text</html>)rr�rss& r�test_doctype_public�#ElementTreeTest.test_doctype_public�s���v�v�$�%�rc�``�]QHGnQ.UU1QkkoUQQ,2UQQQ,2UQQQ	,2UQ
QQ,2UQ,Q/N2UQ
,Q0N2UQ,Q1N2UQ,Q2N2UQ,Q3N2UQQQ,2UQ,Q4N2UQQ,2UQ,Q5N2UQQ,2UQ,Q6N2UQ,Q7N2UQ,Q8N2UQQQ,2UQQ,2UQ,Q9N2UQ,Q:N2UQQ,2UQ Q ,2UQ!Q!,2UQ"Q",2UQ#,Q;N2UQ$,Q<NQ&Q'-2UQ(Q%,PQ'-2UQ)QQ%,Q&Q'-2UQ*QQ(,PQ'-2UQ+QQ,,PQ'-2UQQQ,PQ'Q-Q'-2P!)=rrCc	�:�ROROV2TTt,tFDvq4S9%fSMJ	tooU2P!ttoohrj)r��xpath_tokenizer)r�r��
namespaces�oprlrDrFs&&&  ��rr(�3ElementTreeTest.test_xpath_tokenizer.<locals>.check�sL������-8�-H�-H��-W�Y�-W�'�"�!�i�i�C�i�-W�Y�%�
'��Ys
�A
�A
r�ztext()r��()z@name�@r�z@*zpara[1]�parazpara[last()]z*/paraz/doc/chapter[5]/section[2]z
chapter//para�//z//paraz//olist/item�.z.//para�..z../@langzchapter[title]z#employee[@secretary and @assistant]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�rj)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�zspam.egg)r�r�r�)r�r�r�)r�r�r�)rErD)rFr(rDsf @r�test_xpath_tokenizer�$ElementTreeTest.test_xpath_tokenizer�s���)�	'�	'�	�c�C�5��
�h����'�
�g��V�}�%�
�d�S�#�J��
�i�0�1�
�n�>�?�
�h�*�+�
�*�.�	/�	�o�8�9�
�h��v��'�
�n�:�;�
�c�C�5��
�i�,�-�
�d�T�F��
�j�2�3�
�� >�?�
�3�6K�	L�	�k�C��,�-�
� �#5�"6�7�
�l�2�3�
�#�%D�E�	�g��y�!�
�e�e�W��
�h��
�#�
�f�v�h��
�k�0�1�	�l�P��8�9�	;�
�f�?�@��5�6�	8�
�k�C�!I�J��8�9�	;�
�g��V�}��5�6�	8�
�j�3�	�*��5�6�	8�
�k�C��,��5��7�9�	:rc��[OQ2oUO[OU2Q2UO[OUQQ5Q2UO[OUQQ5Q2P!)z<spam> & hams<!--<spam> & ham-->rurtr�r)rrrr�r9)rF�comms& r�test_comment_serialization�*ElementTreeTest.test_comment_serializationse���z�z�.�)��������T�*�,B�C�������T�&��9�;Q�R�������T�&��9�3�?rc���UO[O[OQQ22Q2UO[O[O	QQ22Q2UO[O[O	QQ22Q2UO[O[O	QQ2Q2Q2[O	QQ2oUO[OU2Q	2UO[OUQ
Q5Q	2UO[OUQQ5Q
2P!)r-�instructions<?test instruction?>z
<testing&>s<?test <testing&>?>u<testing&>ãzlatin-1s=<?xml version='1.0' encoding='latin-1'?>
<?test <testing&>�?>zham & eggs < spams<?test ham & eggs < spam?>rurtr�r)r�rr9r�r�)rFr�s& r�(test_processinginstruction_serialization�8ElementTreeTest.test_processinginstruction_serializations��	
������R�%=�%=�f�m�%T�U�'�	)�������R�U�U�6�=�%A�B�'�	)�
	
������R�U�U�6�<�%@�A�&�	(�������R�U�U�6�3C�%D�i�P�+�	,��U�U�6�.�
/��������R��*G�H�������R���7�9V�W�������R���7��=rc���[OQQP-Q5oUO[[OU2UO[O	UQQ5Q2P!)rlr�r@rurts<tag attr></tag>)rr�r�r�r9r�rss& r�"test_empty_attribute_serialization�2ElementTreeTest.test_empty_attribute_serialization!sL���z�z�%����z�7�����)�R�[�[�$�7�������T�&��9�;N�Orrlc���UO2o[OU2oQUmUO	[OUQQ5QU8QU8Q0O
22P!)�
<spam>&hamrurt�<z
><spam>&ham</r )r�rr�r�r�r9r:)rFrlrcs&& r�#test_html_cdata_elems_serialization�3ElementTreeTest.test_html_cdata_elems_serialization'sR���i�i�k���z�z�#��� ��	�������T�&��9�36��<�D�D�F�	Hrc
�D�QFD�oVO21FD~oQU*o[[OQU*2QQ5oUO	VC2[[OQU8QU8Q02QQ5oUO	VC2J�	J�	P!)	�AREAz<%s>z<%s />rurtr�z></r )r��BASE�BASEFONT�BR�COL�EMBED�FRAME�HR�IMG�INPUT�ISINDEX�LINK�META�PARAM�SOURCE�TRACK�WBR)�lowerrhrr�r�)rFr�rcr��
serializeds&    r�#test_html_empty_elems_serialization�3ElementTreeTest.test_html_empty_elems_serialization0s~��2�G�!�-�-�/�2��!�D�=��&�r�v�v�h��o�'>�v�N�
�� � ��6�&�r�v�v�T�$�.G�'H�.4�6�
�� � ��6�
3�2rc��[OQ2oQUmUO[O	UQQ5Q2P!)�	PlainTextr�rurts<PlainText><spam>&ham)rr�r�r�r9rss& r�!test_html_plaintext_serialization�1ElementTreeTest.test_html_plaintext_serialization>s9���z�z�+�&�� ��	�������T�&��9�1�	3rc��[OQQQQ5o[O29^tt^2o[O	U2PPP2UOWO
2Q2P!)%fhK29h)�
cirriculum�public�example��status�companyz1<cirriculum status="public" company="example" />
)rr�r�captured_stdout�dumpr�ra)rFr�stdouts&  r�test_dump_attribute_order�)ElementTreeTest.test_dump_attribute_orderFs[���J�J�|�H�i�J�H��
�
$�
$�
&�
&�&��G�G�A�J�'�������*�M�	O�'�
&�s�A7�7B	�B	c��[OQQQQ5oUO[U2Q2UO[UQQ5Q2P!)r�r�r�r�z0<cirriculum status="public" company="example" />rurtz;<cirriculum status="public" company="example"></cirriculum>)rr�r�rh�rFr�s& r�test_tree_write_attribute_order�/ElementTreeTest.test_tree_write_attribute_orderNsI���z�z�,�x��z�K������4��K�	M�����4��7�M�	Orc��[O[2oUOU]*OQQ-2P!)rz*{http://www.w3.org/XML/1998/namespace}lang�eng)rr��ATTLIST_XMLr�r�r�s& r�test_attlist_default�$ElementTreeTest.test_attlist_defaultVs1���}�}�[�)������a����F��N�	Prr)�script�style�xmp�iframe�noembed�noframes)<rRrSrTrUr�r�r�r�r�rrrrr#r+r;rDrMr_rmrtr�r�r�r�r�r�r�r�r�r�r�rrr	r
rrr"rqrvrzr�r�r�r�r�r�r�r�r�subTestsr�r�r�r�r�r�rVrWrXs@rr�r��sL����4�4� �&@:�D?�6)?�V.�$�	!�6� 
<�4p�l4�,H�,+�Z2�,P�";�z�,>�#)�JO�*
�X
�2
� 
�@	
�
�N�
�
�
�*�X	
�S�&<K�|
A�<�#@�J�B?(�B%�8:�t@�>�*P�
���e�X�Y�H�Z�H�7�3�O�O�P�Prr�c�p`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsUsP!)�
IterparseTesti]c	��[OoU[2oUOUO2[U2vq4UOUO2UO
V4O1Q2SO
STTt,tFDvq4V4O1MJ	too,QN2UO
UOOQ2UO2U[2oSO
STTt,tFDvq4V4O1MJ	too,QN2UO2P!ttoohttooh)r�r�r��r�r�r�)r�r�r�r�)
r�	iterparserr�r��nextr�rlrZrT)rFrr��actionrcs&    r�
test_basic�IterparseTest.test_basic`s����L�L�	�
�~�
&�����"�'�'�"��B�x������"�'�'�"����&�(�(�+�-?�@�����D����6�8�8�,��D�G�	�
	
��������f�-�
���
�
�(�
)������D����6�8�8�,��D�G�	�	���
��E��Es�
D:
�E
c��[[Q29^tt^2o[OU2o[	U2vq4UOV4O1Q2SOSTTt,tFDvq4V4O1MJ	too,QN2UOUOOQ2PPP2P!ttooh)%fhP!9h)r�r�r�r)rUrrrrr�rlr�)rF�sourcer�rrcs&    r�test_external_file� IterparseTest.test_external_fileys���
�.�$�
'�
'�6����f�%�B���8�L�F����f�h�h�/�1C�D����R�H�R�\�V�v�x�x�0�R�H�K�
�

���R�W�W�[�[�&�1�(�
'��I�	(�
'�
'�s$�AC�)B>�1C�>C�C	�
C	c	�8�[OoQoU[U2oSOSTTt,tFDvqEVEO1MJ	too,2UO2QoU[UQ5oSOSTTt,tFDvqEVEO1MJ	too,2UO2QoU[U2oSOSTTt,tFDvqEVEO1MJ	too,QN2UO2P!ttoohttoohttooh)��eventsr�r|r�r�)rrrr�rlrZ)rFrrr�rrcs&     r�test_events�IterparseTest.test_events�s����L�L�	���
�~�v�
.������D����6�8�8�,��D�b�I�
���
���
�~�f�
5������D����6�8�8�,��D�b�I�
���
�!��
�~�v�
.������D����6�8�8�,��D�	G�		�	���
��)E��
E��
Es�D

�D
�D
c	��[OoQoU[U2oSOSTTt,tFDvqEUQ7cVEO1LVE1MJ	too,QN2UO2QoU[OQ2U2oSTTt,tFDvqEUMJ		oooUOUQQ,2UO2P!ttoohttooh)r|r�r�s<root xmlns=''/>)r|r�r�r�r)
�r�)r�r�r�r�r�r�r�r�r�r��r�N�r�r�)rrrTr�rlrZr]r^)rFrrr�rrc�ress&      r�test_namespace_events�#IterparseTest.test_namespace_events�s����L�L�	�7��
�(�&�
1�����.0�2�.0�l�f�17�:J�0J�6�8�8�,�39�.�A�.0�2�4�
	�	���
�'��
�r�z�z�"6�7��
@��*,�-�"�,�&�v�"��-�����z�8�4�5�
���
��)2��$.s�C

�C

�Cc	��[OoQo[[Q29^tt^2oUO	[
29^tt^2oUV22PPP2UO
UO2PPP2UO[WO2Q2[OU29^tt^2UO	[
29^tt^2oU[U2PPP2UO[UO2Q2=[2PPP2P!)%fhK�9h)%fhK�9h)%fhKp9h)%fhP!9h)r|r��unknown event 'bogus'�r|r��bogus)rrrUrr�r�assertFalse�closedr�r�r~r�check_no_resource_warningr
)rFrrr]r�s&    r�test_unknown_events�!IterparseTest.test_unknown_events�s����L�L�	�*��
�.�$�
'�
'�1��"�"�:�.�.�"��!�$�/����Q�X�X�&�(�	
����R�\�\�*�,C�D�
�
6�
6�t�
<�
<��"�"�:�.�.�"��.�&�1�/����S����.�0G�H���L�=�
<�/�.��(�
'��/�.��=�
<�
<�s_�E�
	D/	�#E�E(�E	�-8E(�/D?
�8D?
�:E�E	�E	�E%
�E%
� E(�(E9	�1E9	c	���[OQ2oQo[OV2oSO	STTt,tFDvqEVE1MJ
	tooQQ,2P!ttooh)s�<?xml version='1.0' encoding='iso-8859-1'?>
<body xmlns='http://&#233;ffbot.org/ns'
      xmlns:cl�='http://effbot.org/ns'>text</body>
r�)r�)r�uhttp://éffbot.org/ns)r�)uclér�)r]r^rrr�)rFr
rr�rrcs&     r�
test_non_utf8�IterparseTest.test_non_utf8�s^�����
G�H����
�\�\�&�
)�����R�@�R�\�V�6�.�R�@�=�@�C�	��@s�A
c��[OQ2o[OU2o[	U2vq4UOV4O1Q2UO[O29^tt^2o[	U2PPP2UO[WO2Q2P!)%fhK79h)�<document />junk�.junk after document element: line 1, column 12�r��document)r]r^rrrr�rlr�rlr�r~)rFr
r�rrcr�s&     r�test_parsing_error� IterparseTest.test_parsing_error�s������/�0��
�\�\�&�
!���B�x������&�(�(�+�-@�A�
�
�
�r�}�}�
-�
-����H�.�����R�\�\�*�@�	B�.�
-�s�>B9�9C		�C		c��UO[29^tt^2[OQ2PPP2P!)%fhP!9h)�nonexistent)r��FileNotFoundErrorrrrs&r�test_nonexistent_file�#IterparseTest.test_nonexistent_file�s/��
�
�
�0�
1�
1��L�L��'�2�
1�
1�
1�s�?�A	�A	c���[O[2o[OU29^tt^2UO2=[
2PPP2[O[2oUO[29^tt^2o=[
2PPP2UOQ[WO22UO[[2[UO22UOUO[2[O[2o[OU29^tt^2[!U2vq4UO2UOV4O"1Q2==[
2PPP2[O[2oUO[29^tt^2o[!U2vq4UOV4O"1Q2==[
2PPP2UOQ[UO22UO[[2[UO22UOUO[2P!)%fhCKF9h)%fhCK9h)%fhCK'9h)%fhK�9h)N�unclosed iterparse iteratorr�)rrrrr rZr
�assertWarns�ResourceWarningr�r��warningr�r��filename�__file__rrl)rFr��wmrrcs&    r�$test_resource_warnings_not_exhausted�2IterparseTest.test_resource_warnings_not_exhausted�s����\�\�.�
)��
�
6�
6�t�
<�
<��H�H�J���L�=�
�\�\�.�
)��
�
�
�o�
.�
.�"���L�/�	
�
�
�3�S����_�E��
�
�d�>�*�C��
�
�O�<�������h�/�
�\�\�.�
)��
�
6�
6�t�
<�
<���8�L�F��H�H�J����f�h�h�/�1C�D��D��L�=��\�\�.�
)��
�
�
�o�
.�
.�"���8�L�F����f�h�h�/�1C�D��D��L�	/�
	
�
�
�3�S����_�E��
�
�d�>�*�C��
�
�O�<�������h�/�==�
<�
<��/�
.�
.��=�
<�
<��/�
.�sH�J�J&�AJ:�7K�J#	�J#	�&J7	�/J7	�:K	�K	�K	�K	c	���UO[O[2[	[Q29^tt^2oUOQ2PPP2[O[2o[U2vq4UOV4O1Q2[OU29^tt^2UO[O29^tt^2o[U2PPP2UO[WO 2Q2UO#2==[%2PPP2[O[2o[U2vq4UOV4O1Q2UO'[(29^tt^2oUO[O29^tt^2o[U2PPP2UO[WO 2Q2==[%2PPP2UO+Q[WO,22UO+[/[2[UO,22UOUO0[22P!)%fhCKE9h)%fhCK�9h)%fhCK�9h)%fhK�9h)%fhK�9h)�wbr'r(r3r))�
addCleanupr�unlinkrrUr`rrrr�rlrr r�rlr�r~rZr
r4r5r�r6r�r7r8)rFr]r�rrcr�r9s&      r�'test_resource_warnings_failed_iteration�5IterparseTest.test_resource_warnings_failed_iteration
s������	�(�(�&�1�
�&�$�
�
�1�
�G�G�'�(� ��\�\�&�
!���B�x������&�(�(�+�-@�A�
�
6�
6�t�
<�
<��"�"�2�=�=�1�1�R��R��2����S����.�D�
F��H�H�J��B��L�=��\�\�&�
!���B�x������&�(�(�+�-@�A�
�
�
�o�
.�
.�"��"�"�2�=�=�1�1�R��R��2����S����.�D�
F��B��L�
/�	
�
�
�3�S����_�E��
�
�d�6�l�C��
�
�O�4�������h�/�7 �
�
��2�1�1��=�
<�
<��2�1��/�
.�sr�J�9(J4�!J 	�-A	J4�(K�K	�9K�J	�J	� J1
�)J1
�+	J4�4K	�=K	�K
�K
�K�K+	�$K+	c��[O[2o[OU29^tt^2[U2UO
2=[2PPP2[O[2oUO[29^tt^2o[U2=[2PPP2UOQ[WO22UO[[2[UO22UOUO[ 2P!)%fhK�9h)%fhK�9h)Nr3)rrrrr r�rZr
r4r5r�r�r6r�r�r7r8)rFr�r9s&  r� test_resource_warnings_exhausted�.IterparseTest.test_resource_warnings_exhausted)s���
�\�\�.�
)��
�
6�
6�t�
<�
<���H��H�H�J���L�	=��\�\�.�
)��
�
�
�o�
.�
.�"���H���L�/�	
�
�
�3�S����_�E��
�
�d�>�*�C��
�
�O�<�������h�/�=�
<��/�
.�s#�'D6�E	�6E	�?E	�	E	�E	c	��[OoU[2oUO2UO	[
29^tt^2[
U2PPP2UO2[[Q29^tt^2oUU2oUO2UOUO2UO	[
29^tt^2[
U2PPP2UO2PPP2U[2o[
U2vqEUOVEO1Q2UO2UO	[
29^tt^2[
U2PPP2UO2[[Q29^tt^2oUU2o[
U2vqEUOVEO1Q2UO2UOUO2UO	[
29^tt^2[
U2PPP2UO2PPP2P!)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK9h)%fhKz9h)%fhP!9h)Nr�r�)rrrrZr��
StopIterationrrUrrr�rl)rFrr�r
rrcs&     r�test_close_not_exhausted�&IterparseTest.test_close_not_exhausted:s����L�L�	�
�~�
&��
���
�
�
�
�}�
-�
-���H�.�
���
�
�.�$�
'�
'�6��6�"�B��H�H�J����V�]�]�+��"�"�=�1�1��R��2��H�H�J�
(��~�
&���B�x������&�(�(�+�-?�@�
���
�
�
�
�}�
-�
-���H�.�
���
�
�.�$�
'�
'�6��6�"�B���8�L�F����f�h�h�/�1C�D��H�H�J����V�]�]�+��"�"�=�1�1��R��2��H�H�J�(�
'�).�
-�
-��2�1�1��	(�
'�
'��.�
-�
-��2�1��
(�
'�
'�s��I�AI4�I 	�$I4�'J�#A;J/�J	�*J/�I	�I	� I1
�)I1
�+	I4�4J	�=J	�J	�J	�J,
�%J,
�'J/�/K	�8K	c	��[OoU[2o[U2UO	2UO[29^tt^2[U2PPP2UO	2[[Q29^tt^2oUU2o[U2UO	2UOUO2UO[29^tt^2[U2PPP2UO	2PPP2P!)%fhK�9h)%fhK=9h)%fhP!9h)Nr�)rrrr�rZr�rFrrUrr)rFrr�r
s&   r�test_close_exhausted�"IterparseTest.test_close_exhausted]s����L�L�	�
�~�
&���R��
���
�
�
�
�}�
-�
-���H�.�
���
�
�.�$�
'�
'�6��6�"�B���H��H�H�J����V�]�]�+��"�"�=�1�1��R��2��H�H�J�(�
'�	.�
-��2�1��(�
'�
'�sC�D�AE�.D/	�:E�D,	�%D,	�/D?
�8D?
�:E�E	�E	r)rRrSrTrUrrrrr!r$r+r0r:r@rCrGrJrVrWrXs@rrr]sN�����2
2��6�6�"
�B�(�"0�H0�>0�"!�F�rrc�`�\sQsQsnQQksQQksQQksQQksQQksQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQs\O.\O2Q6Q\O2Q02Q2sQsQsUsP!)�XMLPullParserTestipc���UeUOU2L7[][U2U2FDoUOV%VS*2J	U%cUO2P!P!rj)rYrr��flush)rFr^r;�
chunk_sizerOr!s&&&&& r�_feed�XMLPullParserTest._feedrsO�����K�K����1�c�$�i��4�����D�1�<�0�1�5���L�L�N�rc
��SO[UO2U2TTt,tFDvqEVEOUO11MJ 	tooU2P!ttoohrj)r�r�read_eventsrlr�)rFr^r��
max_events�eventrcs&&&&  r�
assert_events�XMLPullParserTest.assert_events{sX����� &�v�'9�'9�';�Z� H�
J� H����h�h��	�	�*�
+� H�
J��	��
Js�&A
c�n�UO[[UO2U22U2P!rj)r�r�rrT)rFr^r�rUs&&&&r�assert_event_tuples�%XMLPullParserTest.assert_event_tuples�s+��������*�*�,�j�9�:��	rc	��[UO2U2oSOSTTt,tFDvqVVVO1MJ	tooU2P!ttoohrj)rrTr�rl)rFr^r�rUrrrcs&&&&   r�assert_event_tags�#XMLPullParserTest.assert_event_tags�sE����*�*�,�j�9������H����6�8�8�,��H�!�	#��Hs�A
c�2�[O2oUOU,2UOUQV2UOU,2UOUQV2UOU,2UOUQV2UOUQ,2UOUQV2UOUQV2UOUQQ,2UOUQV2UOUQ,2UO	UO22P!)	�<!-- comment -->
z+<root>
  <element key='value'>text</element�>
�<element>text</element>tail
�<empty-element/>
�</root>
r�r�r��r�
XMLPullParserr]rQr�rZ)rFrPrOr^s&&& r�test_simple_xml�!XMLPullParserTest.test_simple_xml�s���!�!�#�����v�r�*��
�
�6�/��C����v�r�*��
�
�6�A��	&�	
���v�r�*��
�
�6�5�*�4����v�(:�';�<��
�
�6�:�J�N��
�
�6�/��C����v��$�(�	�	
�
�
�6�;�
�:����v��'8�9����&�,�,�.�)rc�.�UO]P	Q5P!)r��rPrO�rgrs&r�test_simple_xml_chunk_1�)XMLPullParserTest.test_simple_xml_chunk_1����������6rc�.�UO]P	Q5P!)�rjrkrs&r�test_simple_xml_chunk_5�)XMLPullParserTest.test_simple_xml_chunk_5�rnrc�,�UO]Q5P!)�)rPrkrs&r�test_simple_xml_chunk_22�*XMLPullParserTest.test_simple_xml_chunk_22�s�������+rc���[O2oUO2oUOUQ2[	U2vq4UOV4O1Q2UOUQ2[	U2vq4UOV4O1Q2UO[29^tt^2[	U2PPP2P!)%fhP!9h)z-<root>
  <element key='value'>text</element>
rdr�r�)	rrfrTrQrr�rlr�rF)rFr^r�rrcs&    r�test_feed_while_iterating�+XMLPullParserTest.test_feed_while_iterating�s����!�!�#��
�
�
�
!���
�
�6�L�M��B�x������&�(�(�+�-?�@��
�
�6�;�'��B�x������&�(�(�+�_�=�
�
�
�}�
-�
-���H�.�
-�
-�
-�s�;C�C"	�C"	c�n�[O2oUOU,2UOUQ2UOU,2UOUQ2UOU,2UOUQ2UOU,2UOUQ2UOUQ,2UOUQ2UOUQ2UOUQQ,2UOUQ2UOUQ	,2UO	UO22P!)
r`�<root xmlns='namespace'>
�"<element key='value'>text</elementrarbrcrdr�r�r�re�rFr^s& r�test_simple_xml_with_ns�)XMLPullParserTest.test_simple_xml_with_ns�s���!�!�#�����v�r�*��
�
�6�/�0����v�r�*��
�
�6�7�8����v�r�*��
�
�6�?�@����v�r�*��
�
�6�5�!����v�(E�'F�G��
�
�6�:�;��
�
�6�/�0����v�)�/�(�	�	
�
�
�6�;�'����v�(B�'C�D����&�,�,�.�)rc��[OQ	Q5oUOUQ2UOUQ2UO[	UO22Q
,2UOUQ2UOUQ2UOUQ2UOUQ2UOUQ2UO[	UO22Q,2UO
UO22P!)r�rr`r{r|rarbrcrdrrr)rrfrQr�r�rTr�rZr}s& r�test_ns_events� XMLPullParserTest.test_ns_events�s����!�!�)?�!�@���
�
�6�/�0��
�
�6�7�8������#�#�%�&�
,�-�	/�	
�
�
�6�?�@��
�
�6�5�!��
�
�6�:�;��
�
�6�/�0��
�
�6�;�'�����f�0�0�2�3�6F�5G�H����&�,�,�.�)rc�d�[OQQ5oUOUQ2UOUQQ,]Q5UO	UQ	,]Q5UOUQ2UO	UQ
Q,2UOUQ2UO2UO	UQ,2P!)
r�r� <tag xmlns='abc' xmlns:p='xyz'>
�rU�
<child />
�</tag>
)r�r|r��r�)r��abc�r�)r��xyz�r|�{abc}tag�r|�
{abc}child�r�r��r�r��rrfrQrZr]rZr}s& r�test_ns_events_start�&XMLPullParserTest.test_ns_events_start�s����!�!�)E�!�F���
�
�6�>�?�� � ��%�&�*
��	!�	�	
���v�!�(
��	�	�	
�
�
�6�=�)����v�#�!�(
�	�
	
�
�
�6�:�&��������v��(
�	rc��[OQQ5oUOUQ2UOUQQ,]Q5UO	UQ	,]Q5UOUQ2UO	UQ
Q,2UOUQ2UO2UO	UQ,]Q5UOUQ
Q
,2P!)r�rr�r�r�r�)r�r|r�r�r�r�r�r�r�r�rr�r}s& r�test_ns_events_start_end�*XMLPullParserTest.test_ns_events_start_end�s����!�!�)O�!�P���
�
�6�>�?�� � ��%�&�*
��	!�	�	
���v�!�(
��	�	�	
�
�
�6�=�)����v�#�!�(
�	�
	
�
�
�6�:�&��������v��(
��	�	�	
� � ����*
�	rc���[OQ	Q5oUOUQ2UOU,2[OQ
Q5oUOUQ2UO	U,2[OQ
Q5oUOUQ2UOUQ,2UOUQ2UOUQ,2UOUQ2UOUQ
,2UOUQ2UOU,QN2UOUQ2UOUO
22UOUQ,2[OQQ5oUOUQ2UOU,2UOUQ2UOUQ,2UOUQ2UOUQ,2UOUQ2UOU,2UOUQ2UOUQQ,2UOUQ2UOUO
22P!)rz<root/>
�<!-- text here -->
z<root>
r|raz8<element xmlns='foo'>text<empty-element/></element>tail
z</root>r`rrr�r�r��r|�{foo}element�r|�{foo}empty-element)r�r�)r�r�)r�r�r�r{)rrfrQr]rWr�rZr}s& rr�XMLPullParserTest.test_eventss%���!�!��!�,���
�
�6�;�'����v�r�*��!�!�)9�!�:���
�
�6�1�2����6�2�&��!�!�)9�!�:���
�
�6�:�&����v�(9�':�;��
�
�6�?�@����v�(<�'=�>��
�
�6�5�!����v�(:�';�<��
�
�6�N�	P����v�(�	�	
�
�
�6�9�%����&�,�,�.�)����v��'8�9��!�!��!�4���
�
�6�/�0����v�r�*��
�
�6�:�&����v�(9�':�;��
�
�6�?�@����v�(<�'=�>��
�
�6�5�!����v�r�*��
�
�6�N�	P����v�%�+�(�	�	
�
�
�6�9�%����&�,�,�.�)rc��[OQ
Q5oUOUQ2UOUQ[OQ11,2UOUQ2UOUQ[OQ11,2UOUQ2UOUQ,2UOUQ2UOUQ[OQ	11,2UOUQ
2UOUQ,2UOUQ2UOUQ[OQ11,2[OQQ5oUOUQ2UOUQ[OQ11,2P!)r|rqrr�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 )r|rqr�)r|�root-tag)r�r�r�)rrfrQrWrrr]r}s& r�test_events_comment�%XMLPullParserTest.test_events_comment9sa���!�!�)D�!�E���
�
�6�1�2����6�Y����]�0K�$L�#M�N��
�
�6�6�7����6�Y����=O�0P�$Q�#R�S��
�
�6�+�,����v�(=�'>�?��
�
�6�4�5����6�Y����=M�0N�$O�#P�Q��
�
�6�?�+����v�(;�'<�=��
�
�6�5�6����6�Y����=N�0O�$P�#Q�R��!�!��!�6���
�
�6�1�2����6�Y����]�0K�$L�#M�Nrc�<�[OQQ5oUOUQ2UOUQ[OQ11,2[OQQ5oUOUQ2UOUQ[OQ11,2P!)	r|r�rz
<?pitarget?>
�pitargetz<?pitarget some text ?>
zpitarget some text )r|r�r�r�)rrfrQrWr�r}s& r�test_events_pi� XMLPullParserTest.test_events_piLs����!�!�)?�!�@���
�
�6�+�,����6�T�B�E�E�:�+>�$?�#@�A��!�!��!�1���
�
�6�6�7����6�T�B�E�E�3H�+I�$J�#K�Lrc��QQ.o[OUQ5oUOUQ2UOUQQ,2QQ2o[OU2Q5oUOUQ2UOUQQ,2P!)r�r|rz<foo>bar</foo>c�4`�\sQsQsnQsQsQsQsUsP!)�9XMLPullParserTest.test_events_sequence.<locals>.DummyIteri[c�,�[,QN2UmP!)r|)r|r�r�)r�rrs&r�__init__�BXMLPullParserTest.test_events_sequence.<locals>.DummyIter.__init__\s��"�#?�@��rc��U!rjrrs&r�__iter__�BXMLPullParserTest.test_events_sequence.<locals>.DummyIter.__iter__^s���rc�.�[UO2!rj)rrrs&rr��BXMLPullParserTest.test_events_sequence.<locals>.DummyIter.__next__`s���D�K�K�(�(rr)	rRrSrTrUr�r�r�rVrWrXs@r�	DummyIterr�[s����
A�
�
)�
)rr�)r|r	)r�r	)rrfrQr])rF�eventsetr^r�s&   r�test_events_sequence�&XMLPullParserTest.test_events_sequenceTs����7�#���!�!��!�2���
�
�6�+�,����v�(8�.�'I�J�	)�	)��!�!���!�5���
�
�6�+�,����v�(8�.�'I�Jrc�T�UO[29^tt^2[OQQ5PPP2UO	[Q29^tt^2[OQQ2Q5PPP2P!)%fhKU9h)%fhP!9h)r|rrc3�L�SF �DpO2w�	J	P!3hrj)rj)�.0r�s& r�	<genexpr>�7XMLPullParserTest.test_unknown_event.<locals>.<genexpr>ks��9U���9U�A�X�X�Z�Z�9U�s�$r)sstartsendsbogus)r�rrrfr�rs&r�test_unknown_event�$XMLPullParserTest.test_unknown_eventgsr��
�
�
�z�
*�
*����$=��>�+�
�
#�
#�J�0G�
H�
H����$V�9U�$V��W�I�
H�+�
*��
H�
H�
H�s#�B�B�B	�B	�B'	�B'	zExpat z" does not support reparse deferralc�@�[OQQ5oQFDoUOU2J	UOU,2[[Ic4UOUOOO22UO2UOUQ,2[[Ic4UOUOOO22UOQ2UO2UOUQ,2P!)r|r�</doc>r�z<docr �r|r��r�r�)
rrfrYr]rr��_parser�GetReparseDeferralEnabledrOrZ�rFr^�chunks&  r�#test_flush_reparse_deferral_enabled�5XMLPullParserTest.test_flush_reparse_deferral_enabledms����!�!�)9�!�:��"�E��K�K���#�	
���v�r�*�
��:��O�O�F�N�N�2�2�L�L�N�O��������v�(8�'9�:�
��:��O�O�F�N�N�2�2�L�L�N�O����H���������v��'7�8rc���[OQQ5oQFDoUOU2J	[OQ6�cW[[
IfUO
Q2UOOOP
2UOU,2[[
Ic4UOUOOO22UO2UOUQ,2[[
Ic4UOUOOO22UOQ2UO2UOUQ,2P!)	r|rzDXMLParser.(Get|Set)ReparseDeferralEnabled methods not available in Cr�rr��r�rr�r�)rrfrY�pyexpat�version_infor�skipTestr��SetReparseDeferralEnabledr]rr�rOrZr�s&  r�$test_flush_reparse_deferral_disabled�6XMLPullParserTest.test_flush_reparse_deferral_disabled�s���!�!�)9�!�:��"�E��K�K���#����9�,���:��
�
�!;�<��N�N�"�"�<�<�U�C��"�"�6�2�.�
��:����V�^�^�3�3�M�M�O�P��������v�(8�'9�:�
��:����V�^�^�3�3�M�M�O�P����H���������v��'7�8rr)NFrjr�)rRrSrTrUrQrWrZr]rgrlrqrurxr~r�r�r�rr�r�r�r��unittest�skipIfr�r�r�r�rVrWrXs@rrMrMps��������
#�
*�*7�7�,�
�*�*
*��.�6,*�\O�&M�K�&X��_�_�W�)�)�I�5��g�2�2�3�40�0�1�9�1�9�*9�9rrMz�<?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>
zdisclaimer.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>
zdata.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>
zRecursive2.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>
zRecursive3.xmlc�T`�\sQsQsnQ
QksQQksQsQsQsQs	Qs
Q	sUsP!)�XIncludeTesti$c��[U*oUQ6Xc[O	U2oU![c
[Q2gh9h)�resource not foundr')�XINCLUDE�KeyError�OSErrorrr�)rF�hrefrSr\r;s&&&& r�xinclude_loader�XIncludeTest.xinclude_loader&sH��	0��D�>�D��E�>��6�6�$�<�D����	�	0��.�/�/�	0�s�
.�	A�
Ac��P!rjr)rFr�r^r\s&&&&r�none_loader�XIncludeTest.none_loader/s��rc���UQ6XcC[UQ29^tt^2o[OU2O2ttPPP2!P!)%fhP!9h)r'r�)rUrrSr�)rFr�rSr]s&&& r�
_my_loader�XIncludeTest._my_loader2sG���E�>��d�D�!�!�Q��x�x��{�*�*�,�"�!��"�!�!�s�#A
�
A	�A	c��]QHGoUOQ2oUOV O2UO[
U2Q2P!)rrAr�z�<document>
  <p>Example.</p>
  <root>
   <element key="value">text</element>
   <element>text</element>tail
   <empty-element />
</root>
</document>)rErBr��includer�r�rh)rFrBr�s&  r�test_xinclude_default�"XIncludeTest.test_xinclude_default;s@��,��"�"�=�1�����s�O�O�4�����3��
�	rc��]QHGoUOQ2oUOV O2UO	[U2Q2UOQ2oUOV O2UO	[U2Q2UOQ2oUOV O2UO	[U2Q2UOQ2oUOV O2UO	[U2Q	2UOQ
2oUO
[29^tt^2oUOV O2PPP2UO	[WO2Q2UO	[U2Q2P!)%fhKR9h)
rrAr�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>r�zO<document>
  <p>This document has been accessed
  324387 times.</p>
</document>r�zX<document>
  <p>This document has been <em>accessed</em>
  324387 times.</p>
</document>r�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�r�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>)
rErBr�r�r�rhr�r�r�r~�rFrBr*r�s&   r�
test_xinclude�XIncludeTest.test_xincludeIs���,��'�'��1�����x�)=�)=�>�����8�,�
�	��'�'��1�����x�)=�)=�>�����8�,�
�	��'�'�	�2�����x�)=�)=�>�����8�,�
�	��'�'��1�����x�)=�)=�>�����8�,�
�	��'�'��1��
�
�
�w�
'�
'�2��"�"�8�-A�-A�B�(�����R�\�\�*�,@�A�����8�,�
�		�(�
'�s�F8�8G	�G	c��]QHGoUOQ2oUOV O2UO	]	[UO
Q222P!)rrAr�z.//p)rErBr�r�r�r�r�)rFrBr*s&  r�test_xinclude_repeated�#XIncludeTest.test_xinclude_repeated�sJ��,��'�'�(A�B�����x�)=�)=�>������H�$4�$4�V�$<� =�>rc��]QHGo[O[Q*2oUOUO29^tt^2oUOV OQ5PPP2UO[WO2Q2[O[Q*2oUOUO29^tt^2oUOV OQ5PPP2UO[UO2Q2[O[Q*2oUOUO29^tt^2oUOV OQ5PPP2UO[UO2Q2[O[Q	*2oUOUO29^tt^2oUOV OQ5PPP2UO[UO2Q
2UOQ2oUOUO29^tt^2oUOV O2PPP2UO[UO2Q2UOQ2oUOUO29^tt^2oUOV OPQ
5PPP2UO[UO2Q2UOQ2oUOUO29^tt^2oUOV O]Q
5PPP2UO[UO2Q2UOQ2oUOUO29^tt^2oUOV O]Q
5PPP2UO[UO2Q2UOQ2oUOUO29^tt^2oUOV O]Q
5PPP2UO[UO2Q2UOQ2oUOUO29^tt^2oUOV O]Q
5PPP2UO[UO2Q2P!)%fhCK�9h)%fhCK^9h)%fhCK�9h)%fhCKl9h)%fhCK9h)%fhCK�9h)%fhCK-9h)%fhCK�9h)%fhCKW9h)%fhK�9h)rrAr�)r�z%cannot load 'disclaimer.xml' as 'xml'r�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)rErBrr�r�r��FatalIncludeErrorr�r�r�r�r~�XINCLUDE_BADr��LimitedRecursiveIncludeErrorr�s&   r�test_xinclude_failures�#XIncludeTest.test_xinclude_failures�s���,��6�6�(�8�,�-��
�
�
�~�?�?�
@�
@�B��"�"�8�4D�4D�"�E�A�����R�\�\�*�7�	9��6�6�(�8�,�-��
�
�
�~�?�?�
@�
@�B��"�"�8�4D�4D�"�E�A�����R�\�\�*�3�	5��6�6�,�x�0�1��
�
�
�~�?�?�
@�
@�B��"�"�8�4D�4D�"�E�A�����R�\�\�*�C�	E��6�6�,�x�0�1��
�
�
�~�?�?�
@�
@�B��"�"�8�4D�4D�"�E�A�����R�\�\�*�@�	A�
�'�'�(8�9��
�
�
�~�?�?�
@�
@�B��"�"�8�-A�-A�B�A�����R�\�\�*�5�	7��'�'�(8�9��
�
�
�~�?�?�
@�
@�B��"�"�8�-A�-A�T�"�R�A�����R�\�\�*�5�	7��'�'�(8�9��
�
�
�~�J�J�
K�
K�r��"�"�8�-A�-A�Q�"�O�L�����R�\�\�*�S�	U��'�'�(8�9��
�
�
�~�J�J�
K�
K�r��"�"�8�-A�-A�Q�"�O�L�����R�\�\�*�S�	U��'�'�(8�9��
�
�
�~�J�J�
K�
K�r��"�"�8�-A�-A�Q�"�O�L�����R�\�\�*�S�	U��'�'�(8�9��
�
�
�~�?�?�
@�
@�B��"�"�8�-A�-A�Q�"�O�A�����R�\�\�*�5�	7�}A�
@�
@��A�
@�
@��A�
@�
@��A�
@�
@��A�
@�
@��A�
@�
@��L�
K�
K��L�
K�
K��L�
K�
K��A�
@�s��T6�U
�%U�2U2�0V�-V�,V.�+W�*W�)W*�6U	�?U	�
U	�U	�U/	�'U/	�2V	�;V	�V	�V	�V+	�#V+	�.V?	�7V?	�W	�W	�W'	�W'	�*W:	�3W:	r)r'Nrj)
rRrSrTrUr�r�r�r�r�r�r�rVrWrXs@rr�r�$s0��������>�@?�D7�D7rr�c�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
s\
O\O 2Q2Q2sQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Qs"Qs#Qs$Q s%Us&P!)!�BugsTesti�c�`�U1Qko[O]{2oUU2[OQ2o]{UmUU2[OQ2o]{UmUU2[OQ2oUO	]{Q2UU2[OQ2oUO	Q]{2UU2P!)c��:�RO[29^tt^2o[U2PPP2RO[	WO
2Q2P!)%fhK79h)Nzcannot serialize 123 (type int))r�r�rhr�r�r~)rcr�rFs& �rr(�-BugsTest.test_bug_xmltoolkit21.<locals>.check�sG����"�"�9�-�-���$��.����S����.�5�
7�.�-�s�A�A+	�$A+	rc�123)rr�r�r�r�)rFr(rcsf  r�test_bug_xmltoolkit21�BugsTest.test_bug_xmltoolkit21�s����	7��z�z�#���
�d���z�z�&�!����	�
�d���z�z�&�!����	�
�d���z�z�&�!������e��
�d���z�z�&�!��������
�d�rc���[O[2o[OU2oUO	UOQ2Q2UO	UOQ2Q2P!)rlr�rrp)rr�rr@r�r�)rFrcrgs&  r�test_bug_xmltoolkit25�BugsTest.test_bug_xmltoolkit25�sR���v�v�j�!���~�~�d�#��������u�-�v�6�������}�5�y�Arc���[OQ2oUO[UO	Q22,2UO[UO	Q22Q,2P!)�"<doc><table><tbody/></table></doc>z.//theadz.//tbody�tbody)rr�r�rnr�r�s& r�test_bug_xmltoolkit28�BugsTest.test_bug_xmltoolkit28	sQ���v�v�:�;���������Z�(@�A�2�F��������Z�(@�A�G�9�Mrc��[OQ2o[O29^tt^2o[O	U2UOUO
2Q2PPP2P!)%fhP!9h)rz$<doc><table><tbody /></table></doc>
)rr�rr�r�r�ra)rFrgr�s&  r�test_bug_xmltoolkitX1�BugsTest.test_bug_xmltoolkitX1	sV���v�v�:�;��
�
$�
$�
&�
&�&��G�G�D�M����V�_�_�.�0W�X�'�
&�
&�
&�s�6A4�4B	�=B	c��[OQ2oUO[OUQ2Q2[OQ2oUOUOQQ-2UO[OUQ2Q2[OQ2oUO[OUQ2Q2[OQ	2oUO[OUQ2Q2[OQ
2oUO
QQ2UO[OUQ2Q2P!)s2<?xml version='1.0' encoding='iso-8859-1'?><t�g />rs<täg />sD<?xml version='1.0' encoding='iso-8859-1'?><tag �ttr='v&#228;lue' />uättruvälues<tag ättr="välue" />s:<?xml version='1.0' encoding='iso-8859-1'?><t�g>text</t�g>s<täg>text</täg>r�rl)rr�r�r9r�r�r�r�s& r�test_bug_xmltoolkit39�BugsTest.test_bug_xmltoolkit39	s���v�v�N�O��������T�7�3�5F�G��v�v�6�7��������y�*�&=�>�������T�7�3�5�	7��v�v�/�0��������T�7�3�0�	2��z�z�*�%��������T�7�3�5F�G��z�z�%� ������l�+�������T�7�3�5�	7rc��[OQ2oUO[UQQ5Q2UO[U2Q2P!)z=<!DOCTYPE doc [<!ENTITY ldots '&#x8230;'>]><doc>&ldots;</doc>r*rPs<doc>&#33328;</doc>u<doc>舰</doc>ryrs& r�test_bug_xmltoolkit54�BugsTest.test_bug_xmltoolkit54(	sF��
�F�F�(�
)������1�z�:�&�	(�����1��':�;rc��UO[O29^tt^2o[OQ2PPP2UO	[WO2Q2P!)%fhK79h)s?<!DOCTYPE doc SYSTEM 'doc.dtd'><doc>&ldots;&ndots;&rdots;</doc>z+undefined entity &ldots;: line 1, column 36)r�rrlr�r�r�r~�rFr�s& r�test_bug_xmltoolkit55�BugsTest.test_bug_xmltoolkit551	sX���
�
�r�}�}�
-�
-���F�F�7�
8�.�	
����R�\�\�*�=�	?�.�
-�s�A.�.A>	�7A>	c�p�QQ2oUO[[OU22P!)c�(`�\sQsQsnQsQsUsP!)�5BugsTest.test_bug_xmltoolkit60.<locals>.ExceptionFilei=	c��[grj)r��rFr�s&&rrV�:BugsTest.test_bug_xmltoolkit60.<locals>.ExceptionFile.read>	s���
rr)rRrSrTrUrVrVrWrXs@r�
ExceptionFiler=	s����
�
rr#)r�r�rrS)rFr#s& r�test_bug_xmltoolkit60�BugsTest.test_bug_xmltoolkit60:	s&��	�	�	
���'�2�8�8�]�_�=rc�
�QQQQ-o[O2oUOOU2UO	Q2UO2oUO
UOQ2OQ2P!)�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.//paragraphu7A new cultivar of Begonia plant named ‘BCT9801BEG’.)	rrWr}�updaterYrZr�r�r�)rF�ENTITIESr^�ts&   r�test_bug_xmltoolkit62�BugsTest.test_bug_xmltoolkit62C	sp���X�w��9��������
�
���X�&����%�	&�
�L�L�N���������/�4�4�K�	MrzSkips under coverage.c���QoU2[OP2o[Q2FD
oU2J	UO[OP2U2P!)c��[O2oUOQ-2UOQ2UO	Q2P!)rlr�)rr[r|r;r�)rgs r�xmltoolkit63�4BugsTest.test_bug_xmltoolkit63.<locals>.xmltoolkit63W	s3���>�>�#�D��J�J�u�b�!��I�I�f���H�H�U�Or��)ry�getrefcountrr�)rFr0�countr!s&   r�test_bug_xmltoolkit63�BugsTest.test_bug_xmltoolkit63T	sH��	�	������%���t��A��N���������.��6rc	��[OQQQ5oUO[OU2Q2UO[O	[OU22OQ2Q2UO[O[O	[OU222Q2P!)�SomeTagzdef _f():
  return 3
�r�s0<SomeTag text="def _f():&#10;  return 3&#10;" />r�)rr�r�r9r�r�rs& r�test_bug_200708_newline� BugsTest.test_bug_200708_newlinec	s���
�J�J�y�'@�J�A��������Q��C�	E����������A��/�3�3�F�;�)�	+�������R�V�V�B�K�K��N�%;�<�C�	Erc�f�[O2oUOQ2UOUO	2O
Q2QQ2o[OU2Q5oUOQ2UOUO	2O
Q2P!)z<element>some text</element>r�c�(`�\sQsQsnQsQsUsP!)�2BugsTest.test_bug_200708_close.<locals>.EchoTargetiu	c�.�[OQ2!)r��rr�rs&rrZ�8BugsTest.test_bug_200708_close.<locals>.EchoTarget.closev	s���z�z�)�,�,rr�rRrSrTrUrZrVrWrXs@r�
EchoTargetr>u	s����
-�
-rrCrQ)rrWrYr�rZrl)rFr^rCs&  r�test_bug_200708_close�BugsTest.test_bug_200708_closen	s}����������2�3��������+�+�Y�7�	-�	-����Z�\��2�����2�3��������+�+�Y�7rc��[OQ2o[OUQ2oUO[	UQQ5Q2[OQ2o[OUQ2o[OUQ2oUO[	UQQ5Q2[OQ2o[OUQ2o[OUQ2oUO[29^tt^2o[	UQQ5PPP2UO[WO2Q2P!)%fhK79h)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>rcz<cannot use non-qualified names with default_namespace option)	rr�rCr�rhr�rr�r~)rFr�sr�s&   r�!test_bug_200709_default_namespace�*BugsTest.test_bug_200709_default_namespace|	s����J�J��'���M�M�!�_�-������1�	�B�7�	9�
�J�J��'���M�M�!�_�-���M�M�!�0�1������1�	�B�
�	�
�J�J��'���M�M�!�_�-���M�M�!�V�$��
�
�
�z�
*�
*�b��a�9�5�+�����R�\�\�*�N�	P�+�
*�s�E�E	�E	c��[OQ2oUO[OU2Q2[O	QQ2[OQ2oUO[OU2Q2[OQ2oUO[OU2Q2P!)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/" />)rr�r�r9�register_namespacers& r�"test_bug_200709_register_namespace�+BugsTest.test_bug_200709_register_namespace�	s����J�J�H�I��������Q��Q�	S�
���e�%O�P��J�J�H�I��������Q��Q�	S�

�J�J�@�A��������Q��G�	Irc��[OQ2oUO[OQ22UO	U]*O
[O2[OQ2oUO[O
Q22UO	U]*O
[O2P!)r�r	)rr�r�rrr�rlr�)rFr�s& r�test_bug_200709_element_comment�(BugsTest.test_bug_200709_element_comment�	s��
�J�J�s�O��	������E�"�#�����1����2�:�:�.��J�J�s�O��	������u�������1����2�5�5�)rc�p�[OQ2o[OUQ2o[OUQ2o[OQ2oUO]U2UO	[U2,QN2UOPU2UO	[U2,QN2P!)r�r�r�r�)r�r�r�)r�r�r�r�)rr�rCr�r�rn�rFr�r�r�r�s&    r�test_bug_200709_element_insert�'BugsTest.test_bug_200709_element_insert�	s����J�J�s�O���M�M�!�S�!���M�M�!�S�!���J�J�s�O��	����A�������*�O�<�	����Q�������*�,@�Arc�8�[OQ2o[OUQ2o[OQ2oUO	U2UO[
UO[O22[O,2P!)r�r�zTEST-b)rr�rCrrr�r�rnr�)rFr�r��	comment_bs&   r�test_bug_200709_iter_comment�%BugsTest.test_bug_200709_iter_comment�	sa���J�J�s�O���M�M�!�S�!���J�J�x�(�	�	������������r�z�z�(:�;�b�j�j�\�Jrc���[O2oUOQ2oUOQ-2oUO	Q2oUO2oUO
[U2Q2P!)r;rlrG)rr[r;r|r�rZr�rh)rFr�rs&  r�test_bug_1534630�BugsTest.test_bug_1534630�	sX���n�n����H�H�V����I�I�e�R� ���G�G�E�N���I�I�K������1��y�1rc���[OQ2oUO[OUQ2Q2[OQ2oUO[OUQ2Q2P!)s7<?xml version='1.0' encoding='utf-8'?><body>tãg</body>rds<<?xml version='1.0' encoding='ascii'?>
<body>t&#227;g</body>s;<?xml version='1.0' encoding='iso-8859-1'?><body>t�g</body>r�rs& r�test_issue6233�BugsTest.test_issue6233�	sj���F�F�.�
/��������Q��0�)�	*�
�F�F�*�
+��������Q��0�)�	*rc���[OQ2oUO[U2Q,2[O[2oUQ*UQ$UO[U2,QN2P!)r�rlrH�rlrlr�)rr�r�rnr)rFrc�newelems&  r�test_issue6565�BugsTest.test_issue6565�	sY���v�v�+�,�������-��w�7��&�&��$���!�*��Q�������-�/H�Irc�`�[OQQ2[OQQ2P!)�	test10777z
http://myuri/)rrKrs&r�test_issue10777�BugsTest.test_issue10777�	s$��	���k�?�;�
���k�?�;rc�6`�U1QkQ2o[OQ2nU2RmRO2o[	U2oUOV12UORO[2UOROQ2P!)c�0:`�\sQsQsnU1QksQsUsP!)�%BugsTest.test_lost_text.<locals>.Texti�	c�:�QRmP	!��changedr9rs&�r�__bool__�.BugsTest.test_lost_text.<locals>.Text.__bool__�	s
���"���rr�rRrSrTrUrnrVrW�rYrs@�rr�rj�	�����
�
rr�rlrm)rr�r�r�rr�r�r��rFr�r!r+rs&   @r�test_lost_text�BugsTest.test_lost_text�	sp���	�	�

�J�J�u�������
�J�J�L����G�����a�&����a�f�f�c�*��������+rc�`�U1QkQ2o[OQ2nRO[OQ22U2R]*mRO	2o[U2oUO
V12UO
R]*O[2UOR]*OQ2P!)c�0:`�\sQsQsnU1QksQsUsP!)�%BugsTest.test_lost_tail.<locals>.Texti�	c�&:�QR]*mP	!rl)r�rs&�rrn�.BugsTest.test_lost_tail.<locals>.Text.__bool__�	s���%��!��	�rrrprqs@�rr�rx�	rrrr�r�rlrm)	rr�r�r�r�rr�r�r�rss&   @r�test_lost_tail�BugsTest.test_lost_tail�	s����	�	�

�J�J�v���	������E�"�#��F��!��	�
�J�J�L����G�����a�&����a��d�i�i��-�����1����I�.rc�6``�UU1QkQ2o[OQ2nRO[OU222RO[OQ22ROQ2n[	R2oUOWOU2UOR]*O[2UOR]*OQ2P![
cSO
Q2K�h9h)c�2:`�\sQsQsnUU1QksQsUsP!)�$BugsTest.test_lost_elem.<locals>.Tagi
c�P:�[OQ2R]$[R2P	!rl)rr�r)rFr/rr!s&&��rr�+BugsTest.test_lost_elem.<locals>.Tag.__eq__
s����z�z�)�,��!���Q��rr�rRrSrTrUrrVrW)rYrr!s@��rr�r
s����
�
rr�r�rlzgenerators are not reentrantrm)rr�r�r�rrr�r�rlr�r�)rFr�r+rr!s&  @@r�test_lost_elem�BugsTest.test_lost_elem
s����	�	�
�J�J�v���	������C�E�"�#�	������E�"�#�
�F�F�5�M��	:��Q��A�	
���a�e�e�S�)����a��d�h�h��,�����1����9�-��	�	:��M�M�8�9�	:�s�C9�9	D�D�Dc��QU*o[OU2oUOUOQ2UO	Q22P!)s<a b="%s"/>r�r)rr�r�r�rj)rFr�r'r�s&&  r�check_expat224_utf8_bug� BugsTest.check_expat224_utf8_bug
s:���t�#���v�v�c�{��������#�����G�(<�=rc�T�QoUOU2QoUOU2P!)sàsààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààsxàààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààà)r�r�s& r�test_expat224_utf8_bug�BugsTest.test_expat224_utf8_bug
s*��"���$�$�T�*�(���$�$�T�*rc��[[Q29^tt^2oUO2oPPP2[O	W2oUOQ2oUO
Q2O2oUOQQ2oU]QoUOUOQ2U2P!)%fhK�9h)r�r�rr8r����)
rU�UTF8_BUG_XMLFILErVrr�r�rj�stripr7r�)rF�fp�rawr��xmlattrr�s&     r�test_expat224_utf8_bug_file�$BugsTest.test_expat224_utf8_bug_file(
s���
�"�D�
)�
)�R��'�'�)�C�*��}�}�S�!���(�(�3�-���z�z�'�"�(�(�*���|�|�F�C�(���A�b�z��������#���-�*�
)�s�B2�2C	�;C	c���UO[[O2OQ2UO[[O2OQP2P!rk)r�r�rr[r|rs&r�test_39495_treebuilder_start�%BugsTest.test_39495_treebuilder_start5
sB�����)�R�^�^�%5�%;�%;�U�C����)�R�^�^�%5�%;�%;�U�D�Irc	�`�UO[[OQ2OQ[]222UO[[OQ2OP2QnUO[Q[OQ2OU1Qk[]222P!)rlc3�@�SF �Do]]*w�	J	P!3h�r�r�r�r!s& rr��EBugsTest.test_issue123213_correct_extend_exception.<locals>.<genexpr><
s������1�1�Q�3�3����c��[Q2g��	mymessage�r�rrrr]�=BugsTest.test_issue123213_correct_extend_exception.<locals>.fB
�
���K�(�(rr�c3�>:�SF �D
oR2w�	J	P!3hrjr�r�r!r]s& �rr�r�G
s��H���H�q�q�s�s�H���)r��ZeroDivisionErrorrr�r�rr�r�)rFr]s&@r�)test_issue123213_correct_extend_exception�2BugsTest.test_issue123213_correct_extend_exception9
s�������+�R�Z�Z��->�-E�-E�1��a��1�	3�	
���)�R�Z�Z��%6�%=�%=�t�D�	)�	
����{��J�J�u��$�$�&=�E�!�H�&=�	?rr)'rRrSrTrUrr	rrrrrr$r,r�r�ry�gettracer5r:rDrHrLrOrSrWrZr]rbrfrtr{r�r�r�r�r�r�rVrWrXs@rrr�s������8B�N�Y�7�2<�?�>�M�"�_�_�S�\�\�^�%<�=�7�>�7�	E�8�P�.
I�
*�B�K�2�
*�J�<�
,�/� .�(>�

+�.�J�?�?rrc�^`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsUsP!)
�BasicElementTestiN
c���QoQQ-o[OV2oUOU[O2UOQ[	U22UOQ[	U22UOQ[	U22UOQ[	U22UOUOU2UOUO2UOUO2UOUOU2UOUOU2QUQ$UOUOU2UOUOU2P!)	r	�zix�wyprlr�r�r�rBr
)
rr�r�r�r�r�rlr�r�r�rJr�r�)rFrlr��element_foos&   r�
test___init__�BasicElementTest.test___init__P
s$�����%�!���j�j��-��	
���k�2�:�:�6��
�
�e�S��-�.��
�
�h��K� 0�1��
�
�f�c�+�.�/��
�
�f�c�+�.�/�	
������#�.����+�*�*�+����+�*�*�+�	
����+�+�V�4�����+�+�V�4���u�
�����+�+�V�4����K�.�.��7rc��[OQQQ-2oUO[OQQQ-22[OU2oUO	V!2UOUOUO2UOUOUO2UOUOUO2UO[U2[U22[OV2FDvq4UOV42J	UOUOUO2P!�r	r�r�r
rB�qix)rr�r�r&rJr�rlr�r�r��	itertools�zip_longest�assertIsr��rFr��element_foo2r�r�s&    r�
test___copy__�BasicElementTest.test___copy__k
s���j�j��%��(8�9�����2�:�:�e�u�e�-=�>�?��y�y��-��	
����3�	
����)�)�;�?�?�;�����*�*�K�,<�,<�=�����*�*�K�,<�,<�=�	
����\�*�C��,<�=�!*� 5� 5�k� P��V��M�M�&�)�!Q�	
����,�,�k�.@�.@�Arc��[OQQQ-2oUO[OQQQ-22[OU2oUOV!2UO
UOUO2UO
UOUO2UO
UOUO2UO
[U2[U22[OV2FDvq4UOV42J	UOUOUO2UO
UOUO2QUOQ$UOUOUO2UOUOUO2P!r�)rr�r�r&r'rJr�rlr�r�r�r�r�r�r�r�s&    r�test___deepcopy__�"BasicElementTest.test___deepcopy__�
sp���j�j��%��(8�9�����2�:�:�e�u�e�-=�>�?��}�}�[�1��	
����3�	
����)�)�;�?�?�;�����*�*�K�,<�,<�=�����*�*�K�,<�,<�=�	
����\�*�C��,<�=�!*� 5� 5�k� P��V����V�,�!Q�	
����,�,�k�.@�.@�A�����,�,�k�.@�.@�A�%*����5�!�����,�,�k�.@�.@�A����L�/�/��1C�1C�Drc
��[OQ2oUO[UOQ2UO[UO
[OQ2Q,2UO[UO]Q2[OQ2,UQ$UO[29^tt^2QU]$PPP2UO[29^tt^2[OQ2Q,UQ$PPP2[UQ2%c/QQQP,QQ	Q
Q
QQ-oUO[UOU2[UQ2%cMQ
Q[O2oUQ2,UQ$UO[[OU2P!P!)%fhK�9h)%fhK�9h)�joer�r
r	rH�__setstate__rl�	_childrenr�r�r�r��__deepcopy__c�(`�\sQsQsnQsQsUsP!)�9BasicElementTest.test_augmentation_type_errors.<locals>.Ei�
c��P!rjr)rF�memos&&rr��FBasicElementTest.test_augmentation_type_errors.<locals>.E.__deepcopy__�
s��rr�rRrSrTrUr�rVrWrXs@r�Er��
s���� � rr�)rr�r�r�r�r�r��hasattrr�r&r')rFr�stater�s&   r�test_augmentation_type_errors�.BasicElementTest.test_augmentation_type_errors�
se���J�J�u������)�Q�X�X�s�3����)�Q�X�X��
�
�5�0A�5�/I�J����)�Q�X�X�q�%�8��
�
�5�!�"��!��
�
�
�y�
)�
)��A�a�D�*�
�
�
�y�
)�
)��J�J�u�%�u�-�A�a�D�*��1�n�%�%��u��d�V��&������E�
���i�����?��1�n�%�%�
 �B�J�J�
 ��e�H�:�A�a�D����i�����:�&�*�
)��
)�
)�s$�F4�1G�4G	�=G	�G	�G	c��QQ2oU2o[OQUQ5Um[OU2o=[2UO
U22[OQ2oU2oVBm[OU2o[OUQUQ5o===[2UO
U22[OQ2o[OQ2o[OQ2oUOU2UOU2UOU2[OU2o===[2UO
U22P!)c��\sQsQsQsP!)�.BasicElementTest.test_cyclic_gc.<locals>.Dummyi�
r�rRrSrTrUrVrrr�Dummyr��
���rr�r�)r�r	r(r)r*)	rr��dummyref�weakref�refr
r�rCr�)rFr�r��wrefrr)r(r*s&       r�test_cyclic_gc�BasicElementTest.test_cyclic_gc�
s��	�	�
�G���Z�Z��A�Z�.��
��{�{�1�~��
������$�&�!�
�J�J�u����G���
��{�{�1�~��
�]�]�1�e�!�]�
,��
�q�"������$�&�!��Z�Z��
��
�Z�Z��
��
�Z�Z��
��
�	�	�"�
�
�	�	�"�
�
�	�	�"�
��{�{�2�����B������$�&�!rc�`�P
nU1Qko[OQ2o[OV!2oUO	U2O
Q2=[
2UO	RP	2UO	U2P2P!)Fc�:�P	nP!�Tr)�w�flags&�r�wref_cb�.BasicElementTest.test_weakref.<locals>.wref_cb�
s����Drr)rr�r�r�r�rlr
)rFr�rr�r�s&   @r�test_weakref�BasicElementTest.test_weakref�
sj�����	�
�J�J�s�O���{�{�1�&���������S�)�
�������t�$�������&rc���[OQ]]]Q5oUOUOQ]Q5]2UOUOQ]Q5]2P!)r	)r�r��zr�)r.r�)rr�r�r�)rFr(s& r�test_get_keyword_args�&BasicElementTest.test_get_keyword_args�
sR��
�Z�Z��!�q�A�Z�
.���������Q��/��3��������Q��/��3rc���[][O]*2FCD?o[UO]Q5FCDvq#UOQ]*Q5oQUmQUmUOUQ2OUOQ22UOUOQ22UOQ2]*OQ	Q
2UOUQV#U2oUOUOQ2UOUOQ*]*2UO[!U2]2UO#VE2CJ!	CJB	P!)
r��repeatr	)r
ztext goes herezopposite of head�child�
grandchildz
.//grandchildr�zother valuerJr
)rrz�HIGHEST_PROTOCOLrrsr�r�r�rCr�r�r�r�r�rlr�r�r�)rFr�r�r�rr)s&     r�test_pickle�BasicElementTest.test_pickle�
s���1�f�5�5��9�:�:�E�")�$�,�,�q�"A�"A����N�N�5�b�N�1��)���+����!�!�!�W�-�4�4�V�^�^�L�5Q�R��������0�1��	�	�/�*�1�-�1�1�&�-�H��)�)�!�-D�*0�%�A��� � �����/�� � ����5�!1�2�6�� � ��R��!�,��(�(��/�#B�;rc��[][O]*2FD�o[UO]Q5FD�vq#QoUOU2oUO
UO2Q*Q2UOUQV#U2oUO
UOQ2UO
U]*OQ2J�	J�	P!)rr�z\<?xml version="1.0"?>
                    <group><dogs>4</dogs>
                    </group>rl�grouprJ�dogs)
rrzr�rrsr�r��__getstate__r�rl)rFr�r�r��XMLTEXTr(r)s&      r�test_pickle_issue18997�'BasicElementTest.test_pickle_issue18997s����1�f�5�5��9�:�E�")�$�,�,�q�"A�"A��� ���&�&�w�/��� � ����!2�5�!9�7�C��)�)�"�.E�*0�%�A��� � �����1�� � ��A����F�3�#B�;rc�8�[OQ2oUO[Q29^tt^2UO	[OQ22PPP2UO[
Q29^tt^2UO	[O2PPP2UO[
Q29^tt^2UO	]2PPP2P!)%fhK�9h)%fhK]9h)%fhP!9h)rlz-<Element 'subtag'.*> not in <Element 'tag'.*>r�z.*\bElement, not typez.*\bElement, not int)rr�r�rr�r�rs& r�test_remove_errors�#BasicElementTest.test_remove_errorss����J�J�u���
�
#�
#�J�@�B�B�
�H�H�R�Z�Z��)�*�B��
#�
#�I�(�*�*�
�H�H�R�Z�Z� �*��
#�
#�I�'�)�)�
�H�H�Q�K�)�)�
B�B��*�*��)�)�)�s5�%C"� C5�D�"C2	�+C2	�5D	�>D	�D	�D	r)rRrSrTrUr�r�r�r�r�r�r�r�r�r�rVrWrXs@rr�r�N
s?����8�6B�0E�<;�8!"�F'�4�
0�&4�
�
rr�c�V`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
\O]2Q2sQ
sQsQsQsQsQsQsQsQsQsQsQs\O:Q2\O<2\O>2Q222s Qs!Us"P!)�BadElementTestic�6`�U1QkQ2oU2,n[OQ2oUOR2QQU[O2oUQ2,n[OQ2oUOR2P![cKXh9h)c�::`�\sQsQsn\U1Qk2sQsUsP!)�2BadElementTest.test_extend_mutable_list.<locals>.Xi!c�X:�[OQ2,RQ$[O!)rBrHr@�rF�Ls&�r�	__class__�<BadElementTest.test_extend_mutable_list.<locals>.X.__class__"s"����
�
�5�)�*��!���z�z�!rr�rRrSrTrU�propertyrrVrW�rYrs@�r�Xr�!�����
�
"��
"rrr	c��\sQsQsQsP!)�2BadElementTest.test_extend_mutable_list.<locals>.Yi-rr�rrr�Yr
-r�rrr��rr�r�r��rFrrrrs&   @r�test_extend_mutable_list�'BadElementTest.test_extend_mutable_list s����	"�	"�
�S�E���J�J�u���	�
�H�H�Q�K�	��2�:�:�	�
�s�V�H���J�J�u���	�������	��	�s�B
�
	B�B�Bc�`�U1QkQ2oU2[OQ2,n[OQ2oUOR2QQU[O2oUQ2[OQ2,n[OQ2oUOR2P![cKlh9h)c�::`�\sQsQsn\U1Qk2sQsUsP!)�3BadElementTest.test_extend_mutable_list2.<locals>.Xi4c�,:�RQ[O!�rHr@rs&�rr�=BadElementTest.test_extend_mutable_list2.<locals>.X.__class__5s����a�D��z�z�!rrrrs@�rrr4rrrrBr	c��\sQsQsQsP!)�3BadElementTest.test_extend_mutable_list2.<locals>.Yi@rr�rrrrr@r�rrr
rr
s&   @r�test_extend_mutable_list2�(BadElementTest.test_extend_mutable_list23s����	"�	"�
�S�"�*�*�U�#�$���J�J�u���	�
�H�H�Q�K�	��2�:�:�	�
�u�X�r�z�z�%�(�)���J�J�u���	�������	��	�s�B2�2	C�<C�?Cc�,�UOP	Q5P!�T��raises��do_test_remove_with_clearrs&r�%test_remove_with_clear_assume_missing�4BadElementTest.test_remove_with_clear_assume_missingFs��	
�&�&�d�&�3rc�,�UOP
Q5P!�Frrrs&r�&test_remove_with_clear_assume_existing�5BadElementTest.test_remove_with_clear_assume_existingKs��	
�&�&�e�&�4rc
�```�QQ[O2oUU1QkQU2oUU1QkQU2oR%cU1QkoL[oROUO[
O2UQ1UQ11FCD�vqgRO
ROUQ	52V&Q
1VbQ1VfQ11FDwvq�o
ROU
29^tt^2UQ
2nROU	Q2,2U29^tt^2ROUQ22PPP2PPP2Jy	ROV&2oSFD~vq�q�ROU
29^tt^2UQ
2nROU	Q2UQ2,2U29^tt^2ROUQ22PPP2PPP2J�	ROQ29^tt^2UQ
2nROUQ22[U29^tt^2o
[U29^tt^2oROR]*2PPP2PPP2W
O2WO2PPP2[29%cR9%cVdIo[2%cR%c	VdIcCJ4ROV&2oSFDvq�o
ROU
29^tt^2UQ
2nROU	Q2UQ2,2U29^tt^2ROR]*2PPP2PPP2J�	CJ�	P!)%fhCKA9h)%fhCJ�9h)%fhCK�9h)%fhCJ_9h)%fhCKp9h)%fhCK|9h)%fhCKh9h)%fhK�9h)%fhCJ=9h)c��\sQsQsQsQsP!)�3BadElementTest.do_test_remove_with_clear.<locals>.EiWz:Local class to be able to mock E.__eq__ for introspection.r)rRrSrTrU�__doc__rVrrrr�r(Ws��Lrr�c�2:`�\sQsQsnUU1QksQsUsP!)�3BadElementTest.do_test_remove_with_clear.<locals>.XiZc�:�RQR%(!rr�rF�orr�s&&��rr�:BadElementTest.do_test_remove_with_clear.<locals>.X.__eq__[������G�!�z�!rrr��rYrr�s@��rrr+Z�����
"�
"rrc�2:`�\sQsQsnUU1QksQsUsP!)�3BadElementTest.do_test_remove_with_clear.<locals>.Yi_c�4:�RO2R%(!rj�r�r-s&&��rr�:BadElementTest.do_test_remove_with_clear.<locals>.Y.__eq__`s����
�
��!�z�!rrr�r1s@��rrr4_r2rrc�0:�RO[2!rj�r�rrs�r�<lambda>�:BadElementTest.do_test_remove_with_clear.<locals>.<lambda>e����$�*;�*;�J�*Grzdel root[:]zroot.clear())�side_effectzremove missing E() from [Z()]zremove missing Z() from [E()]zremove missing Z() from [Z()]�top�one�missing�twozremove root[0] from [Z()]�rem)rr�rr�rr!�enterContextrr�r��'cases_for_remove_missing_with_mutationsr�r$�assert_not_calledr�(cases_for_remove_existing_with_mutations)rFrr�rr�get_checker_context�Zr=�R�U�description�cases�Vr]�g�
is_specialr�sfd              @rr�(BadElementTest.do_test_remove_with_clearPs���	M��
�
�	M�	"�	"��	"�
	"�	"��	"�
�"G��"-���
�
�a�h�h��
�
�.� !�=�1�A�~�3F�G�N�A����d�l�l�{�l�C�D��6�7��6�7��6�7�&�!��k�
�\�\�+�.�.��U�8�D��K�K��5��
�+�,�.�.����A�i�L�1�/�/�.�&��@�@��F�E�(-�$��a��\�\�+�.�.��U�8�D��K�K��5��1�U�8� 4�5�,�.�.����A�i�L�1�/�/�.�).����9�:�:���x�����A�e�H�%�"�1�%�%��M�!�,<�,<���K�K��Q��(�-=�%��#�#�%��#�#�%�
;�2�3�I�I��I�I�1�6�J�'�)�)�f�����E�E�a�K��).�%�A�+����k�2�2� ��x�����Q�u�X�q��x�$8�9�0�2�2� �K�K��Q��0�3�3�2�*/�kH�/�.�.��/�.�.��/�.�.��/�.�.��-=�,<�,<��%�%�%��;�:�:��:3�2��3�2�2�s��0M*
�M�M*
�%7N
�M?�4N
�!3O	�N<
�(N(�N<
�	(O	�+7O7
�"O$�;O7
�M'�M'�!	M*
�*M<�3M<�?N�N�
	N
�N%�N%�(N9�1N9�3	N<
�<O
�O
�	O	�O!
�O!
�$O4�-O4�/O7
�7P	�P	c�,�UOP	Q5P!r��do_test_remove_with_mutate_rootrs&r�+test_remove_with_mutate_root_assume_missing�:BadElementTest.test_remove_with_mutate_root_assume_missing�s��	
�,�,�D�,�9rc�,�UOP
Q5P!r#rRrs&r�,test_remove_with_mutate_root_assume_existing�;BadElementTest.test_remove_with_mutate_root_assume_existing�s��	
�,�,�E�,�:rc�n```
�[OoUU
1QkQU2oR%cU1QkoL[oROV#2oSFD~vqgq�RO	U	29^tt^2UQ2n
R
OUQ2UQ2,2U29^tt^2R
O
UQ22PPP2PPP2J�	ROV#2oSFDvqgo	RO	U	29^tt^2UQ2n
R
OUQ2UQ2,2U29^tt^2R
O
R
]*2PPP2PPP2J�	P!)%fhK�9h)%fhCJ@9h)%fhKF9h)%fhJ�9h)c�2:`�\sQsQsnUU1QksQsUsP!)�9BadElementTest.do_test_remove_with_mutate_root.<locals>.Zi�c�:�R]R%(!�rrr-s&&��rr�@BadElementTest.do_test_remove_with_mutate_root.<locals>.Z.__eq__�r0rrr�r1s@��rrHr[�r2rrHc�0:�RO[2!rjr9rs�rr:�@BadElementTest.do_test_remove_with_mutate_root.<locals>.<lambda>�r<rr>r?rAr@rB)rr�rrDrr�r�rF)rFrr�rHrGrLrIrJrMrKr�sfd        @rrS�.BadElementTest.do_test_remove_with_mutate_root�sH����J�J��	"�	"��	"�
�"G��"-���<�<�Q�B��$)� �A�!����k�*�*���x�����Q�u�X�q��x�0�1�(�*�*��K�K��)��-�+�+�*�%*��=�=�a�C��!&��A�+����k�*�*���x�����Q�u�X�q��x�0�1�(�*�*��K�K��Q��(�+�+�*�"'�+�*��+�*�*��+�*��+�*�*�s`�,7E;	�#E(
�;E;	�7F#	�9F
�F#	�(E8�1E8�3E;	�;F

�F

�F �F �F#	�#F4
�,F4
c	#�  �V1V!1V"11FD6vq4QUOQUOQUOQ0oVVE1w�	J8	V1V1V!1V"11FD6vq4QUOQUOQUOQ0oV#VE1w�	J8	P!3h)zremove missing z	() from [�(), �()]�rR)rFr�rHrJrMrKs&&&   rrD�6BadElementTest.cases_for_remove_missing_with_mutations�s�����V�a�V�a�V�,�D�A�,�Q�Z�Z�L�9� �z�z�l�$�q�z�z�l�#�?�K���&�&�-�
�V�a�V�a�V�a�V�4�D�A�,�Q�Z�Z�L�9� �z�z�l�$�q�z�z�l�#�?�K���&�&�5�s�BBc	#� �VQ1V!Q1V"Q11FD7vq4oQUOQUOQUOQ0oVCU1w�	J9	P!3h)zremove root[1] from [E(), Z()]zremove root[1] from [Z(), E()]zremove root[1] from [Z(), Z()]zremove root[1] (of type z) from [rcrdre)rFr�rHrJrIrKs&&&   rrF�7BadElementTest.cases_for_remove_existing_with_mutations�sn����3�4�
�3�4�
�3�4�"
��A�+�
6�a�j�j�\�B$�$%�J�J�<�t�A�J�J�<�s�D�K���#�#�"
�s�AA
c	��[OQ2o[UQU29^tt^2UO[29^tt^2[U2PPP2PPP2P!)%fhK9h)%fhP!9h)r	rl)rr�rr��RuntimeErrorr�rs& r�test_recursive_repr�"BadElementTest.test_recursive_repr�sY��
�J�J�u���
�q�%��
#�
#��"�"�<�0�0��Q��1�$�
#�0�0��$�
#�
#�s/�A;�
A(	�A;�(A8
�1A8
�3A;�;B	�B	c�f`�U1QkQ[2o[O2oUOQ-2UO	Q2UO	UQ22UO	Q2UOQ2UO
2nUOROQ2P!)c�0:`�\sQsQsnU1QksQsUsP!)�/BadElementTest.test_element_get_text.<locals>.Xi�c�H:�ROP![cP!h9hrj)r��	NameErrorrss&�r�__del__�7BadElementTest.test_element_get_text.<locals>.X.__del__�s!�����I�I�� ����s��	!�!�!r�rRrSrTrUrrrVrW�rYrcs@�rrro������
�
rrrl�ABCD�EFGH�IJKL�ABCDEFGHIJKL)	r�rr[r|r;r�rZr�r��rFrr�rcs&  @r�test_element_get_text�$BadElementTest.test_element_get_text�s{���	��	�
�N�N���	����r��	���v��	���q��y��	���v��	���e���w�w�y��������N�3rc�`�U1QkQ[2o[O2oUOQ-2UOQ-2UO	Q2UOQ2UOUQ22UOQ2UO	Q2UO
2nUOR]*OQ2P!)c�0:`�\sQsQsnU1QksQsUsP!)�/BadElementTest.test_element_get_tail.<locals>.Xic�V:�R]*OP![cP!h9hr])r�rqrss&�rrr�7BadElementTest.test_element_get_tail.<locals>.X.__del__s%������G�L�L�� ����s��	(�(�(rrtrus@�rrr�rvrrr�rlrwrxryrz)	r�rr[r|r�r;rZr�r�r{s&  @r�test_element_get_tail�$BadElementTest.test_element_get_tails����	��	�
�N�N���	������	����r��	���e��	���v��	���q��y��	���v��	���f�
��w�w�y������a����~�6rc�,�UOP	Q5P!)T��use_clear_method��"do_test_subscr_with_mutating_slicers&r�test_subscr_with_clear�%BadElementTest.test_subscr_with_clears���/�/��/�Frc�,�UOP
Q5P!)Fr�r�rs&r�test_subscr_with_delete�&BadElementTest.test_subscr_with_deletes���/�/��/�Grc�``�UU1QkQ2oUOU]
2FD�oUOU29^tt^2[OQ2nRO	[]
2Tt,tFDo[OQU02MJ	to2RU*PPP2J�	P!ttoh)%fhJ�9h)c�<:`�\sQsQsnQQksUU1QksQsUsP!)�<BadElementTest.do_test_subscr_with_mutating_slice.<locals>.Xi"c��VmP!rj�r!�rFr!s&&rr��EBadElementTest.do_test_subscr_with_mutating_slice.<locals>.X.__init__#����rc�l:�R%cRO2UO!RQUO!r)r�r!)rFrr�s&��r�	__index__�FBadElementTest.do_test_subscr_with_mutating_slice.<locals>.X.__index__%s,���#��G�G�I��v�v�
��!���v�v�
rr�r]�rRrSrTrUr�r�rVrW)rYrr�s@��rrr�"s����
�
�
rrrcr���get_mutating_slicesrrr�r�r)rFr�rrGr!rs&d   @rr��1BadElementTest.do_test_subscr_with_mutating_slice!s����	�	��)�)�!�R�0�A����a����J�J�v�&�����u�R�y�A�y�!�"�*�*�q���W�-�y�A�B��!��!��1��B�!���s$�-B4	�.#B/�B4	�/B4	�4C
�=C
c�`�U1QkQ2oUOU]
2FD�oUOU29^tt^2[OQ2nRO	[]
2Tt,tFDo[OQU02MJ	to2,RU$PPP2J�	P!ttoh)%fhJ�9h)c�::`�\sQsQsnQQksU1QksQsUsP!)�=BadElementTest.test_ass_subscr_with_mutating_slice.<locals>.Xi6c��VmP!rjr�r�s&&rr��FBadElementTest.test_ass_subscr_with_mutating_slice.<locals>.X.__init__7r�rc�(:�,RQ$UO!rr�rs&�rr��GBadElementTest.test_ass_subscr_with_mutating_slice.<locals>.X.__index__9s�����!���v�v�
rr�r]r�rqs@�rrr�6s����
�
�
rrrcr�r�)rFrrGr!rs&   @r�#test_ass_subscr_with_mutating_slice�2BadElementTest.test_ass_subscr_with_mutating_slice2s����	�	��)�)�!�R�0�A����a����J�J�v�&�����u�R�y�A�y�!�"�*�*�q���W�-�y�A�B���!��!��1��B�!���s#�-B.	�,#B)�B.	�)B.	�.B?
�7B?
c��UOU]
2[U2PP2[U]2PP2[PU2P2[PU]2P2[]]U]22[]]U]22[]V!]22[]V!]22[]]U*U]22[]]U*U]22,
!)�
)�assertGreaterEqual�slice)rF�index_class�
n_childrens&&&rr��"BadElementTest.get_mutating_slicesCs������
�B�/��+�-��t�,��+�a�.�$��-��$��
�t�,��$��A���-��!�Q��A��'��!�Q��A��'��!�Z��Q��0��!�Z��Q��0��!�Q��^�[��^�4��!�Q��^�[��^�4�
�	
rc
��`�U1QkQ2o[OQ2nRO[]
2Tt,tFDo[OQU02MJ	to2U2RQ$P!ttoh)c�0:`�\sQsQsnU1QksQsUsP!)�FBadElementTest.test_ass_subscr_with_mutating_iterable_value.<locals>.ViSc�:�RO2[[OQ2[OQ2,2!)r�r�)r�r�rr�rs&�rr��OBadElementTest.test_ass_subscr_with_mutating_iterable_value.<locals>.V.__iter__Ts,������	��R�Z�Z��_�b�j�j��o�>�?�?rr)rRrSrTrUr�rVrWrqs@�rrMr�Ss����
@�
@rrMrcr�rH)rr�r�r)rFrMr!rs&  @r�,test_ass_subscr_with_mutating_iterable_value�;BadElementTest.test_ass_subscr_with_mutating_iterable_valueRs]���	@�	@�

�J�J�v���	���u�R�y�9�y�!�"�*�*�q���W�%�y�9�:��s��!���:s�#A2c���Qo[OUQ5oUOQ-2UOQ2UO	[
UOQ-2=[
2P!)c��,!rjr�r�r�s&&r�element_factory�>BadElementTest.test_treebuilder_start.<locals>.element_factory^����Ir�r�rlrwr�)rr[r|r;r��AttributeErrorr
�rFr�r�s&  r�test_treebuilder_start�%BadElementTest.test_treebuilder_start\sP��	��N�N�?�N�;��	����r��	���v�����.�!�'�'�6�2�>�
��rc���Qo[OUQ5oUOQ-2UOQ2UO	[
UOQ2=[2P!)c��,!rjrr�s&&rr��<BadElementTest.test_treebuilder_end.<locals>.element_factoryjr�rr�rlrw)rr[r|r;r�r�r�r
r�s&  r�test_treebuilder_end�#BadElementTest.test_treebuilder_endhsN��	��N�N�?�N�;��	����r��	���v�����.�!�%�%��7�
��rc�`�U1QkQ[O2o[OQ2nUQ2oROU[OQ2,2[2%c(UO	[
[OR2P![OR2oUO[U2U,2P!)c�0:`�\sQsQsnU1QksQsUsP!)�-BadElementTest.test_deepcopy_clear.<locals>.Xiwc�*:�RO2U!rjr6)rFr�r�s&&�rr��:BadElementTest.test_deepcopy_clear.<locals>.X.__deepcopy__xs����
�
���rrr�)rYr�s@�rrr�wrrrrr�r�r�)
rr�r�rr�rjr&r'�assertListEqualr�)rFr�evilr�r�s&   @r�test_deepcopy_clear�"BadElementTest.test_deepcopy_clearts����	��
�
�	�
�z�z�#�����v�����T�2�:�:�c�?�+�,�#�%�%����l�D�M�M�4�@��
�
�d�#�A�� � ��a��4�&�1rc�```�[OQ2n[OQ2n[OQ2oUUU1QkQ[O2o[OQ2nUQ2UQ2qCROV1U,2[[O
R22oUO
U]*U2UO
U]*U2UOU]*OUO2SOUQ*Tt,tFDpOMJ	toRORORORO,2P!ttoh)	r�r�r�c�4:`�\sQsQsnUUU1QksQsUsP!)�,BadElementTest.test_deepcopy_grow.<locals>.Xi�c�N:�ROR2ROR2U!rjr})rFr�r�r�r�s&&���rr��9BadElementTest.test_deepcopy_grow.<locals>.X.__deepcopy__�s������A�����A���rrr�)rYr�r�r�s@���rrr��s����
�
rrr>r�r���NN)	rr�r�r�r&r'r�r�rl)	rFr�r�evil1�evil2�childrenr�r�r�s	&     @@@r�test_deepcopy_grow�!BadElementTest.test_deepcopy_grow�s���
�J�J�s�O���J�J�s�O���J�J�s�O��	�	��
�
�	��z�z�%� ����v�q��v�u����U�u�%�&���
�
�d�+�,���
�
�h�q�k�5�)��
�
�h�q�k�5�)�����!����!�%�%�0�����"��6��A�%�%��6��%�%�������q�u�u�5�	7��6s�,E8� �c	��[OQ29q[Q2FDo[OUQ2oJ	[O
29^tt^2UO
[29^tt^2[OU2PPP2PPP2P!)%fhK9h)%fhP!9h)rGr��u)
rr�rrCr�infinite_recursionr��RecursionErrorr&r')rFr��currks&   r�test_deeply_nested_deepcopy�*BadElementTest.test_deeply_nested_deepcopy�s~���Z�Z��_�$���w��A��-�-��S�)�C� �
�
'�
'�
)�
)��"�"�>�2�2��
�
�d�#�3�*�
)�2�2��*�
)�
)�s0�B8�<B%	�B8�%B5
�.B5
�0B8�8C		�C		r)#rRrSrTrUrrr r$rrTrWrSrDrFrr�rkr|r�r�r�r�r�r�r�r�r�r�r��skip_if_huge_c_stack�skip_emscripten_stack_overflow�skip_wasi_stack_overflowr�rVrWrXs@rr�r�s������&�&4�
5�
U1�n:�
;�
)�>'�
$�
����#��$��4�&7�*G�H��"�"

��
�
�2�&7�2
�!�!�'�*��+�+�-��%�%�'�$�(�.�+�$rr�c�F`�\sQsQsnQsQs\OsQsUs	P!)�MutationDeleteElementPathi�c�F�[OU,UN3oVmU!rj�r��__new__rc�r"rcr*rFs&&* rr��!MutationDeleteElementPath.__new__�����{�{�3�&��&���	��rc�"�UOQP	!r�rc�rFr.s&&rr� MutationDeleteElementPath.__eq__�s���I�I�a�L�rr��
rRrSrTrUr�rr��__hash__rVrWrXs@rr�r��������
��|�|�Hrr�c�F`�\sQsQsnQsQs\OsQsUs	P!)�MutationClearElementPathi�c�F�[OU,UN3oVmU!rjr�r�s&&* rr�� MutationClearElementPath.__new__�r�rc�<�UOO2P	!r�)rcr�r�s&&rr�MutationClearElementPath.__eq__�s���	�	����rr�r�rXs@rr�r��r�rr�c�@`�\sQsQsnQs\OsQsUsP!)�BadElementPathi�c��]]*gr�rr�s&&rr�BadElementPath.__eq__�s����c�	rr)	rRrSrTrUrr�r�rVrWrXs@rr�r��s������|�|�Hrr�c�v``�\sQsQsnU1QksU1QksQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sUsU9s!)�BadElementPathTesti�c�b:�[RU_2]QH
GoUOUm-UmP!�rrC)�super�setUprErDr�
path_cache�rFrDrs& �rr�BadElementPathTest.setUp�s$���
��
��)�%�,�,�����rc�T:�]QHGoUOUm[RU_2P!r)rErDrrr�tearDownrs& �rr�BadElementPathTest.tearDown�s���)�!�_�_���
���rc
�@�[[1FDwoUOU29^tt^2[O	Q2oUO[O	Q2,2UO
UUQ22PPP2Jy	P!)%fhJ�9h�r	r
r�)r�r�rrr�r�r��rFr"rs&  r�test_find_with_mutating�*BadElementPathTest.test_find_with_mutating�sl��-�/G�H�C����c�"�"��J�J�u�%�����"�*�*�U�+�,�-����s�1�c�{�#�#�"�I�"�"�"���AB	�B
�B
c���[OQ2oUO[OQ2,2UO[	Q22P![
cP!h9hr)rr�r�r�r�r�rs& r�test_find_with_error�'BadElementPathTest.test_find_with_error�sP���J�J�u���	���"�*�*�U�#�$�%�	�
�F�F�>�#�&�'�� �	��	���A�	A(�#A(�'A(c
�@�[[1FDwoUOU29^tt^2[O	Q2oUO[O	Q2,2UO
UUQ22PPP2Jy	P!)%fhJ�9hr)r�r�rrr�r�r�rs&  r�test_findtext_with_mutating�.BadElementPathTest.test_findtext_with_mutating�sl��-�/G�H�C����c�"�"��J�J�u�%�����"�*�*�U�+�,�-��
�
�3�q�#�;�'�#�"�I�"�"�"�rc��[[1FD�oUOU29^tt^2[O	Q2o[O	Q2o[[
22UmUOU2=[UOUUQ222PPP2J�	P!)%fhJ�9hr)r�r�rrr�r�r!r�r�r�r�)rFr"rr�s&   r�)test_findtext_with_mutating_non_none_text�<BadElementPathTest.test_findtext_with_mutating_non_none_text�s���-�/G�H�C����c�"�"��J�J�u�%���
�
�5�)�� ���]��
��������Q�Z�Z��A�s��,�-�
#�"�I�"�"�"�s�A6B/	�/C
�8C
c���[OQ2oUO[OQ2,2UO[	Q22P![
cP!h9hr)rr�r�r�r�r�rs& r�test_findtext_with_error�+BadElementPathTest.test_findtext_with_error�sP���J�J�u���	���"�*�*�U�#�$�%�	�
�J�J�~�c�*�+�� �	��	�rc���[OQ2o[OUQ2oP]P
,Q-,oSFD*oVBmUO	UOQ2U2J,	P!)r	r
�./barr�rr�rCr�r�r�)rF�	root_elem�sub_elem�falsey�vals&    r�(test_findtext_with_falsey_text_attribute�;BadElementPathTest.test_findtext_with_falsey_text_attribute
s\���J�J�u�%�	��=�=��E�2���a���B��+���C��M����Y�/�/��8�#�>�rc��[OQ2o[OUQ2oPUmUO	UOQ2P2P!)r	r
rr)rFr r!s&  r�&test_findtext_with_none_text_attribute�9BadElementPathTest.test_findtext_with_none_text_attribute
sB���J�J�u�%�	��=�=��E�2����
�����+�+�G�4�b�9rc
�@�[[1FDwoUOU29^tt^2[O	Q2oUO[O	Q2,2UO
UUQ22PPP2Jy	P!)%fhJ�9hr)r�r�rrr�r�r�rs&  r�test_findall_with_mutating�-BadElementPathTest.test_findall_with_mutating
sl��-�/G�H�C����c�"�"��J�J�u�%�����"�*�*�U�+�,�-��	�	�#�a��+�&�#�"�I�"�"�"�rc���[OQ2oUO[OQ2,2UO[	Q22P![
cP!h9hr)rr�r�r�r�r�rs& r�test_findall_with_error�*BadElementPathTest.test_findall_with_error
sP���J�J�u���	���"�*�*�U�#�$�%�	�
�I�I�n�S�)�*�� �	��	�r)r)rRrSrTrUrrr
rrrrr$r'r*r-rVrW�
__classcell__�rrYs@@rr�r��sA���� ��
$��(�.��?�:�'��rr�c�@`�\sQsQsnQsQsQsQsQsQs	Us
P!)�ElementTreeTypeTesti!
c��UO[O[2UO[O[2UO[O
[2UO[O[2UO[O[2UO[O[2P!rj)	r�rrlr�r�r@r�r[rWrs&r�test_istype�ElementTreeTypeTest.test_istype"
sz�����b�m�m�T�2����b�h�h��-����b�n�n�d�3����b�j�j�$�/����b�n�n�d�3����b�l�l�D�1rc�*�QQ[O2oUQ2oUOU[O2UOV!2UOUOQ2QUmUOUO
Q2P!)c��\sQsQsQsP!)�DElementTreeTypeTest.test_Element_subclass_trivial.<locals>.MyElementi+
rr�rrr�	MyElementr8+
r�rr9r	r�)rr�r�r�rlr��rFr9�myes&  r�test_Element_subclass_trivial�1ElementTreeTypeTest.test_Element_subclass_trivial*
sq��	��
�
�	��������c�2�:�:�.����c�-�������%�(����������5�)rc��`�U1QkQ[O2nRQQ]Q]-]]Q5oUOUOQ2UO[	UO22,QN2P!)c�>:``�\sQsQsn-1UU1QkksQsUsU9s!)�HElementTreeTypeTest.test_Element_subclass_constructor.<locals>.MyElementi8
c�>:�[RU_UQ*U1-U@P!)�__)rr�)rFrlr��extrar9rs&&&,��rr��QElementTreeTypeTest.test_Element_subclass_constructor.<locals>.MyElement.__init__9
s����i��/��d�
�F�L�e�Lrr)rRrSrTrUr�rVrWr/)rrYr9s@@�rr9r@8
s����+-�
M�
M�
Mrr9r	r�r�)r�r��foo__))r�r�)r�r)r�r�)r��)rr�r�rlr:r�)rFr;r9s& @r�!test_Element_subclass_constructor�5ElementTreeTypeTest.test_Element_subclass_constructor7
sb���	M��
�
�	M����Q��Q�/�1��:��������'�*������	�	��,�4�	6rc��QQ[O2oUQ2oUOUO2Q2P!)c�(`�\sQsQsnQsQsUsP!)�GElementTreeTypeTest.test_Element_subclass_new_method.<locals>.MyElementiB
c��UO!rjrkrs&r�	newmethod�QElementTreeTypeTest.test_Element_subclass_new_method.<locals>.MyElement.newmethodC
s���x�x�rr)rRrSrTrUrMrVrWrXs@rr9rKB
s����
 �
 rr9r�)rr�r�rMr:s&  r� test_Element_subclass_new_method�4ElementTreeTypeTest.test_Element_subclass_new_methodA
s4��	 ��
�
�	 ������������%�0rc��QQ[O2o[OQ2oQUmUQ2oQUmUOU2UO	UOQ2Q2UO	UO
Q2OQ2[UOQ22oUO	[U2]U2UO	U]*OQ2P!)c��\sQsQsQsP!)�AElementTreeTypeTest.test_Element_subclass_find.<locals>.MyElementiJ
rr�rrrr9rSJ
r�rr9r	r�r
rp)rr�r�r�r�r�r�rlr�r�r�)rFr9r�sub�founds&    r�test_Element_subclass_find�.ElementTreeTypeTest.test_Element_subclass_findI
s���	��
�
�	�
�J�J�u�������������	����
�������E�*�I�6���������*�*�E�2��Q�Y�Y�u�%�&������U��Q��.�����q����u�-rr)rRrSrTrUr4r<rGrOrVrVrWrXs@rr2r2!
s#����2�*�6�1�
.�
.rr2c�X`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
UsP!)�ElementFindTestiY
c��[O[2oUOUO	Q2O
Q2UOUO	Q2O
Q2UOUO	Q2O
Q2[O[2U]$UOUO	Q2O
Q2UOUOQ2Q2UOUOQ2Q2UOUOQ2P2UOUOQQ2P2UOUOQ22UOUOQQ2Q2UO[OQ	2OQ
2P2P!)rlr�./tagzsection/nexttag�nexttagr�rpr.�togz<tag><empty /></tag>�empty)	rr�rr�r�rl�SAMPLE_SECTIONr�r�rs& r�test_find_simple� ElementFindTest.test_find_simpleZ
sb���F�F�:�����������*�*�E�2�������
�.�2�2�E�:���������,�,�e�4��v�v�n�%��!�������� 1�2�6�6�	�B�������G�,�f�5�������M�2�I�>�	
������$5�6��;�������$5�y�A�2�F�	
���!�*�*�U�+�,�������E�9�5�y�A�	
������ 6�7�@�@��I�2�Nrc�:�Qo[OU2oUOUOQ2OQ*Q2UOUOQ2OQ*Q2UOUOQ2OQ*Q2UOUOQ2OQ*Q	2UOUOQ
2OQ*Q2UO[QUOQ2UO[QUOQ
2UO[QUOQ2UO[QUOQ2P!)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])rr�r�r�r�r��SyntaxError)rF�
LINEAR_XMLrs&  r�test_find_xpath�ElementFindTest.test_find_xpathq
s3���
�
�F�F�:���	
������
�+�2�2�7�;�S�A�������
�+�2�2�7�;�S�A��������0�7�7��@�#�F������� 1�2�9�9�'�B�C�H������� 1�2�9�9�'�B�C�H����{�G�Q�V�V�Z�H����{�G�Q�V�V�[�I����{�G�Q�V�V�=N�O����{�G�Q�V�V�=N�Orc
�*`�QQ[O2nU1QkoQFDjoUQU2oUQU2oUQU2oUOU]2VC*oVT*oUO[	Vg2QQU8QV4U1Q	Vg10Q
5Jl	P!)c�8``�\sQsQsn]sU1QksQsUsU9s!)�VElementFindTest.test_find_xpath_index_no_quadratic_complexity.<locals>.CountingElementi�
c�l:�[U29O]*
tm[RU_U-U@!r�)r��
findall_callsrr�)rFr*r+rs&*,�rr��^ElementFindTest.test_find_xpath_index_no_quadratic_complexity.<locals>.CountingElement.findall�
s,����T�
�(�(�A�-�(��w���7��7�7rr)	rRrSrTrUrmr�rVrWr/r0s@@r�CountingElementrk�
s�����M�
8�
8rroc�:�RQ2o[U2FDo[OUQ2J	]RmUO	U2RO!)r�r�)rrrCrmr�)�n�patternr�rkros&&  �r�work�KElementFindTest.test_find_xpath_index_no_quadratic_complexity.<locals>.work�
sI���"�6�*�D��1�X���
�
�d�C�(��,-�O�)��L�L��!�"�0�0�0r�iig�?zPossible quadratic behavior on z: calls=z ratios=r�)z.//a[1]z.//a[last()])rr�rr �max)	rFrsrr�w1�w2�w3�r1�r2ros	&       @r�-test_find_xpath_index_no_quadratic_complexity�=ElementFindTest.test_find_xpath_index_no_quadratic_complexity�
s����	8�b�j�j�	8�	1�3�G��d�G�$�B��d�G�$�B��d�G�$�B����r�1�%���B���B�
�O�O��B��S�5�g�[�A��R�Z�L�����:�
�
�3rc��[O[2o[O[2U]$UO	[UO
Q22Q,2UO	[UO
Q22QQ,2UO	[UO
Q22,2UO	[UO
Q22,2UO	[UO
Q22,Q7N2UO	[UO
Q22Q,]*2UO	[UO
Q	22Q,2UO	[UO
Q
22Q,]*2UO	[UO
Q22,Q8N2UO	[UO
Q22,Q9N2UO	[UO
Q
22,Q9N2UO	[UO
Q22,Q8N2UO	[UO
Q22,Q9N2UO	[UO
Q22Q,2UO	[UO
Q22Q,2UO	[UO
Q22Q,]*2UO	[UO
Q22Q,]*2UO	[UO
Q22Q,]*2UO	[UO
Q22Q,2UO	[UO
Q22Q,]*2UO	[UO
Q22Q,]*2UO	[UO
Q22Q,2UO	[UO
Q22Q,2UO	[UO
Q22Q,2UO	[UO
Q22,2UO	[UO
Q22,2UO	[UO
Q22Q,]*2UO	UO
Q2UO
Q22UO	[UO
Q22Q,2UO	[UO
Q 22Q,2UO	[UO
Q!22Q,2UO	[UO
Q"22Q,2UO	[UO
Q#22Q,2UO	[UO
Q$22,2UO	[UO
Q%22,2UO	[UO
Q&22,2UO	[UO
Q'22,2UO	[UO
Q(22,2UO	[UO
Q)22Q,2UO	[UO
Q*22Q,2UO	[UO
Q+22Q,2UO	[UO
Q,22Q,2UO	[UO
Q-22Q,2UO	[UO
Q.22,2UO	[UO
Q/22,2UO	[UO
Q022Q,]*2UO	[UO
Q122Q,]*2UO	[UO
Q222Q,]*2UO	[UO
Q322Q,]*2UO	[UO
Q422Q,]*2UO	[UO
Q522Q,]*2UO	[UO
Q622Q,]*2U]*U]$UO	[UO
Q"22QQ,2UO	[UO
Q-22QQ,2P!):rr�rerlr]ztog/foor�r�z.//tagrz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../tagzsection/../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']r`)rlr\�nextsection)rlr\rrl)rr�rr_r�rnr�rs& r�test_findall�ElementFindTest.test_findall�
s����F�F�:����v�v�n�%��!�������	�	�#��7�&��B������	�	�%�(8�9�E�5�>�J������	�	�%�(8�9�2�>������	�	�)�(<�=�r�B������	�	�#��7�%�	'������	�	�(�(;�<�
�G�a�K�	������	�	�-�(@�A�E�7�K������	�	�.�(A�B�U�G�a�K�P������	�	�+�(>�?�-�	/������	�	�,�(?�@�4�	6������	�	�.�(A�B�4�	6������	�	�%�(8�9�-�	/������	�	�&�(9�:�4�	6������	�	�'�(:�;�e�W�E������	�	�)�(<�=��w�G������	�	�'�(:�;�e�W�q�[�I������	�	�)�(<�=��w��{�K������	�	�2B�(C�D�
�G�a�K�	������	�	�2F�(G�H�
�G�	������	�	�2G�(H�I�
�G�a�K�	������	�	�2F�(G�H�
�G�a�K�	������	�	�2G�(H�I�
�G�	������	�	�-�(@�A�
�G�	������	�	�2C�(D�E�
�K�	������	�	�2G�(H�I�2�N������	�	�(�(;�<�b�A������	�	�2B�(C�D�
�G�a�K�	�������;�/����<�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����	)rc�V�[O[2oUO[	UOQ22,2UO[	UOQ22Q,]*2UO[	UOQ22Q,]*2P!)rlz{http://effbot.org/ns}tagz.//{http://effbot.org/ns}tag)rr�r�r�rnr�rs& r�test_test_find_with_ns�&ElementFindTest.test_test_find_with_nss����F�F�=�!�������	�	�%�(8�9�2�>�����1�9�9�%@�A�B�
(�)�A�-�	/�	
����1�9�9�%C�D�E�
(�)�A�-�	/rc	�^�[OQ2oQQ-oUO[UO	QUQ52]2UO[UO	QUQ52]2QQ-oUO[UO	QUQ52]2UO[UO	QUQ52]2QQPQ-oUO[UO	QUQ52]2UO[UO	QUQ52]2P!)��
            <a xmlns:x="X" xmlns:y="Y">
                <x:b><c/></x:b>
                <b/>
                <c><x:b/><b/></c><y:b/>
            </a>�xxrz.//xx:b)r��.//br)rr�r�r�r�)rFr��nsmaps&  r�test_findall_different_nsmaps�-ElementFindTest.test_findall_different_nsmaps s���v�v�����s�������T�\�\�)��\�F�G��K�����T�\�\�&�U�\�C�D�a�H��s�������T�\�\�)��\�F�G��K�����T�\�\�&�U�\�C�D�a�H��s�B��$������T�\�\�)��\�F�G��K�����T�\�\�&�U�\�C�D�a�Hrc��[OQ2oUO[OQ22UO	[UO
Q22,QN2UO	[UO
Q22Q,2UO	[UO
Q22Q,2UO	[UO
Q	22Q,2UO	[UO
Q
22QQ,2UO	[UO
Q22Q,2UO	[UO
Q22[UO
Q222UO	[UO
Q22,QN2UO	[UO
Q2UP*,*2[UO
Q
222UO	[UO
Q22,QN2UO	[UO
Q22QQ,2UO	[UO
Q22QQ,2UO	[UO
Q22Q,2UO	[UO
Q22,QN2UO	[UO
Q22QQ,2UO	[UO
Q22[UO
Q222P!)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�)r�r�r�)r�r�r�r�)r�r�r�r�r�)r�r�r�r�)rr�r�rrr�rnr�r�s& r�test_findall_wildcard�%ElementFindTest.test_findall_wildcard1s����v�v����	
���B�J�J�v�&�'��������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�(<�=�	?rc���[O[2oUO[Q29^tt^2UOQ2PPP2P!)%fhP!9h)zcannot use absolute pathz/tag)rr�rr�rer�rs& r�
test_bad_find�ElementFindTest.test_bad_find]s@���F�F�:���
�
#�
#�K�1K�
L�
L�
�I�I�f��M�
L�
L�
L�s�A�A&	�A&	c��[O[2oUO[O	U2OQ2OQ2UO[O	U2OQ2Q2UO[[O	U2OQ22Q,]*2QoUO[U29^tt^2[O	U2OQ2oPPP2UO[W2Q,]*2P!)%fhK59h)rlr�z�This search is broken in 1.3 and earlier, and will be fixed in a future version.  If you rely on the current behaviour, change it to '.+'z//tag)rr�rr�r@r�rlr�rnr��assertWarnsRegex�
FutureWarning)rFrr�r�s&   r�test_find_through_ElementTree�-ElementFindTest.test_find_through_ElementTreebs����F�F�:����������*�/�/��6�:�:�E�B��������*�3�3�E�:�F�C��������q�(9�(A�(A�%�(H�I�
�G�a�K�	�#���
"�
"�=�#�
6�
6�����"�*�*�7�3�B�7������+�e�W�q�[�9�7�
6�s�2%E�E	�
E	r)rRrSrTrUr`rgr|r�r�r�r�r�r�rVrWrXs@rrYrYY
s=����O�.P�,�>n)�`/�I�"*?�X�
:�:rrYc�V`�\sQsQsnQQksQsQsQsQsQs	Qs
Q	sQ
sUs
P!)�ElementIterTestiqc�8�[UOU22!rj)rnr�)rFrcrls&&&r�_ilist�ElementIterTest._ilistrs���d�i�i��n�-�-rc	��[OQ2oUOUOU2,Q
N2UOUOUO	Q22QQ,2UO[UO
22OQ2UOPOUO22Q2UOPOUO	Q2O22Q2UO[UO22Q2[UP
Q5oUO[[OU22]*Q2[UP
Q5o[O[O2Q	5oUO[[OV#Q
52]*Q2[OP2oUO[ UO2[OQ2oUOPOUO22Q2P!)z7<html><body>this is a <i>paragraph</i>.</body>..</html>rurer!zthis is a paragraph...zthis is a paragraph.z
this is a )rdr�rQ)r^z*<root>a&amp;<sub>b&amp;</sub>c&amp;</root>za&b&c&)rurer!)rr�r�r�r�rr�rlrgr�rhrrWr[r@r�r�)rFr��
sourcefiler^rgs&    rr�ElementIterTest.test_basicus����f�f�N�O��������S�)�+@�A�������S�X�X�f�%5�6���
�F�����c�h�h�j�)�-�-�v�6�����������0�2J�K����������&�!1�!:�!:�!<�=�"�	$�����c�l�l�n�-�|�<��s�e�4�
�����b�l�l�:�6�7��:�E�B��s�e�4�
����R�^�^�%5��6������b�l�l�:�l�E�F�q�I�5�Q��~�~�d�#�����.�$�)�)�4��f�f�A�B������������0�(�;rc��[OQ2oQUm[OQ2oUO	UOQ2QUmUO
U2UO	POUO22Q2UO	[UO22V,2UO	[UOQ22U,2UO	POUO22P2UO	[UO22U,2P!)r��beforerq�after�beforeafter)rr�r�rrr�r�r�rgr�r�r�)rFrrqs&  r�test_comment�ElementIterTest.test_comment�s����J�J�v�������*�*�Y�'��������y�1����	���������������.�
�>�����a�f�f�h��!��6�����a�f�f�V�n�-��s�3��������!1�!1�!3�4�b�9�����g�l�l�n�-��y�9rc��[OQ2oQUm[OQQ2oUO	UOQ2QUmUO
U2UO	POUO22Q2UO	[UO22V,2UO	[UOQ22U,2UO	POUO22P2UO	[UO22U,2P!)r�r�r-r�ztest instructionr�r�)rr�r�r�r�r�r�rgr�r�r�)rFrr�s&  r�test_processinginstruction�*ElementIterTest.test_processinginstruction�s����J�J�v������
�U�U�6�=�
)��������"4�5����	���������������.�
�>�����a�f�f�h��!��1�����a�f�f�V�n�-��s�3�����������/��4�����b�g�g�i��2�$�/rc�0�[OQ2oUOUOU2Q,2[O	UQ2oUOUOU2QQ,2[O	UQ2oUOUOU2,QN2[O	UQ2oUOUOU2,QN2U]*U]$U]UOUOU2QQ,2P!)r�r�r�r�)r�r�r�)r�r�r�r�)rr�r�r�rCrRs&    r�test_corners�ElementIterTest.test_corners�s����J�J�s�O��������Q��#��/�
�M�M�!�S�!��������Q��#�s��4�
�M�M�!�S�!��������Q���9�
�M�M�!�S�!��������Q��)=�>���t��!��
�a�D�������Q��#�s��4rc� �[OQ2oUOUOUQ2Q,]*2UOUOUQ2Q,]*2UO[	UOQQ52Q,]*2,QNoUO[	UO22U2UOUOU2U2UOUOUQ2U2P!)aJ
            <document>
                <house>
                    <room>bedroom1</room>
                    <room>bedroom2</room>
                </house>
                <shed>nothing here
                </shed>
                <house>
                    <room>bedroom8</room>
                </house>
            </document>�room�houserkr�)r*r�r�r��shedr�r�)rr�r�r�rnr�)rFr��all_tagss&  r�test_iter_by_tag� ElementIterTest.test_iter_by_tag�s����f�f����	
������S�&�1�F�8�a�<�@�������S�'�2�W�I��M�B�	
����3�8�8��8�/�0�
�H�q�L�	�
-���������
�3�X�>�������S�)�8�4�������S�#�.��9rc���[OQ2oUO2oUO[29^tt^2[
O
U2PPP2P!)%fhP!9h�r�)rr�r�r�r�r&)rFr�r�s&  rr+�ElementIterTest.test_copy�sE���J�J�s�O��
�V�V�X��
�
�
�y�
)�
)��I�I�b�M�*�
)�
)�
)�s�A%�%A6	�.A6	c	�b�[OQ2oUO2o[[O
]*2FDOoUO
[[O129^tt^2[OV#2PPP2JQ	P!)%fhJf9hr�)
rr�r�rrzr�r�r�r}r{)rFr�r�r�s&   rr��ElementIterTest.test_pickle�so���J�J�s�O��
�V�V�X���6�2�2�Q�6�7�E��"�"�I�v�/C�/C�#D�E�E����R�'�F�E�8�E�E�E�s�8B	�B.
�&B.
rrj)rRrSrTrUr�rr�r�r�r�r+r�rVrWrXs@rr�r�qs2����.�<�4:�0�5�,:�:�(�(rr�c�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsUsP!)�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�&�UOUOQ2UOUOQ2UOUOP2UOUO-2[U2oUO[
U2]2U]*oUOUOQ2UOUOQ2UOUOQ2UOUO-2P!)rur��divrpr�)r�rlr�r�r�r�r�)rFrr�r�s&&  r�_check_sample1_element�&TreeBuilderTest._check_sample1_element�s����������'��������(��������&�������2�&���7������X���*�����������E�*�������Y�/�������V�,�������r�*rc�:�QQ2oQQU2o[OU2Q5oUOUO2UO	UO2]*2[OU2Q5oUOUO2UO	UO2]*2[O[
2Q5oUOUO2UOUO22P!)c�(`�\sQsQsnQsQsUsP!)�<TreeBuilderTest.test_dummy_builder.<locals>.BaseDummyBuilderic��]*!)�*rrs&rrZ�BTreeBuilderTest.test_dummy_builder.<locals>.BaseDummyBuilder.closes��rrrBrXs@r�BaseDummyBuilderr�s����
�
rr�c�&�\sQsQsQ9s9ssQsP!)�8TreeBuilderTest.test_dummy_builder.<locals>.DummyBuilderic��P!rjrr�s*rr:�ATreeBuilderTest.test_dummy_builder.<locals>.DummyBuilder.<lambda>s��Drr)rRrSrTrUr;r|r�rVrrr�DummyBuilderr�s��!0�0�D�0�5�3rr�rQ)rrWrY�sample1r�rZr!r�)rFr�r�r^s&   r�test_dummy_builder�"TreeBuilderTest.test_dummy_builder�s���	�	�	1�+�	1����\�^��4�����D�L�L�!���������,����%5�%7��8�����D�L�L�!���������,����V�X��.�����D�L�L�!����&�,�,�.�)rc��[O2oUOUOQ2O[O
2UOUOQ2OQ2[O[O
Q5oUOUOQ2O[O
2UOUOQ2OQ2[O[Q5oUOUOQ2[Q22P!)�ctext)�comment_factory)rr[r�rqrlrrr�r��rFr�s& r�test_treebuilder_comment�(TreeBuilderTest.test_treebuilder_comments����N�N���������7�+�/�/����<�������7�+�0�0�'�:��N�N�2�:�:�N�6��������7�+�/�/����<�������7�+�0�0�'�:��N�N�3�N�/��������7�+�S��\�:rc��[O2oUOUOQP2O[O
2UOUOQP2OQ2[O[O
Q5oUOUOQ2O[O
2UOUOQ2OQ2UOUOQQ2O[O
2UOUOQQ2OQ2[OQQ5oUOUOQ2[Q2P12UOUOQQ2[Q2Q12P!)rR)�
pi_factoryr�z text zpitarget  text c��[U2U1!rj)r�)rRr�s&&rr:�5TreeBuilderTest.test_treebuilder_pi.<locals>.<lambda>*s
��C��K��;Nr)rr[r�r�rlr�r�r�r�s& r�test_treebuilder_pi�#TreeBuilderTest.test_treebuilder_pisE���N�N���������h��-�1�1�2�5�5�9�������h��-�2�2�H�=��N�N�b�e�e�N�,��������h��+�+�R�U�U�3�������h��,�,�h�7�������j�(�3�7�7����?�������j�(�3�8�8�:K�L��N�N�&N�N�O��������h��#�h�-��)>�?�������j�(�3�c�*�o�x�5P�Qrc�j�QQ[O2oQo[OU2oUOUOQ2[OU2Q5oUO
U2UO2oUOUOQ2Qo[OU2oUOUOQ2Qo[OU2Q5oUO
U2UO2oUOUOQ2P!)c��\sQsQsQsP!)�;TreeBuilderTest.test_late_tail.<locals>.TreeBuilderSubclassi0rr�rrr�TreeBuilderSubclassr�0r�rr�z<a>text<!-- comment -->tail</a>�texttailrQz<a>text<?pi data?>tail</a>)rr[r�r�r�rWrYrZ)rFr�r'r�r^s&    r�test_late_tail�TreeBuilderTest.test_late_tail.s���	�"�.�.�	�0���M�M�#����������,����%8�%:��;�����C���L�L�N���������,�*���M�M�#����������,�*�����%8�%:��;�����C���L�L�N���������,rc�v�QQ[O2oQo[O[OP	Q5Q5oUOU2UO	2oUOU]*OQ2UOU]*OQ2UOUOQ2[OUP	Q5Q5oUOU2UO	2oUOU]*OQ2UOU]*OQ2UOUOQ2Qo[O[OP	Q	5Q5oUOU2UO	2oUOU]*OQ
2UOU]*OQ2UOUOQ2[OUP	Q	5Q5oUOU2UO	2oUOU]*OQ
2UOU]*OQ2UOUOQ2P!)
c��\sQsQsQsP!)�KTreeBuilderTest.test_late_tail_mix_pi_comments.<locals>.TreeBuilderSubclassiIrr�rrrr�r�Ir�rr�z/<a>text<?pi1?> <!-- comment -->
<?pi2?>tail</a>)�insert_commentsrQr�z
tailztext z+<a>text<!-- comment -->
<?pi data?>tail</a>)�
insert_piszpi datar�ztext
)rr[rWrYrZr�r�r�)rFr�r'r^r�s&    r�test_late_tail_mix_pi_comments�.TreeBuilderTest.test_late_tail_mix_pi_commentsFs���	�"�.�.�	�A�����R�^�^�D�^�%I��J�����C���L�L�N������1����K�0�����1����H�-��������)����%8��%N��O�����C���L�L�N������1����K�0�����1����H�-��������)�<�����R�^�^�t�^�%D��E�����C���L�L�N������1����I�.�����1����F�+��������*����%8�D�%I��J�����C���L�L�N������1����I�.�����1����F�+��������*rc���[O[OPQ5Q5oUOUO2UO2oUO
U2P!)Nr�rQ)rrWr[rYr�rZr��rFr^rs&  r�$test_treebuilder_elementfactory_none�4TreeBuilderTest.test_treebuilder_elementfactory_nonejsF�����R�^�^�D�^�%I��J�����D�L�L�!��L�L�N���#�#�A�&rc�.�QQ[O2oU2oUOUO]
2]2[O	UQ5oUOUO2UO2oUOU2P!)c�(`�\sQsQsnQsQsUsP!)�4TreeBuilderTest.test_subclass.<locals>.MyTreeBuilderiqc��U]*!�rrr!s&&rr��;TreeBuilderTest.test_subclass.<locals>.MyTreeBuilder.foobarr����1�u�rr�rRrSrTrUr�rVrWrXs@r�
MyTreeBuilderr�q�����
�
rr�rQ)	rr[r�r�rWrYr�rZr��rFr��tbr^rs&    r�
test_subclass�TreeBuilderTest.test_subclasspsl��	�B�N�N�	��_��������2���+����R��(�����D�L�L�!��L�L�N���#�#�A�&rc��QQ[O2oU[O[OQ5oUO	UO]
2]2[O
UQ5oUOUO2UOQ2UO2oUOU2P!)c�(`�\sQsQsnQsQsUsP!)�?TreeBuilderTest.test_subclass_comment_pi.<locals>.MyTreeBuilderic��U]*!r�rr!s&&rr��FTreeBuilderTest.test_subclass_comment_pi.<locals>.MyTreeBuilder.foobar�r�rrr�rXs@rr�r�r�rr�)r�r�rQz<!-- a comment--><?and a pi?>)rr[rrr�r�r�rWrYr�rZr�r�s&    r�test_subclass_comment_pi�(TreeBuilderTest.test_subclass_comment_pi~s���	�B�N�N�	��2�:�:�"�%�%�
H��������2���+����R��(�����D�L�L�!����3�4��L�L�N���#�#�A�&rc��`�,nU1Qko[OUQ5o[OUQ5oUOUO2UO2UO
RQ,2P!)c�R:�ROU2[OV2!rj)r�rr�)rlr��lsts&&�r�	myfactory�7TreeBuilderTest.test_element_factory.<locals>.myfactory�s����J�J�s�O��:�:�c�*�*rr�rQ�toplevel)rr[rWrY�sample2rZr�)rFrr�r^rs&   @r�test_element_factory�$TreeBuilderTest.test_element_factory�sZ�����	+�
�^�^�I�^�
6�����R��(�����D�L�L�!���������z�l�+rc��[OUQ5o[OUQ5oUOUO2UO2oUO
VA2UOU2P!)r�rQ)rr[rWrYr�rZr�r�)rFr"r�r^rs&&   r�_check_element_factory_class�,TreeBuilderTest._check_element_factory_class�sY��
�^�^�C�^�
0�����R��(�����D�L�L�!��L�L�N�����a�%��#�#�A�&rc�\�QQ[O2oUOU2P!)c��\sQsQsQsP!)�@TreeBuilderTest.test_element_factory_subclass.<locals>.MyElementi�rr�rrrr9r�r�rr9)rr�r)rFr9s& r�test_element_factory_subclass�-TreeBuilderTest.test_element_factory_subclass�s ��	��
�
�	��)�)�)�4rc��[OoUOUOQ2QQU[2oUOU2P!)rJc��\sQsQsQsP!)�LTreeBuilderTest.test_element_factory_pure_python_subclass.<locals>.MyElementi�rr�rrrr9r�r�rr9)r�_Element_Pyr�rSrr)rF�baser9s&  r�)test_element_factory_pure_python_subclass�9TreeBuilderTest.test_element_factory_pure_python_subclass�s>���~�~��������*A�B�	��j�	��)�)�)�4rc���QQ2o[OU2Q5oUOUO2UO	UO2Q2P!)c�2`�\sQsQsnPsQsQsQsUsP!)�3TreeBuilderTest.test_doctype.<locals>.DoctypeParseri�c��VU1UmP!rj��_doctype)rFr��pubid�systems&&&&r�doctype�;TreeBuilderTest.test_doctype.<locals>.DoctypeParser.doctype�s��!%�f� 5��
rc��UO!rjrrs&rrZ�9TreeBuilderTest.test_doctype.<locals>.DoctypeParser.close�s���}�}�$rr)	rRrSrTrUrr!rZrVrWrXs@r�
DoctypeParserr�s�����H�
6�
%�
%rr%rQ�ruz&-//W3C//DTD XHTML 1.0 Transitional//ENz7http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd)rrWrYr�r�rZ)rFr%r^s&  r�test_doctype�TreeBuilderTest.test_doctype�sM��	%�	%����]�_��5�����D�L�L�!��������
H�	Irc	�"�QQ2o[OU2Q5QFDFoUO[U29^tt^2[OUU2Q5PPP2JH	[OU[Q5Q5QFD_o[OUU[Q5Q5oUOUO2UOUO22Ja	P!)%fhJ�9h)c�6`�\sQsQsnP\1QksQsQsUsP!)�BTreeBuilderTest.test_builder_lookup_errors.<locals>.RaisingBuilderi�c� �VmV mP!rj��raise_in�what)rFr.r/s&&&rr��KTreeBuilderTest.test_builder_lookup_errors.<locals>.RaisingBuilder.__init__�s�� (�
� �	rc�d�VO6XcUOUO2gQoU!)c��P!rjr)r*s*r�handle�^TreeBuilderTest.test_builder_lookup_errors.<locals>.RaisingBuilder.__getattr__.<locals>.handle�s��rr-)rFr�r3s&& r�__getattr__�NTreeBuilderTest.test_builder_lookup_errors.<locals>.RaisingBuilder.__getattr__�s)���=�=�(��)�)�D�M�M�2�2���
rr-)	rRrSrTrUrr�r5rVrWrXs@r�RaisingBuilderr+�s����(,�:�
!�
�
rr7rQ)r/)r|r;r�rqr�)	rrWr�rr�rYr�r�rZ)rFr7rVr^s&   r�test_builder_lookup_errors�*TreeBuilderTest.test_builder_lookup_errors�s���
	�
	�	���N�,��-�>�E��'�'�
�E�:�:����N�5�$9��:�;�:�?�	���N��?��@�>�E��\�\���N�)S�\�T�F��K�K����%����f�l�l�n�-�?�	;�:�:�s�C=	�=D
�D
r)rRrSrTrUr�rr�r�r�r�r�r�r�r�r�rrrrr'r8rVrWrXs@rr�r��sf����2�G�
2�G�+�*�(
;�
R�-�0"+�H'�'�
'�,�'�5�
5�I�".�.rr�c�X`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsUsP!)
�
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���UOUOQ2UOU]*OQ2UOU]*OQ2P!)rf�line�22)r�rlr�rs&&r�_check_sample_element�#XMLParserTest._check_sample_element�sF���������'�����1����6�*�����1����D�)rc���[OQ[O2Q5oUOUO2UOUO
22P!)r)r\rR)rrWr[rYr�r?rZ)rFr�s& r�test_constructor_args�#XMLParserTest.test_constructor_args�sE���,�,��&(�n�n�&6��8�����T�\�\�"��"�"�7�=�=�?�3rc��QQ[O2oU2oUOUO2UO	UO22P!)c��\sQsQsQsP!)�-XMLParserTest.test_subclass.<locals>.MyParseri�rr�rrr�MyParserrF�r�rrG)rrWrYr�r?rZ)rFrGr^s&  rr��XMLParserTest.test_subclass�s=��	�r�|�|�	�������D�L�L�!��"�"�6�<�<�>�2rc�0�[O29^tt^2[OQ[2[O2oUO
UO2UO2PPP2P!)%fhP!9h)�error)	�warnings�catch_warnings�simplefilter�DeprecationWarningrrWrYrrZr}s& r�test_doctype_warning�"XMLParserTest.test_doctype_warning�sU��
�
$�
$�
&�
&��!�!�'�+=�>��\�\�^�F��K�K����%��L�L�N�	'�
&�
&�
&�s�AB�B	�
B	c�``�PnU1QkQ[O2oU2oUO[Q29^tt^2UO	UO
2PPP2UO
2UOR2P9nn[O29^tt^2[OQ[2[OQ[2U1QkQ2oUU2Q5oUO	UO
2UO
2UOR2UORQ2PPP2P!)%fhK�9h)%fhP!9h)	Nc�0:`�\sQsQsnU1QksQsUsP!)�@XMLParserTest.test_subclass_doctype.<locals>.MyParserWithDoctypeic�:�V1nP!rjr)rFr*r+rs&*,�rr!�HXMLParserTest.test_subclass_doctype.<locals>.MyParserWithDoctype.doctypes
��� �>�rr�rRrSrTrUr!rVrW)rYrs@�r�MyParserWithDoctyperSs����
*�
*rrWr!rJc�0:`�\sQsQsnU1QksQsUsP!)�:XMLParserTest.test_subclass_doctype.<locals>.DoctypeParseric�:�VU1nP!rjr)rFr�rr �	_doctype2s&&&&�rr!�BXMLParserTest.test_subclass_doctype.<locals>.DoctypeParser.doctypes
���!%�f� 5�IrrrV)rYr[s@�rr%rYs����6�6rr%rQr&)
rrWr��RuntimeWarningrYrrZr�rKrLrMrNr�)rFrWr^r%rr[s&   @@r�test_subclass_doctype�#XMLParserTest.test_subclass_doctypes�����	*�"�,�,�	*�
%�&��
�
"�
"�>�9�
=�
=��K�K����%�>��������(�#�#�#��9�
�
$�
$�
&�
&��!�!�'�+=�>��!�!�'�>�:�
6�
6�
)�
��@�F��K�K����%��L�L�N����h�'����Y�L�
M�'�
&�
>�
=��'�
&�
&�s%�E�-B E*�E'	� E'	�*E;	�3E;	c�~�[O29^tt^2[OQ[2[OQ[2QQ[
O2oU2oUOUO2UO2PPP2P!)%fhP!9h)z:Ensure that ordinary usage is not deprecated (Issue 19176)rJc��\sQsQsQsP!)�DXMLParserTest.test_inherited_doctype.<locals>.MyParserWithoutDoctypei&rr�rrr�MyParserWithoutDoctyperb&s��rrc)
rKrLrMrNr]rrWrYrrZ)rFrcr^s&  r�test_inherited_doctype�$XMLParserTest.test_inherited_doctype!sr��
�
$�
$�
&�
&��!�!�'�+=�>��!�!�'�>�:�
����
�+�-�F��K�K����%��L�L�N�'�
&�
&�
&�s�BB+�+B<	�4B<	c�d�[O[O2Q5oUOUO2UO2oUO
UOQ2UO
UOQ*Q2UO
UOQ2P!)rQ�moneyr�u
$£€𐅻)
rrWr[rY�sample3rZr�rlr�r�r�s&  r�test_parse_string�XMLParserTest.test_parse_string,sw�����R�^�^�%5��6�����D�L�L�!��L�L�N���������(�������'�*�,C�D�������!8�9rr)rRrSrTrUr�rrhr?rBr�rOr^rdrirVrWrXs@rr;r;�sB����-�G��G�M�G�*�
4�3��M�<	�:�:rr;c�(`�\sQsQsnQsQsUsP!)�NamespaceParseTesti5c�H�QQQQ-o[O[2oUO[	UOQU22]2UO[	UOQU22]2UO[	UOQU22]2P!)�h�hellor]r	z{hello}tablez.//{hello}tdz.//{foo}name)rr��SAMPLE_XML_NS_ELEMSr�r�r�)rFr�r�s&  r�test_find_with_namespace�+NamespaceParseTest.test_find_with_namespace6s���g�s�E�*���m�m�/�0������S�[�[���?�@�!�D�����S�[�[���?�@�!�D�����S�[�[���?�@�!�Drr)rRrSrTrUrqrVrWrXs@rrlrl5s����E�Errlc�p`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsUsP!)�ElementSlicingTesti?c�F�STt,tFDp"OMJ	to!ttohrjrk)rF�elemlistrs&& r�
_elem_tags�ElementSlicingTest._elem_tags@s��'�(�x�!���x�(�(��(roc�8�UO[U22!rj)rwr�rss&&r�
_subelem_tags� ElementSlicingTest._subelem_tagsCs�����t�D�z�*�*rc��[OQ2o[U2FD o[OUQU*2J"	U!)zeCreate an Element with a tag 'a', with the given amount of children
named 'a0', 'a1' ... and so on.

r�za%s)rr�rrC)rF�numchildrenrr!s&&  r�_make_elem_with_children�+ElementSlicingTest._make_elem_with_childrenFs7��

�J�J�s�O���{�#�A��M�M�!�U�Q�Y�'�$��rc� `�UO]
2nUOR]*OQ2UORQ*OQ2UO[U1Qk2UO[U1Qk2P!)r��a1�a8c�:�R]*!)�r�rs�rr:�?ElementSlicingTest.test_getslice_single_index.<locals>.<lambda>Vs	���a��erc�:�RQ*!)r�i�rr�s�rr:r�Ws	���a��fr���)r~r�rlr��
IndexErrorrs&@r�test_getslice_single_index�-ElementSlicingTest.test_getslice_single_indexPsc����)�)�"�-������1����4�(�����2����D�)����*�m�4����*�n�5rc��UO]2oUOUOUQ*2,Q
N2UOUOUQ*2,Q
N2UOUOUQ*2,Q
N2UOUOUQ*2QQ,2UOUOU]P2QQ,2UOUOUQ*2QQ	,2P!)r�r��a3�a4:r�r�N:r��N:r�rpN:NrN�a0r�)r�r��a5)r~r�rwrs& r�test_getslice_range�&ElementSlicingTest.test_getslice_rangeYs����)�)�!�,���������2��/�1C�D��������3��0�2D�E��������4��1�3E�F��������3��0�4��,�?��������1�R��1�D�$�<�@��������2��/�$���>rc	�p�UO]
2oUOUOUQ*2QQ,2UOUOUQ*2,Q
N2UOUOUQ*2QQ,2UOUOUQ*2Q	Q,2UOUOU]P[O/*2Q,2UOUOU]P[O]@*/*2Q,2P!)r�:�r�r�r��a9:NNr�r�r�:NNr�:r�Nr�r�)r�r��a6r��r~r�rwry�maxsizers& r�test_getslice_steps�&ElementSlicingTest.test_getslice_stepscs����)�)�"�-���������6��3�d�D�\�B��������3��0�2J�K��������3��0�4��,�?��������4��1�D�$�<�@��������1�>�c�k�k�>�):�;�d�V�D��������1�+=�c�k�k�2�o�+=�)>�?�$��Hrc	�\�UO]2oUOUOUPPP/*2,QN2UOUOUPPQ/*2QQ,2UOUOU]P[O'/*2Q,2UOUOU]P[O']*
/*2Q,2UOUOU]P[O']@*/*2Q,2P!)rFr�r�)r��a2r�r�r�r�rs& r�test_getslice_negative_steps�/ElementSlicingTest.test_getslice_negative_stepsms����)�)�!�,���������4�R�4��1�3K�L��������4�R�4��1�D�$�<�@��������1�?�s�{�{�l�?�);�<�t�f�E��������1�+<�s�{�{�l�1�n�+<�)=�>���G��������1�+>�s�{�{�l�B�.>�+>�)?�@�4�&�Irc��UO]2oUQUOUOU2QQ,2UO]2oUQUOUOU2,2UO]2oUPPP/UOUOU2,2UO]2oUPPQ	/UOUOU2QQ,2UO]2oUQUOUOU2QQ,2UO]2oUQUOUOU2Q,2P!)
rFr�r�r�:rNNr�:r�Nr:NNrr�r�)r~r�rzrs& r�
test_delslice� ElementSlicingTest.test_delslicevsD���)�)�!�,��
�c�F�����+�+�A�.��t��=��)�)�!�,��
�b�E�����+�+�A�.��3��)�)�!�,��
�d��d�G�����+�+�A�.��3��)�)�!�,��
�d��d�G�����+�+�A�.��t��=��)�)�!�,��
�d�G�����+�+�A�.��t��=��)�)�!�,��
�c�F�����+�+�A�.���7rc��UO]2o[OQ2U]$UOUO	U2,QN2[OQ2UQ$UOUO	U2,QN2UO[29^tt^2[OQ2U]$PPP2UO[29^tt^2[OQ2UQ$PPP2UOUO	U2,QN2P!)%fhKs9h)%fhKH9h)rFr�r�r��r�r�r�r�r�)r�r�r�r����)r~rr�r�rzr�r�rs& r�test_setslice_single_index�-ElementSlicingTest.test_setslice_single_index�s����)�)�!�,���z�z�#���!������+�+�A�.�0G�H��
�
�3���"������+�+�A�.�0F�G�
�
�
�z�
*�
*��:�:�c�?�A�a�D�+�
�
�
�z�
*�
*��J�J�s�O�A�b�E�+�����+�+�A�.�0F�G�	+�
*��
*�
*�s$�&D*�$D=�*D:	�3D:	�=E
	�E
	c�j�UO]2o[]2Tt,tFDo[OQU*2MJ!	toUQ$UO	UOU2,QN2UO]2o[OQ2,UQ$UO	UOU2,QN2UO]2o[]2Tt,tFDo[OQU*2MJ!	toUQ$UO	UOU2,QN2P!ttohttoh)rF�b%s:r�r�Nr�)r��b0�b1r�)r�r�r�)r�r�r��b2r�)r~rrr�r�rz�rFrr!s&  r�test_setslice_range�&ElementSlicingTest.test_setslice_range�s����)�)�!�,��16�q��:��A�"�*�*�U�Q�Y�'��:��#������+�+�A�.�0H�I��)�)�!�,���*�*�S�/�"��#������+�+�A�.�0A�B��)�)�!�,��16�q��:��A�"�*�*�U�Q�Y�'��:��#������+�+�A�.�0N�O��;��;s�'D+�'D0c
���UO]2o[]2Tt,tFDo[OQU*2MJ!	toUQ$UO	UOU2,QN2UO]2oUO
[29^tt^2[OQ2,UQ$PPP2UO
[29^tt^2[]2Tt,tFDo[OQU*2MJ!	toUQ$PPP2UO
[29^tt^2,UQ$PPP2UO	UOU2,QN2UO]2o[OQ2,U]P[O/$UO	UOU2,QN2[OQ2,U]P[O]@*/$UO	UOU2,QN2P!ttoh)%fhCKw9httoh)%fhCK19h)%fhCK9h)	r�r�:r�rprr�r�)r�r�r�r�r�r�)r�r�r�r�r�r�r��r�r�r�r��
r~rrr�r�rzr�rryr�r�s&  r�test_setslice_steps�&ElementSlicingTest.test_setslice_steps�s����)�)�!�,��38��8�<�8�a�B�J�J�u�q�y�)�8�<��%������+�+�A�.�0T�U��)�)�!�,��
�
�
�z�
*�
*��
�
�3��(�A�e�H�+�
�
�
�z�
*�
*�7<�Q�x�@�x�!��
�
�5�1�9�-�x�@�A�e�H�+�
�
�
�z�
*�
*��A�e�H�+�����+�+�A�.�0T�U��)�)�!�,���Z�Z��_�-��!�.�S�[�[�.������+�+�A�.�0G�H�!#���C�� 1��!�
�S�[�[�"�_�
������+�+�A�.�0G�H��!=�+�
*�
*��A�+�
*�
*��
*�
*�
*�sM�'H �H%�
H>�)'H9�H>�;I�%H6	�.H6	�9H>�>I	�I	�I#	�I#	c
��UO]2o[]2Tt,tFDo[OQU*2MJ!	toU]]P/$UO	UOU2,QN2UO]2oUO
[29^tt^2[OQ2,U]]P/$PPP2UO
[29^tt^2[]2Tt,tFDo[OQU*2MJ!	toU]]P/$PPP2UO
[29^tt^2,U]]P/$PPP2UO	UOU2,QN2UO]2o[OQ2,U]P[O'/$UO	UOU2,QN2[OQ2,U]P[O']*
/$UO	UOU2,QN2[OQ2,U]P[O']@*/$UO	UOU2,Q	N2P!ttoh)%fhCK�9httoh)%fhCK�9h)%fhCKq9h)
rFr�r�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�=�H�q�R�Z�Z���	�*�H�=��!�A�b�&�	�����+�+�A�.�0H�I��)�)�!�,��
�
�
�z�
*�
*����C��)�A�a��"�f�I�+�
�
�
�z�
*�
*�8=�a��A��1����E�A�I�.��A�A�a��"�f�I�+�
�
�
�z�
*�
*��A�a��"�f�I�+�����+�+�A�.�0H�I��)�)�!�,�� �j�j��o�.��!�/�c�k�k�\�/������+�+�A�.�0G�H� "�
�
�3��0��!�
�c�k�k�\�!�^�
������+�+�A�.�0G�H�"$�*�*�S�/�!2��!�
�c�k�k�\�2�
�
������+�+�A�.�0G�H��%>�+�
*�
*��B�+�
*�
*��
*�
*�
*�sM�'J� J�"
J!�/'J�	J!�	J5�J	�J	�J!�!J2	�*J2	�5K	�>K	c��`�[OQ2oUO[29^tt^2Q[	]22UQ$PPP2UO[
29^tt^2PUQ$PPP2QnUO
[
Q29^tt^2U1Qk[	]22UQ$PPP2P!)%fhK~9h)%fhKf9h)%fhP!9h)rlc3�@�SF �Do]]*w�	J	P!3hr�rr�s& rr��IElementSlicingTest.test_issue123213_setslice_exception.<locals>.<genexpr>�s��(���(�Q�Q�q�S�S�(�r�:Nr�Nc��[Q2gr�r�rrrr]�AElementSlicingTest.test_issue123213_setslice_exception.<locals>.f�r�rr�c3�>:�SF �D
oR2w�	J	P!3hrjrr�s& �rr�r��s��(���(�Q�Q�S�S�(�r�)rr�r�r�rr�r�)rFrr]s& @r�#test_issue123213_setslice_exception�6ElementSlicingTest.test_issue123213_setslice_exception�s�����J�J�u���
�
�
�0�
1�
1�+�%��(�+�A�b�E�2��
�
�y�
)�
)��A�b�E�*�	)��
#�
#�I�{�
;�
;�+�%��(�+�A�b�E�<�
;�2�
1��*�
)��<�
;�
;�s5�C�/C�C&�C	�	C	�C#	�C#	�&C7	�/C7	r)rRrSrTrUrwrzr~r�r�r�r�r�r�r�r�r�r�rVrWrXs@rrtrt?sQ����)�+��6�?�I�J�8�2H�P�I�(I�,,�,rrtc�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQQ2sQsQsQsQsQsQsQsQsUsP!)�IOTesti�c�v�[OQ2oQUmUO[	U2Q2QFDkoUOU29^tt^2UO[	VQ5Q2UO[	VO
2Q5Q2PPP2Jm	QFD�oUOU29^tt^2UO[	VQ5QU*OU22UO
2oUO[	VQ5QU*OU22PPP2J�	[OQ2oQUmUO[	U2Q	2UO[	UQQ5Q
2UO[	UQQ5Q
2QFD5oUO[	VQ5QU*OU22J7	[OQ2oQUOQ$UO[	U2Q
2UO[	UQQ5Q2UO[	UQQ5Q2QFD5oUO[	VQ5QU*OU22J7	[OQ2oQUmUO[	U2Q2UO[	UQQ5Q2UO[	UQQ5Q2QFD5oUO[	VQ5QU*OU22J7	[OQ2oQUOQ$UO[	U2Q2UO[	UQQ5Q2UO[	UQQ5Q2QFD5oUO[	VQ5QU*OU22J7	P!)%fhCJ�9h)%fhCJ�9h)rlr�z<tag>abc</tag>rr*rPs<tag>abc</tag>z2<?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;" />)rr*)r+r3�utf-32)r+r3r5r4r�)	rr�r�r�rhr�upperr:r�)rFrc�encr�s&   rrq�IOTest.test_encoding�s����z�z�%� ����	�����4��*:�;�(�C����c�"�"�� � ��4�!>�)�+�� � ��4�)�)�+�!F�)�+�#�"�)�6�C����c�"�"�� � ��4�!>�*�,/�0�17����>��	�	���� � ��4�!@�*�,1�2�39�6�#�;�@�#�"�6��z�z�%� ����	�����4��*G�H�����4�'�:�.�	0�����4�*�=�.�	0�5�C����Y�t�:�3�58�9�:@�&��+�
G�6�
�z�z�%� ��&����E������4��*O�P�����4�'�:�6�	8�����4�*�=�6�	8�5�C����Y�t�:�<�>A�B�CI�6�#�;�
P�6�
�z�z�%� ��$��	�����4��*K�L�����4�'�:�>�	@�����4�*�=�8�	:�5�C����Y�t�:�1�36�7�8>��s��
E�6�
�z�z�%� ��-����E������4��*N�O�����4�'�:�A�	C�����4�*�=�;�	=�M�C����Y�t�:�6�8;�<�=C�V�C�[�
J�N�u#�"�"��#�"�"�s&�AP	�
A5P&	�P#
�P#
�&P8
�/P8
c�t�UO[O[2[O[O
Q22oUO[2[[Q29^tt^2oUOUO2Q2PPP2P!)%fhP!9h)�<site>ø</site>r��<site>&#248;</site>)r>rr?rrr@r�r`rUr�rV�rFrgr]s&  r�test_write_to_filename�IOTest.test_write_to_filename+so�����	�(�(�&�1��~�~�b�f�f�%<�=�>���
�
�6��
�&�$�
�
�1����Q�V�V�X�'A�B� �
�
�
�s�;!B&�&B7	�/B7	c�`�UO[O[2[O[O
Q22oUO[QQ5[[Q29^tt^2oUOUO2Q2PPP2UO[QQ5[[Q29^tt^2oUOUO2[Q22PPP2P!)%fhKs9h)%fhP!9h)r�rrPr��<site>ø</site>r�:<?xml version='1.0' encoding='ISO-8859-1'?>
<site>�</site>)r>rr?rrr@r�r`rUr�rVr<r�s&  r�$test_write_to_filename_with_encoding�+IOTest.test_write_to_filename_with_encoding2s������	�(�(�&�1��~�~�b�f�f�%<�=�>���
�
�6�G�
�,�
�&�$�
�
�1����Q�V�V�X�'C�D� �	
�
�
�6�L�
�1�
�&�$�
�
�1����Q�V�V�X�{�6�(7�
8� �
�	 �
�� �
�
�s$�=!D	�*D�	D	�D	�D-	�%D-	c�,�UO[O[2[	[Q29^tt^2oUO
oPPP2[O[2[O[OQ22oUO[QQ5[	[Q29^tt^2oUOUO2Q2PPP2P!)%fhK�9h)%fhP!9h)r�r�r[rPr�r�)r>rr?rrUr\rr@r�r`r�rV)rFr]r\rgs&   r�!test_write_to_filename_as_unicode�(IOTest.test_write_to_filename_as_unicode?s������	�(�(�&�1�
�&�#�
�
�!��z�z�H������ ��~�~�b�f�f�%<�=�>���
�
�6�I�
�.�
�&�$�
�
�1����Q�V�V�X�'?�@� �
�
�
�� �
�
�s#�
C/�!D�/C?	�8C?	�D	�D	c��UO[O[2[O[O
Q22o[[QQQ59^tt^2oUOUQQ5UOUO2PPP2[[Q29^tt^2oUOUO2Q2PPP2[[QQQQ	59^tt^2oUOUQQ5UOUO2PPP2[[Q29^tt^2oUOUO2Q
2PPP2[[QQQ59^tt^2oUOUQQ5UOUO2PPP2[[Q29^tt^2oUOUO2Q2PPP2P!)%fhCKy9h)%fhCKL9h)%fhCK9h)%fhK�9h)%fhK�9h)%fhP!9h)
r�r�rrPr[r�r�rd�xmlcharrefreplace)r\�errorsr�rs<site>�</site>�
r>rr?rrr@r�rUr`rrr�rVr�s&  r�test_write_to_text_file�IOTest.test_write_to_text_fileJs������	�(�(�&�1��~�~�b�f�f�%<�=�>��
�&�#��
0�
0�A��J�J�q�9�J�-����Q�X�X�&�1��&�$�
�
�1����Q�V�V�X�'C�D� ��&�#��8K�
L�
L�PQ��J�J�q�9�J�-����Q�X�X�&�M��&�$�
�
�1����Q�V�V�X�(B�C� ��&�#��
5�
5���J�J�q�9�J�-����Q�X�X�&�6��&�$�
�
�1����Q�V�V�X�'?�@� �
�1�
0�
0�� �
�
��M�
L�
L�� �
��6�
5�� �
�
�sl�(/H�7!H�;/H/�
!I�
/I�!I)�H	�H	�H,	�$H,	�/I	�8I	�I	�I	�I&	�I&	�)I:	�2I:	c�
�UO[O[2[O[O
Q22o[[Q29^tt^2oUOU2UOUO2PPP2[[Q29^tt^2oUOUO2Q2PPP2P!)%fhKS9h)%fhP!9h)r�r=r�r�r�r�s&  r�test_write_to_binary_file� IOTest.test_write_to_binary_file_s������	�(�(�&�1��~�~�b�f�f�%<�=�>��
�&�$�
�
�1��J�J�q�M����Q�X�X�&� ��&�$�
�
�1����Q�V�V�X�'A�B� �
� �
�� �
�
�s$�&-C�3!C1�C.	�'C.	�1D	�:D	c�z�UO[O[2[O[O
Q22o[[Q29^tt^2oUOUQQ5UOUO2PPP2[[Q29^tt^2oUOUO2Q2PPP2[[Q29^tt^2oUOUQQ5UOUO2PPP2[[Q29^tt^2oUOUO2Q2PPP2P!)%fhK�9h)%fhK�9h)%fhKy9h)%fhP!9h)r�r=rrPr�r�rr�r�r�s&  r�'test_write_to_binary_file_with_encoding�.IOTest.test_write_to_binary_file_with_encodinghs$�����	�(�(�&�1��~�~�b�f�f�%<�=�>��
�&�$�
�
�1��J�J�q�7�J�+����Q�X�X�&� ��&�$�
�
�1����Q�V�V�X�'C�D� ��&�$�
�
�1��J�J�q�<�J�0����Q�X�X�&� ��&�$�
�
�1����Q�V�V�X�6�
7� �
� �
�� �
�� �
�� �
�
�sH�&/E0�5!F�6/F�!F)�0F	�9F	�F	�F	�F&	�F&	�)F:	�2F:	c��UO[O[2[O[O
Q22o[[Q29^tt^2oUOUQQ5UOUO2PPP2[[Q29^tt^2oUOUO2QOQ22PPP2[[Q]Q59^tt^2oUOUQQ5UOUO2PPP2[[Q29^tt^2oUOUO2QOQ22PPP2P!)%fhCK9h)%fhK�9h)%fhK�9h)%fhP!9h)r�r=r3rPr�u7<?xml version='1.0' encoding='utf-16'?>
<site>ø</site>)�	buffering)r>rr?rrr@r�rUr`rrr�rVr:r�s&  r�"test_write_to_binary_file_with_bom�)IOTest.test_write_to_binary_file_with_bomysA�����	�(�(�&�1��~�~�b�f�f�%<�=�>��
�&�$�
�
�1��J�J�q�8�J�,����Q�X�X�&� ��&�$�
�
�1����Q�V�V�X�,�,2�F�8�,<�
>� �
�&�$�!�
,�
,���J�J�q�8�J�,����Q�X�X�&�-��&�$�
�
�1����Q�V�V�X�,�,2�F�8�,<�
>� �
� �
�
�� �
��
-�
,�� �
�
�sH�&/F�50F$�/F7�0G
�F!	�F!	�$F4	�-F4	�7G	�G	�
G	�G	c���[O2o[OQ2oUO	U2UOUO
2OQ2P!�z"<?xml version="1.0"?><site></site>�site)rr@r]r_rSr�r�rl�rFrgr\s&  r�test_read_from_stringio�IOTest.test_read_from_stringio�sE���~�~������E�F���
�
�6���������+�+�V�4rc���[O[OQ22o[O2oUOUQQ5UO
UO2Q2P!�r�r[rP)rr@r�r]r_r`r�rar�s&  r�test_write_to_stringio�IOTest.test_write_to_stringio�sM���~�~�b�f�f�%<�=�>��������
�
�6�I�
�.�������*�,C�Drc���[O2o[OQ2oUO	U2UOUO
2OQ2P!�s"<?xml version="1.0"?><site></site>r�)rr@r]r^rSr�r�rl�rFrgr�s&  r�test_read_from_bytesio�IOTest.test_read_from_bytesio�sD���~�~����j�j�B�C���
�
�3���������+�+�V�4rc���[O[OQ22o[O2oUOU2UO
UO2Q2P!�r�r�)rr@r�r]r^r`r�rar�s&  r�test_write_to_bytesio�IOTest.test_write_to_bytesio�sG���~�~�b�f�f�%<�=�>���j�j�l���
�
�3���������)C�Drc��\sQsQsQsP!)�IOTest.dummyi�rr�rrr�dummyr��s��rr�c��[OQ2oUO2oUOUm[O2oUO
U2UOUO2OQ2P!r�)
r]r_r�rVrr@rSr�r�rl)rFr\�readerrgs&   r�test_read_from_user_text_reader�&IOTest.test_read_from_user_text_reader�s[�����E�F��������k�k����~�~����
�
�6���������+�+�V�4rc�*�[O[OQ22o[O2oUO2oUOUmUO
UQQ5UOUO2Q2P!r�)	rr@r�r]r_r�r`r�ra)rFrgr\�writers&   r�test_write_to_user_text_writer�%IOTest.test_write_to_user_text_writer�sc���~�~�b�f�f�%<�=�>�������������|�|����
�
�6�I�
�.�������*�,C�Drc�<�[OQ2oUO2oUOUm[O2oUO
U2UOUO2OQ2[O2oP!r�)
r]r^r�rVrr@rSr�r�rl)rFr�r�rgs&   r�!test_read_from_user_binary_reader�(IOTest.test_read_from_user_binary_reader�sg���j�j�B�C��������h�h����~�~����
�
�6���������+�+�V�4��~�~��rc�&�[O[OQ22o[O2oUO2oUOUmUO
U2UOUO2Q2P!r�)	rr@r�r]r^r�r`r�ra�rFrgr�rs&   r� test_write_to_user_binary_writer�'IOTest.test_write_to_user_binary_writer�s^���~�~�b�f�f�%<�=�>���j�j�l��������y�y����
�
�6���������)C�Drc�z�[O[OQ22o[O2oUO2oUOUmQUmUOUmUO
UQQ5UOUO2QOQ22P!)z<site />c��P	!r�rrrrr:�BIOTest.test_write_to_user_binary_writer_with_bom.<locals>.<lambda>�s��$rr3rPz0<?xml version='1.0' encoding='utf-16'?>
<site />)rr@r�r]r^r�r`�seekable�tellr�rar:rs&   r�)test_write_to_user_binary_writer_with_bom�0IOTest.test_write_to_user_binary_writer_with_bom�s����~�~�b�f�f�^�4�5���j�j�l��������y�y���&����h�h����
�
�6�H�
�-���������%�v�h�/�	1rc	�V�[OQ2oUO[OUQ2PO	[OUQ222UO[OUQ2QO	[OUQ222P!)z<tag>foo</tag>r[r3r)rr�r�r9rgrhr�s& r�test_tostringlist_invariant�"IOTest.test_tostringlist_invariant�sy���}�}�-�.������K�K��i�(��G�G�B�O�O�D�)�4�5�	7�	
����K�K��h�'��H�H�R�_�_�T�8�4�5�	7rc��[OQ2oUO[OUQ2Q2UO[OUQP	Q5Q2UO[OUQP
Q5Q2P!)z<tag>a<x />b<y></y>c</tag>r[z<tag>a<x />b<y />c</tag>)�short_empty_elementsz<tag>a<x></x>b<y></y>c</tag>)rr�r�r9r�s& r�test_short_empty_elements� IOTest.test_short_empty_elements�sz���}�}�9�:������K�K��i�(�&�	(�	
����K�K��i�d�K�C�&�	(�	
����K�K��i�e�K�D�*�	,rr)rRrSrTrUrqr�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrVrWrXs@rr�r��s~����CJ�JC�8�	A�A�*C�7�">�(5�E�5�E�
�
�5�E� �E�
1�7�
,�
,rr�c�:`�\sQsQsnQsQsQsQsQsUs	P!)�ParseErrorTesti�c�X�UO[O2[2P!rj)r�rrlrers&rr��ParseErrorTest.test_subclass�s�����b�m�m�o�{�;rc�|�[OU2P![Oc
oStPo=!Po=hh9hrj)rr�rl)rFrGrs&& r�
_get_error�ParseErrorTest._get_error�s,��	��M�M�!����}�}�	��H��	�s��;�;�6�;�;c�
�UOUOQ2OQ2UOUOQ2OQ2UOUOQ2OQ2P!)r	z<tag>&foo;</tag>zfoobar<)r�r)r�rp)r�r�)r�r�positionrs&r�test_error_position�"ParseErrorTest.test_error_position�s`���������/�8�8�&�A�������);�<�E�E�v�N��������3�<�<�f�Erc��]PHGtGtGoUO	UOQ2OUOUO*2P!)rr	)	�xml.parsers.expat.errors�parsers�expatr�r�r�code�codes�XML_ERROR_SYNTAX)rF�ERRORSs& r�test_error_code�ParseErrorTest.test_error_code�s9��1�1��������/�4�4����V�4�4�5�	7rr)
rRrSrTrUr�rr!r+rVrWrXs@rrr�s����<��F�
7�7rrc�(`�\sQsQsnQsQsUsP!)�KeywordArgsTestic�T�[OQ2oUOUOQP2UOQPQ52UOUO	QPP2UO	QPPQ52UOUOQP2UOQPQ52UO[
UOQP22[
UOQPQ522UO[OQ2O-2[OQ[QQQ52[OQ[QQQ5Q5[OQ[QQ5QQ	5[OQQQQ5[OQ[QQQ5QQQ5[OQ[QQQ52[OQ[QQ5QQ	5[OQ[QQQ5Q5,oSFDFoUOUOQ2UOUO[QQQ52JH	[OU]*Q
QQ-Q5oUOUOQ*Q2[OU]*Q
[QQ-2Q5oUOUOQ*Q2Q
oUO[U29^tt^2[OQQ2PPP2UO[U29^tt^2[OQQQ5PPP2P!)%fhKP9h)%fhP!9h)z
<a>foo</a>r�)�pathr�)r0r.r��#r	)r�r�r@)r�)r�r��key1�value1z#must be dict or frozendict, not strzI'm not a dict)rr�r�r�r�r�r�r�r�r�r~�
frozendictrlrCr�r�)rFr��elementsrr)r*�errmsgs&      r�test_issue14818�KeywordArgsTest.test_issue14818s����F�F�<� ���������T�*����S�T��:�	<�������C��t�4�����d�t��L�	N�������3��-�������=�	?�����a�j�j��d�3�4��a�j�j�c�d�j�C�D�	F�	
������C��/�/��4��J�J�s�D�c�e�4�5��J�J�s�4�S�U�#;�J�<��J�J�s�D�c�N�u�J�5��J�J�s���J�/��J�J�s�D�c�e�4�3�5�J�I��J�J�s�J�C�E�:�;��J�J�s�J�C�0�U�J�;��J�J�s�:�3�5�#A�J�B�	
���A����Q�U�U�C�(����Q�X�X�t���'?�@���]�]�8�A�;��&�(�9K�]�
L��������6�*�H�5�
�]�]�8�A�;��",�f�h�-?�"@��B��������6�*�H�5�6��
�
#�
#�I�v�
6�
6��J�J�s�,�-�7�
�
#�
#�I�v�
6�
6��J�J�s�#3�J�4�7�
6�7�
6��
6�
6�
6�s$�$N�!N�N	�N	�N'	�N'	r)rRrSrTrUr7rVrWrXs@rr.r.s����$5�$5rr.c�8`�\sQsQsn\Q2sQsQsUsP!)�NoAcceleratorTesti+c�P�[[Ic[OQ2gP!)zonly for the Python version)rrr��SkipTestrts&rru�NoAcceleratorTest.setUpClass,s ��
�T�>��#�#�$A�B�B�rc���UO[OO[O
2UO[OO[O
2P!rj)r�rr�r��types�FunctionTyperWrs&r�test_correct_import_pyET�*NoAcceleratorTest.test_correct_import_pyET2sD��	
���d�l�l�3�3�U�5G�5G�H����d�n�n�5�5�u�7I�7I�Jrr)	rRrSrTrUr�rurArVrWrXs@rr:r:+s%�����C��C�
K�Krr:c�(`�\sQsQsnQsQsUsP!)�BoolTesti;c��[OQ2oQoUO[U29^tt^2[	U2oPPP2UOWP
2[O
UQ2UO[U29^tt^2[	U2oPPP2UOWP	2P!)%fhK~9h)%fhK79h)z<a style="new"></a>z�Testing an element's truth value will always return True in future versions.  Use specific 'len\(elem\)' or 'elem is not None' test instead.r�)rr�r�rN�boolr�rC)rFrr�r��
new_results&    r�test_warning�BoolTest.test_warning<s����M�M�/�0��
N�	��
"�
"�#5�s�
;�
;��!�W�F�<�	
�
�
�f�e�$�	�
�
�a���
�
"�
"�#5�s�
;�
;��a��J�<��
�
�j�$�'�<�
;��<�
;�s#�B9�C�9C		�C		�C	�C	r)rRrSrTrUrHrVrWrXs@rrDrD;s����(�(rrDc�4�[OU1-U@!rj)r�canonicalize)r'res&,r�c14n_roundtriprLOs�����S�,�G�,�,rc�8`�\sQsQsnPsQsQsQsQsUs	P!)�C14NTestiSc�>�UO[Q2Q2UO[Q2Q2UO[Q2Q2UO[Q2Q2UO[Q2Q	2UO[Q
2Q2UO[Q2Q
2UO[Q2Q2UO[Q2Q2UO[Q2Q2UO[Q2Q2UO[Q2Q2QoUO[U2U2QoUO[U2U2QoUO[U2U2P!)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>)r�rL�rFr's& r�test_simple_roundtrip�C14NTest.test_simple_roundtripYs��������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�2rc	�(�[OQ2oUO[UP	Q5Q2UO[UP	Q,Q5Q2UO[UP	Q,Q5Q2UO[UP	Q,Q,Q	5Q
2UO[UP	QQ,Q5Q
2UO[UQQ,Q5Q2UO[UP	QQ,Q5Q2UO[UQQ,Q5Q2P!)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>
        )�
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)rT�
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)rT�exclude_tagszb<root><a xmlns:x="http://example.com/x" x:attr="attrx"><b>abtext</b></a><b>btext</b><c></c></root>)rTrUrVz4<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>)rVza<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>)r�r�r�rLrPs& r�test_c14n_exclusion�C14NTest.test_c14n_exclusion�sA���o�o�
�

��	
����3�4�0�
�	�	
����3�4�@\�?]�^�
�	�	
����3�4�?X�>Y�Z�
�	�	
����3�4�@\�?]�)B�(C�
E�
�	�	
����3�4�s�C�j�I�
�	�
	
����3�c�3�Z�8�
�	�	
����3�4�?X�Z]�>^�_�
�	�	
����3�.G��-M�N�
�
	rc�Z�[QQQ5o[[OOU2o[[OU22Tt,tFD!oUOQ2%fJUPQ(MJ#	ooSTt,tFDoUOQ2%fJUMJ 	ooSTTt-tFD�oUOQ2%fJS[OUU2Q*2O2Tt-tFDJoUOOQ2P*UO9%fPO2U1aJL	toaJ�	oooSTTt-tFDsoSSTt,tFDaoUOQUQ02%fJ UO!Q]2P*U7fJ@V7UO!Q]2P**1MJc	toaJu	o	ooSO#][%U	O'2T
Tt,tFDo
S
FDoUMJ	J	too
22Q)Q	koU	O)2FCD�vq�S
FCD�vq�UU
Q
2Q6HoUU
Q2Q6HoUU
Q
2Q6HoQU
7c�U
Q*]*O+Q2Tt,tFD)oQUO-Q2QUO-Q20MJ+	ooU
Q*]*O+Q2Tt,tFD)oQUO-Q2QUO-Q20MJ+	ooLP9ooQO	Q[U
O)2222oUO/UQUQ029^tt^2UQ6XcU%fUO1QU02UQ6XcU%fUO1QU02QU
7c7U
Q*]*O3Q2dUO1QU02UUQ*2oUQ6Xc�[5UQ2Q 29^tt^2o[5UQ 29^tt^2o[6O8UO;2O=Q!UO;222oPPP2PPP2[O?UUUUUUQ"5o[5UUQ*2Q#Q$Q%59^tt^2oUO;2oUQ&6Xc%UO=Q'P2oUO=Q'P2oPPP2UO#WU2PPP2CJ�	CJ�	P!ttohttohttohttoohttohttoohttoo
httohttoh)%fhK�9h)%fhK�9h)%fhK�9h)%fhCJh9h)*zc14n-20rrz.xml�in�c14n�}�out_rkc�8�UOVQ12]*!)rr)r�)�config�option_namer.s&&&r�
get_option�+C14NTest.test_xml_c14n2.<locals>.get_option�s���:�:�k�R�=�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�,c3��SF �D1vovq#SQS9%fQOQU220w�	J3	P!3h)�=rlc3�p�SF �D'pOOQ2P*w�	J)	P!3h)r\)rl�split)r�r�s& rr��4C14NTest.test_xml_c14n2.<locals>.<genexpr>.<genexpr>s#��h���h������C�0@��0D�0D�h�s�/6)rg)r�r�r�r�s&   rr��*C14NTest.test_xml_c14n2.<locals>.<genexpr>sA��3I���3I�/��/�u��f�A�e�W�W�s�x�x�/W�h�/W�'W�X�Y�3I�s
�A�#A�(�)�
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.txtr�s&ent2;)�	from_file�
with_commentsrT�rewrite_prefixes�qname_aware_tags�qname_aware_attrs�rrrP�inC14N3z attr="default"r�rj) r	rr8r0rgr:�listdir�endswith�
startswithrrSr�rlrpr�r��rsplitr�r��valuesr�r�r�rr�r�rUr]r^rVr7rK)rF�datadir�	full_pathr7�files�input_files�option�configs�
input_file�tests�output_files�output_filerar_�
keep_commentsrTrzr��qattrs�qtags�config_descrr]�entity_filer�r�s&                        r�test_xml_c14n2�C14NTest.test_xml_c14n2�s����9�]�;���B�G�G�L�L�'�2�	�/5�b�j�j��6I�/J�/�/J�8��%�%�f�-���#�2��/J��/�&+�
�%*���"�"�4�(�
�H�U�	�
�"�

�"���"�"�6�*�

�H�!�h�h�y��':�V�'C�D�L�L�N��O�F��
�
� � ��%�b�)�V�[�[�->�->�B�,E�,E�,G��+P�P�N��
�
"�
	�
�"*�
�*�
�

� %�� %�H��&�&��j�\��';�<�A��O�O�C��+�B�/�7�:�A��8�?�?�3��#:�2�#>�?�@� %��
�*�	�
�	
����S�,1�L�L�N�"-�,:�L�+��
�+�
�N�"-�.�	/�	=�).���
�
�$�J�'3�#�� *��,�!.�17�!8�
�'��O�-�06�7�
�#-��O�$-�0<�$=� ��6�)�#)��"6�q�"9�"A�"A�M�#O��#O�B��R�V�V�D�\�N�"�R�V�V�F�^�,<�=�#O���#)��"6�q�"9�"A�"A�G�#I��#I�B��R�V�V�D�\�N�"�R�V�V�F�^�,<�=�#I���E�&*�)�E�F� #�x�x�(�39�&�,�,�.�3I�(� ��
�\�\�[�M��<�.��"B�C�C�!�\�1�:J��
�
�P�Q\�P]�^�`�!�%6�6�?O��
�
�P�Q\�P]�^�`�#�v�-�&��2F�q�2I�2N�2N�L�3N�UY�3Z��
�
�P�Q\�P]�^�`�"�*�v�"5�6�A�!�Y�.�!�)�K�"8�$�?�?�;�!%�a����!�$&�J�J�q�v�v�x�/?�/?�	�;�K[�K[�K]�/^�$_��"/�@��?�?�"#�&3�#-�)9�).�&�+�J�D��i��f�(<�=�s�V�T�T�XY�#$�6�6�8��%��2�'/�'7�'7�8I�2�'N�H�#'�<�<�0A�2�#F�D�U��$�$�X�t�4�AD�C�7(4�)6��E/��
��
��
����
��"-�� ��
�<"/���@�?��U�T��5D�C�C�s�T/�3	T/�T4�!T4�-T>�
2T>�?:T9�:T9�T>�U	�*U�U�.%U�U	�U�1U�&1U�+V
�3V
�;V
�V
�V
�9!V
�)V
�V
�U2�4AU�7U2�?AV
�V�$V�V
�9T>�U	�U/�(U/�*U2�2V�;V�=V
�V�V�V
�V*�!V*r)
rRrSrTrU�maxDiffrQrWr�rVrWrXs@rrNrNSs#�����G�
&3�PG�`b5�b5rrNc�(`�\sQsQsnQsQsUsP!)�
TestModulei8c���UO[Q29^tt^2o[[Q2PPP2UO	WO
[2P!)%fhK29h)z='VERSION' is deprecated and slated for removal in Python 3.20�VERSION)r�rN�getattrrr�r7r8rs& r�test_deprecated_version�"TestModule.test_deprecated_version9sP��
�
"�
"��K�
�
����I�&�	
�
	
������h�/�
�
�s�A�A+	�$A+	r)rRrSrTrUr�rVrWrXs@rr�r�8s����0�0rr�c��[QQ,Q5rUe[oUrQo[OU2]QHGo[OOoUO2o[OUOU2[OUO2UOo[O[UQU2UO2Um[[Q2%c\[O[O [O"2o[O[O,UN3P!P!)rJrL)�blockedc��P9rrP!rjrrrr�cleanup�setUpModule.<locals>.cleanupQs�����TrrCr�_set_factories)r
rrr��addModuleCleanuprErDrK�_namespace_mapr&r)r�r�setattrr�r�rrr�)�moduler�rDr��
nsmap_copyr�
old_factoriess&      r�setUpModuler�Ds����6�(6�'7�9�D�
�~���
�B��
���g�&�&��!�!�0�0�E�����J����e�l�l�J�7����e�k�k�*��#�#�J����g�{�H�j�I�#���*�K���r�#�$�$��)�)�"�*�*�b�e�e�<�
��!�!�"�"3�"3�D�m�D�%r�__main__)Tr[rj)]r&r0rur]r�r�r8rzr�ryr�r?r��
unittest.mockrrKr��
contextlibrrrrr-r�test.supportrrr	r
rr�test.support.import_helperr
�test.support.os_helperrrrrr:�UnicodeEncodeErrorr<rTr�rr_r�rprr�r�rr$r4r<�TestCaser>rhrnrqr�rrMr��format�escaper�r�rr�r�r�r�r�r�r�r2rYr�r�r;rlrtr�rr.r:rDrLrNr�r�rR�mainrrr�<module>r�s-�����	���	�
��
�������"��%��"�(�C�C�:�)���	���,�}�=��A����'�"��_�]�C���3�M�J���
����
���"�
������E��%��4�
L��"�"�
L��&�=�=�@BP�h�'�'�BP�J$P�H�%�%�P�fn9��)�)�n9�f	��������	������!����������������������F�4�;�;�~�t�,�-�
	���	'��	"�#�����X����X����	����	����	��p7�8�$�$�p7�lm?�x� � �m?�hN���(9�(9�N�`M$�_�h�&7�&7�M$�`
��
�
�s�
��S��O��(�*;�*;�O�d5.�(�+�+�5.�pU:�h�'�'�U:�pv(�h�'�'�v(�rt.�h�'�'�t.�nQ:�H�%�%�Q:�hE��*�*�E�d,��*�*�d,�LC,�X�
�
�C,�L7�X�&�&�7�*'5�h�'�'�'5�VK��)�)�K� (�x� � �(�(-�`5�x� � �`5�J0��"�"�0�"E�J�z���M�M�O���wY�A�
�
�
�?�
@�@�A�s�N�N�N

Youez - 2016 - github.com/yon3zu
LinuXploit