Ë
    þ)f½  ã                   ó¢  — d Z dZddlZddlZddlZddlZddlZddlmZ ddl	m
Z
mZmZmZmZmZmZmZmZ ddlmZmZmZ eZ	 ddlmZ dZ	 ddlZdZ	 ddlZdZ ejB                  jD                  Z"dZ# G d„ de$«      Z% G d„ de$«      Z& G d„ de&«      Z' G d„ de&«      Z( G d„ de'«      Z)y# e$ r d	ZY Œgw xY w# e$ r d	ZY Œmw xY w# e$ r d	Z d
Z"Y Œ_w xY w)zHelper classes for tests.ÚMITé    N)ÚBeautifulSoup)	ÚCharsetMetaAttributeValueÚCommentÚContentMetaAttributeValueÚDoctypeÚPYTHON_SPECIFIC_ENCODINGSÚSoupStrainerÚScriptÚ
StylesheetÚTag)ÚDetectsXMLParsedAsHTMLÚHTMLParserTreeBuilderÚXMLParsedAsHTMLWarning)ÚSelectorSyntaxErrorTF)r   u-
  A bare string
<!DOCTYPE xsl:stylesheet SYSTEM "htmlent.dtd">
<!DOCTYPE xsl:stylesheet PUBLIC "htmlent.dtd">
<div><![CDATA[A CDATA section where it doesn't belong]]></div>
<div><svg><![CDATA[HTML5 does allow CDATA sections in SVG]]></svg></div>
<div>A <meta> tag</div>
<div>A <br> tag that supposedly has contents.</br></div>
<div>AT&T</div>
<div><textarea>Within a textarea, markup like <b> tags and <&<&amp; should be treated as literal</textarea></div>
<div><script>if (i < 2) { alert("<b>Markup within script tags should be treated as literal.</b>"); }</script></div>
<div>This numeric entity is missing the final semicolon: <x t="pi&#241ata"></div>
<div><a href="http://example.com/</a> that attribute value never got closed</div>
<div><a href="foo</a>, </a><a href="bar">that attribute value was closed by the subsequent tag</a></div>
<! This document starts with a bogus declaration ><div>a</div>
<div>This document contains <!an incomplete declaration <div>(do you see it?)</div>
<div>This document ends with <!an incomplete declaration
<div><a style={height:21px;}>That attribute value was bogus</a></div>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">The doctype is invalid because it contains extra whitespace
<div><table><td nowrap>That boolean attribute had no value</td></table></div>
<div>Here's a nonexistent entity: &#foo; (do you see it?)</div>
<div>This document ends before the entity finishes: &gt
<div><p>Paragraphs shouldn't contain block display elements, but this one does: <dl><dt>you see?</dt></p>
<b b="20" a="1" b="10" a="2" a="3" a="4">Multiple values for the same attribute.</b>
<div><table><tr><td>Here's a table</td></tr></table></div>
<div><table id="1"><tr><td>Here's a nested table:<table id="2"><tr><td>foo</td></tr></table></td></div>
<div>This tag contains nothing but whitespace: <b>    </b></div>
<div><blockquote><p><b>This p tag is cut off by</blockquote></p>the end of the blockquote tag</div>
<div><table><div>This table contains bare markup</div></table></div>
<div><div id="1">
 <a href="link1">This link is never closed.
</div>
<div id="2">
 <div id="3">
   <a href="link2">This link is closed.</a>
  </div>
</div></div>
<div>This document contains a <!DOCTYPE surprise>surprise doctype</div>
<div><a><B><Cd><EFG>Mixed case tags are folded to lowercase</efg></CD></b></A></div>
<div><ourâ˜ƒ>Tag name contains Unicode characters</ourâ˜ƒ></div>
<div><a â˜ƒ="snowman">Attribute name contains Unicode characters</a></div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
c                   óN   — e Zd Zed„ «       Zd„ Zd„ Zd
d„ZeZd„ Z	dd„Z
d„ Zd	„ Zy)ÚSoupTestc                 ó   — t         S ©N)Údefault_builder©Úselfs    úO/var/www/html/flask-app/venv/lib/python3.12/site-packages/bs4/tests/__init__.pyr   zSoupTest.default_builder^   s   € äÐó    c                 óV   — |j                  d| j                  «      }t        |fd|i|¤ŽS )z*Build a Beautiful Soup object from markup.Úbuilder)Úpopr   r   )r   ÚmarkupÚkwargsr   s       r   ÚsoupzSoupTest.soupb   s-   € à—*‘*˜Y¨×(<Ñ(<Ó=ˆÜ˜VÑ?¨WÐ?¸Ñ?Ð?r   c                 óD   —  | j                   di |¤Žj                  |«      S )z[Turn an HTML fragment into a document.

        The details depend on the builder.
        © )r   Útest_fragment_to_document)r   r   r   s      r   Údocument_forzSoupTest.document_forg   s%   € ð
 $ˆt×#Ñ#Ñ- fÑ-×GÑGÈÓOÐOr   Nc                 ób  — | j                   }t        ||¬«      }|€|}|j                  «       | j                  |«      k(  sJ ‚t	        d„ t        |j                  j                  «       «      D «       «      sJ ‚|j                  g|j                  D �cg c]  }|j                  ‘Œ c}k(  sJ ‚yc c}w )ziParse some markup using Beautiful Soup and verify that
        the output markup is as expected.
        )r   Nc              3   ó&   K  — | ]	  }|d k(  –— Œ y­w)r   Nr"   )Ú.0Úvs     r   ú	<genexpr>z'SoupTest.assert_soup.<locals>.<genexpr>   s   è ø€ ÒE˜A�1�a•4ÑEùs   ‚)r   r   Údecoder$   ÚallÚlistÚopen_tag_counterÚvaluesÚROOT_TAG_NAMEÚtagStackÚname)r   Úto_parseÚcompare_parsed_tor   ÚobjÚxs         r   Úassert_soupzSoupTest.assert_soupn   sœ   € ð ×&Ñ&ˆÜ˜H¨gÔ6ˆØÐ$Ø (Ðð �z‰z‹|˜t×0Ñ0Ð1BÓCÒCÑCô ÑE¤ c×&:Ñ&:×&AÑ&AÓ&CÓ!DÔEÔEÑEð ×!Ñ!Ð"°s·|±|Ö&D°! q§v£vÒ&DÒDÑDÐDùÒ&Ds   ÂB,c                 óv   — d}|j                   D ](  }|r"||j                  k(  sJ ‚||j                  k(  sJ ‚|}Œ* y)zyEnsure that next_element and previous_element are properly
        set for all descendants of the given element.
        N)ÚdescendantsÚnext_elementÚprevious_element)r   ÚelementÚearlierÚes       r   ÚassertConnectednesszSoupTest.assertConnectedness‡   sH   € ð ˆØ×$Ñ$ò 	ˆAÙØ˜G×0Ñ0Ò0Ñ0Ø !×"4Ñ"4Ò4Ñ4Ø‰Gñ		r   c           	      ó¦  — d}|j                   €Š|j                  �"J dj                  ||j                  d«      «       ‚|j                  �"J dj                  ||j                  d«      «       ‚|j                  �"J dj                  ||j                  d«      «       ‚d}d}d}t        |j                  «      dz
  }|j                  D �]h  }d}|dk(  rœ|j                   ��¶|j                  |u s"J dj                  ||j                  |«      «       ‚|j                  |u s"J dj                  ||j                  |«      «       ‚|j                  ��IJ dj                  ||j                  d«      «       ‚|j                  |j                  |dz
     u s2J d	j                  ||j                  |j                  |dz
     «      «       ‚|j                  |dz
     j                  |u sBJ d
j                  |j                  |dz
     |j                  |dz
     j                  |«      «       ‚|�u|j                  |u s7J dj                  ||j                  ||j                   j                  «      «       ‚|j                  |u s"J dj                  ||j                  |«      «       ‚t        |t        «      rL|j                  r@| j                  |d«      }|j                  �"J d
j                  ||j                  d«      «       ‚|�|}n|}||k(  r.|j                  �"J d
j                  ||j                  d«      «       ‚|dz  }�Œk |�|n|}|€|}|s–|�”|}	 |€0|j                  �"J dj                  ||j                  d«      «       ‚	 y|j                  �F|j                  |j                  u s,J dj                  ||j                  |j                  «      «       ‚	 y|j                   }Œ‘|S )z.Ensure proper linkage throughout the document.Nz3Bad previous_element
NODE: {}
PREV: {}
EXPECTED: {}z3Bad previous_sibling
NODE: {}
PREV: {}
EXPECTED: {}z/Bad next_sibling
NODE: {}
NEXT: {}
EXPECTED: {}r   é   z/Bad next_element
NODE: {}
NEXT: {}
EXPECTED: {}z2Bad previous_sibling
NODE: {}
PREV {}
EXPECTED: {}z1Bad previous_sibling
NODE: {}
PREV {}
EXPECTED {}z-Bad next_sibling
NODE: {}
NEXT {}
EXPECTED {}z=Bad previous_element
NODE: {}
PREV {}
EXPECTED {}
CONTENTS {}z-Bad next_element
NODE: {}
NEXT {}
EXPECTED {}T)Úparentr:   ÚformatÚprevious_siblingÚnext_siblingÚlenÚcontentsr9   Ú
isinstancer   Úlinkage_validator)	r   ÚelÚ_recursive_callÚ
descendantÚidxÚchildÚ
last_childÚlast_idxÚtargets	            r   rH   zSoupTest.linkage_validator’   s8  € àˆ
ð �9‰9ÐØ×&Ñ&Ð.ð ØH×OÑOØ˜×+Ñ+¨Tóôð ×&Ñ&Ð.ð ØH×OÑOØ˜×+Ñ+¨Tóôð —?‘?Ð*ð ØD×KÑKØ˜Ÿ™¨óôð
 ˆØˆØˆ
Ü�r—{‘{Ó# aÑ'ˆØ—[‘[ó >	ˆEØˆJð �aŠxØ—9‘9Ñ(ØŸ?™?¨eÑ3ð ØK×RÑRØ §¡°óôð !×1Ñ1°RÑ7ð ØO×VÑVØ! 5×#9Ñ#9¸2óôð !×1Ñ1Ñ9ð ØN×UÑUØ! 5×#9Ñ#9¸4óôð ×-Ñ-°·±¸SÀ1¹WÑ1EÑEð ØJ×QÑQØ˜u×5Ñ5°r·{±{À3ÈÁ7Ñ7Kóôð —{‘{ 3¨¡7Ñ+×8Ñ8¸EÑAð ØF×MÑMØŸ™ C¨!¡GÑ,¨b¯k©k¸#À¹'Ñ.B×.OÑ.OÐQVóôð
 Ð)Ø ×1Ñ1°ZÑ?ð Ø[×bÑbØ! 5×#9Ñ#9¸:ÀuÇ|Á|×G\ÑG\óôð &×2Ñ2°eÑ;ð ØJ×QÑQØ&¨
×(?Ñ(?Àóôô
 ˜%¤Ô%¨%¯.ª.Ø!×3Ñ3°E¸4Ó@�
à!×.Ñ.Ð6ð ØF×MÑMØ" J×$;Ñ$;¸Tóôð Ð%Ø'‘
à"�
ð �hŠØ×)Ñ)Ð1ð ØF×MÑMØ˜u×1Ñ1°4óôð �1‰HŠCð}>	ð@ )Ð4‘
¸%ˆØˆ=ØˆEá 5Ð#4ØˆFØØ�>Ø ×-Ñ-Ð5ð ØJ×QÑQØ! 5×#5Ñ#5°tóôð ð ð ×(Ñ(Ð4Ø ×-Ñ-°×1DÑ1DÑDð ØJ×QÑQØ! 5×#5Ñ#5°v×7JÑ7Jóôð ð ð  Ÿ™�ð ð& ˆLr   c                 óL   — |D �cg c]  }|j                   ‘Œ c}|k(  sJ ‚yc c}w )zÝMake sure that the given tags have the correct text.

        This is used in tests that define a bunch of tags, each
        containing a single string, and then select certain strings by
        some mechanism.
        N©Ústring©r   ÚtagsÚshould_matchÚtags       r   Úassert_selectszSoupTest.assert_selects  s$   € ð '+Ö+˜s�—
“
Ò+¨|Ò;Ñ;Ð;ùÒ+s   …!c                 ó>   — |D �cg c]  }|d   ‘Œ	 c}|k(  sJ ‚yc c}w )zÜMake sure that the given tags have the correct IDs.

        This is used in tests that define a bunch of tags, each
        containing a single string, and then select certain strings by
        some mechanism.
        ÚidNr"   rT   s       r   Úassert_selects_idszSoupTest.assert_selects_ids  s$   € ð &*Ö*˜c��D“	Ò*¨lÒ:Ñ:Ð:ùÒ*s   …r   )F)Ú__name__Ú
__module__Ú__qualname__Úpropertyr   r    r$   r6   ÚassertSoupEqualsr>   rH   rX   r[   r"   r   r   r   r   \   sD   „ àñó ðò@ò
PóEð. #Ðò	ópòd<ó;r   r   c                   óÒ   — e Zd Zej                  j                  ddi  edg¬«      ddgig«      d„ «       Zej                  j                  d edg¬«      ddgig«      d	„ «       Zd
„ Z	y)ÚTreeBuilderSmokeTestÚmulti_valued_attributesNÚclass)ÚbÚ*Únotclassc                 óV   — d}| j                  ||¬«      }|j                  d   dk(  sJ ‚y )NzC<html xmlns="http://www.w3.org/1999/xhtml"><a class="a b c"></html>©rc   rd   za b c©r    Úa©r   rc   r   r    s       r   Útest_attribute_not_multi_valuedz4TreeBuilderSmokeTest.test_attribute_not_multi_valued  s3   € ð
 WˆØ�y‰y˜Ð9PˆyÓQˆØ�v‰v�g‰ 'Ò)Ñ)Ð)r   )rk   c                 óZ   — d}| j                  ||¬«      }|j                  d   g d¢k(  sJ ‚y )Nz<a class="a b c">ri   rd   )rk   re   Úcrj   rl   s       r   Útest_attribute_multi_valuedz0TreeBuilderSmokeTest.test_attribute_multi_valued#  s:   € ð %ˆØ�y‰yØÐ,Cð ó 
ˆð �v‰v�g‰¢/Ò1Ñ1Ð1r   c                 ó.   — d}d}| j                  |«      }y )Nz<![if word]>content<![endif]>z<!DOCTYPE html]ff>)r    ©r   r   r    s      r   Útest_invalid_doctypez)TreeBuilderSmokeTest.test_invalid_doctype-  s   € Ø0ˆØ%ˆØ�y‰y˜Ó ‰r   )
r\   r]   r^   ÚpytestÚmarkÚparametrizeÚdictrm   rp   rs   r"   r   r   rb   rb     s‚   „ ð ‡[�[×ÑØ!Ø	ˆr‘4˜7˜)Ô$ s¨Z¨LÐ&9Ð:óñ*ó	ð*ð
 ‡[�[×ÑØ!¡D¨G¨9Ô$5¸¸g¸YÐ7GÐ#Hóñ2óð2ó!r   rb   c                   ó’  — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdCd„Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z d„ Z!d „ Z"d!„ Z#d"„ Z$d#„ Z%d$„ Z&d%„ Z'd&„ Z(d'„ Z)d(„ Z*d)„ Zd*„ Z+d+„ Z,d,„ Z-d-„ Z.d.„ Z/d/„ Z0d0„ Z1d1„ Z2d2„ Z3d3„ Z4d4„ Z5d5„ Z6d6„ Z7d7„ Z8d8„ Z9d9„ Z:d:„ Z;d;„ Z<d<„ Z=d=„ Z>d>„ Z?d?„ Z@d@„ ZAdA„ ZByB)DÚHTMLTreeBuilderSmokeTestaC  A basic test of a treebuilder's competence.

    Any HTML treebuilder, present or future, should be able to pass
    these tests. With invalid markup, there's room for interpretation,
    and different parsers can handle it differently. But with the
    markup in these tests, there's not much room for interpretation.
    c                 óx   — dD ]5  }| j                  d«      }|j                  |«      }|j                  dk(  rŒ5J ‚ y)zmVerify that all HTML4 and HTML5 empty element (aka void element) tags
        are handled correctly.
        )ÚareaÚbaseÚbrÚcolÚembedÚhrÚimgÚinputÚkeygenÚlinkÚmenuitemÚmetaÚparamÚsourceÚtrackÚwbrÚspacerÚframeÚ TN)r    Únew_tagÚis_empty_element)r   r1   r    rŽ   s       r   Útest_empty_element_tagsz0HTMLTreeBuilderSmokeTest.test_empty_element_tags<  sA   € ð
ò 	4ˆDð —9‘9˜R“=ˆDØ—l‘l 4Ó(ˆGØ×+Ñ+¨tÓ3Ñ3ñ	4r   c                 ó®  — | j                  d«      }t        |j                  j                  t        «      sJ ‚t        |j
                  j                  t        «      sJ ‚| j                  d«      }t        |j                  j                  t        «      sJ ‚|j                  j                  dk(  sJ ‚t        |j                  j                  t        «      sJ ‚y )Nz7<style>Some CSS</style><script>Some Javascript</script>z<style><!--Some CSS--></style>z<!--Some CSS-->)r    rG   ÚstylerS   r   Úscriptr   ©r   r    s     r   Útest_special_string_containersz7HTMLTreeBuilderSmokeTest.test_special_string_containersH  sŸ   € Ø�y‰yØEó
ˆô ˜$Ÿ*™*×+Ñ+¬ZÔ8Ñ8Ü˜$Ÿ+™+×,Ñ,¬fÔ5Ñ5à�y‰yØ,ó
ˆô ˜$Ÿ*™*×+Ñ+¬ZÔ8Ñ8ð �z‰z× Ñ Ð$5Ò5Ñ5Ü˜$Ÿ*™*×+Ñ+¬ZÔ8Ñ8Ð8r   c                 óì   — | j                  d«      }t        j                  |d«      }t        j                  |«      }|j                  t
        k(  sJ ‚|j                  «       |j                  «       k(  sJ ‚y ©Nz<a><b>foo</a>é   ©r    ÚpickleÚdumpsÚloadsÚ	__class__r   r*   ©r   ÚtreeÚdumpedÚloadeds       r   Ú!test_pickle_and_unpickle_identityz:HTMLTreeBuilderSmokeTest.test_pickle_and_unpickle_identityX  ó[   € ð �y‰y˜Ó)ˆÜ—‘˜d AÓ&ˆÜ—‘˜fÓ%ˆØ×Ñ¤=Ò0Ñ0Ø�}‰}‹ $§+¡+£-Ò/Ñ/Ð/r   c                 ó  — | j                  |«      \  }}|j                  d   }|j                  t        k(  sJ ‚||k(  sJ ‚|j	                  d«      dt        |«       |k(  sJ ‚|j                  j                  d   dk(  sJ ‚y)z8Assert that a given doctype string is handled correctly.r   Úutf8NÚfoo©Ú_document_with_doctyperF   r�   r   ÚencoderE   Úp©r   Údoctype_fragmentÚdoctype_strr    Údoctypes        r   ÚassertDoctypeHandledz-HTMLTreeBuilderSmokeTest.assertDoctypeHandleda  sƒ   € à ×7Ñ7Ð8HÓIÑˆ�Tð —-‘- Ñ"ˆØ× Ñ ¤GÒ+Ñ+ØÐ*Ò*Ñ*Ø�{‰{˜6Ó"Ð#4¤C¨Ó$4Ð5¸ÒDÑDð �v‰v�‰˜qÑ! UÒ*Ñ*Ð*r   c                 óf   — d|›d|›d�}|dz   }| j                  |«      }|j                  d«      |fS )z5Generate and parse a document with the given doctype.z<!ú ú>z
<p>foo</p>r¥   ©r    r©   )r   r¬   Údoctype_stringr®   r   r    s         r   r¨   z/HTMLTreeBuilderSmokeTest._document_with_doctypeo  s9   � â .Ò0@ÐAˆØ˜>Ñ)ˆØ�y‰y˜Ó ˆØ�~‰~˜fÓ% tÐ+Ð+r   c                 óH   — | j                  d«       | j                  d«       y)z?Make sure normal, everyday HTML doctypes are handled correctly.Úhtmlz4html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"N©r¯   r   s    r   Útest_normal_doctypesz-HTMLTreeBuilderSmokeTest.test_normal_doctypesv  s"   € à×!Ñ! &Ô)Ø×!Ñ!ØBõ	Dr   c                 ón   — | j                  d«      }|j                  d   }d|j                  «       k(  sJ ‚y )Nz
<!DOCTYPE>r   r�   )r    rF   Ústrip)r   r    r®   s      r   Útest_empty_doctypez+HTMLTreeBuilderSmokeTest.test_empty_doctype|  s2   € Ø�y‰y˜Ó&ˆØ—-‘- Ñ"ˆØ�W—]‘]“_Ò$Ñ$Ð$r   c                 ó  — dD ]‚  }| j                  d|«      \  }}|j                  d   }|j                  t        k(  sJ ‚|dk(  sJ ‚|j	                  d«      d t        |«       dk(  sJ ‚|j                  j                  d   dk(  rŒ‚J ‚ y )N)r®   ÚDocTyper¶   r   r¥   s   <!DOCTYPE html>r¦   r§   r«   s        r   Útest_mixed_case_doctypez0HTMLTreeBuilderSmokeTest.test_mixed_case_doctype�  s•   € à 6ò 	/ÐØ $× ;Ñ ;ØÐ(ó!ÑˆK˜ð —m‘m AÑ&ˆGØ×$Ñ$¬Ò/Ñ/Ø˜fÒ$Ñ$Ø—;‘;˜vÓ&Ð'8¬¨KÓ(8Ð9Ð=OÒOÑOð —6‘6—?‘? 1Ñ%¨Ó.Ñ.ñ	/r   c                 ó*   — d}| j                  |«       y )Nznhtml PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"r·   )r   r®   s     r   Útest_public_doctype_with_urlz5HTMLTreeBuilderSmokeTest.test_public_doctype_with_url“  s   € ð CˆØ×!Ñ! 'Õ*r   c                 ó&   — | j                  d«       y )Nz$foo SYSTEM "http://www.example.com/"r·   r   s    r   Útest_system_doctypez,HTMLTreeBuilderSmokeTest.test_system_doctype—  s   € Ø×!Ñ!Ð"HÕIr   c                 ó&   — | j                  d«       y )Nz#xsl:stylesheet SYSTEM "htmlent.dtd"r·   r   s    r   Útest_namespaced_system_doctypez7HTMLTreeBuilderSmokeTest.test_namespaced_system_doctypeš  ó   € à×!Ñ!Ð"GÕHr   c                 ó&   — | j                  d«       y )Nz#xsl:stylesheet PUBLIC "htmlent.dtd"r·   r   s    r   Útest_namespaced_public_doctypez7HTMLTreeBuilderSmokeTest.test_namespaced_public_doctypež  rÅ   r   c                 óú   — d}t        j                  d¬«      5 }| j                  |«      }ddd«       j                  d«      j	                  dd«      |j	                  dd«      k(  sJ ‚g k(  sJ ‚y# 1 sw Y   ŒGxY w)zJA real XHTML document should come out more or less the same as it went in.óÓ   <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Hello.</title></head>
<body>Goodbye.</body>
</html>T©ÚrecordNúutf-8ó   
r   )ÚwarningsÚcatch_warningsr    r©   Úreplace©r   r   Úwr    s       r   Útest_real_xhtml_documentz1HTMLTreeBuilderSmokeTest.test_real_xhtml_document¢  sx   € ðˆô ×$Ñ$¨DÔ1ð 	%°QØ—9‘9˜VÓ$ˆD÷	%à�{‰{˜7Ó#×+Ñ+¨E°3Ó7¸6¿>¹>È%ÐQTÓ;UÒUÑUð �BŠw‰ˆw÷	%ð 	%ús   ™A1Á1A:c                 óÌ   — d}t        j                  d¬«      5 }| j                  |«      }d d d «       dt        j	                  d«      «      k(  sJ ‚g k(  sJ ‚y # 1 sw Y   Œ0xY w)Ns.   <ns1:foo>content</ns1:foo><ns1:foo/><ns2:foo/>TrÊ   r˜   zns1:foo)rÎ   rÏ   r    rE   Úfind_allrÑ   s       r   Útest_namespaced_htmlz-HTMLTreeBuilderSmokeTest.test_namespaced_html³  se   € ð GˆÜ×$Ñ$¨DÔ1ð 	%°QØ—9‘9˜VÓ$ˆD÷	%ð ”C˜Ÿ™ iÓ0Ó1Ò1Ñ1ð �QŠw‰ˆw÷	%ð 	%ús   ™AÁA#c                 óH  — d}t        j                  d¬«      5 }| j                  |«      }|j                  j                  dk(  sJ ‚	 d d d «       \  }t        |j                  t        «      sJ ‚t        |j                  «      t        j                  k(  sJ ‚y # 1 sw Y   ŒRxY w)Ns7   <?xml version="1.0" encoding="utf-8"?><tag>string</tag>TrÊ   rS   )
rÎ   rÏ   r    rW   rS   rG   Úmessager   ÚstrÚMESSAGE)r   r   rÒ   r    Úwarnings        r   Útest_detect_xml_parsed_as_htmlz7HTMLTreeBuilderSmokeTest.test_detect_xml_parsed_as_htmlÀ  sŒ   € ð PˆÜ×$Ñ$¨DÔ1ð 	/°QØ—9‘9˜VÓ$ˆDØ—8‘8—?‘? hÒ.Ñ.Ð.÷	/ð ‰	ˆÜ˜'Ÿ/™/Ô+AÔBÑBÜ�7—?‘?Ó#Ô'=×'EÑ'EÒEÑEÐE÷	/ð 	/ús   ™-BÂB!c                 ó¦   — d}| j                  |«      }||j                  «       k(  sJ ‚d}| j                  |«      }||j                  d«      k(  sJ ‚y )Nz<?PITarget PIContent?>s   <?PITarget PIContent?>r¥   )r    r*   r©   rr   s      r   Útest_processing_instructionz4HTMLTreeBuilderSmokeTest.test_processing_instructionÐ  sR   € ð
 .ˆØ�y‰y˜Ó ˆØ˜Ÿ™›Ò&Ñ&à.ˆØ�y‰y˜Ó ˆØ˜Ÿ™ VÓ,Ò,Ñ,Ð,r   c                 óB   — t        j                  | j                  «       y)z°Make sure you can copy the tree builder.

        This is important because the builder is part of a
        BeautifulSoup object, and we want to be able to copy that.
        N)ÚcopyÚdeepcopyr   r   s    r   Útest_deepcopyz&HTMLTreeBuilderSmokeTest.test_deepcopyÝ  s   € ô 	�‰�d×*Ñ*Õ+r   c                 óŠ   — | j                  d«      }|j                  j                  rJ ‚t        |j                  «      dk(  sJ ‚y)z©A <p> tag is never designated as an empty-element tag.

        Even if the markup shows it as an empty-element tag, it
        shouldn't be presented that way.
        ú<p/>ú<p></p>N)r    rª   r�   rÙ   r”   s     r   Ú!test_p_tag_is_never_empty_elementz:HTMLTreeBuilderSmokeTest.test_p_tag_is_never_empty_elementå  s8   € ð �y‰y˜Ó ˆØ—6‘6×*Ò*Ñ*Ü�4—6‘6‹{˜iÒ'Ñ'Ð'r   c                 óp   — | j                  dd«       | j                  dd«       | j                  dd«       y)zŠA tag that's not closed by the end of the document should be closed.

        This applies to all tags except empty-element tags.
        ú<p>rå   z<b>z<b></b>z<br>ú<br/>N©r6   r   s    r   Útest_unclosed_tags_get_closedz6HTMLTreeBuilderSmokeTest.test_unclosed_tags_get_closedï  s4   € ð
 	×Ñ˜ 	Ô*Ø×Ñ˜ 	Ô*à×Ñ˜ Õ)r   c                 óŠ   — | j                  d«      }|j                  j                  sJ ‚t        |j                  «      dk(  sJ ‚y)zÂA <br> tag is designated as an empty-element tag.

        Some parsers treat <br></br> as one <br/> tag, some parsers as
        two tags, but it should always be an empty-element tag.
        z	<br></br>ré   N)r    r}   r�   rÙ   r”   s     r   Ú#test_br_is_always_empty_element_tagz<HTMLTreeBuilderSmokeTest.test_br_is_always_empty_element_tagù  s8   € ð �y‰y˜Ó%ˆØ�w‰w×'Ò'Ñ'Ü�4—7‘7‹|˜wÒ&Ñ&Ð&r   c                 ó&   — | j                  d«       y )Nz<em><em></em></em>rê   r   s    r   Útest_nested_formatting_elementsz8HTMLTreeBuilderSmokeTest.test_nested_formatting_elements  s   € Ø×ÑÐ-Õ.r   c                 ó\   — d}| j                  |«      }d|j                  d«      d   k(  sJ ‚y )Nz¯<!DOCTYPE html>
<html>
<head>
<title>Ordinary HEAD element test</title>
</head>
<script type="text/javascript">
alert("Help!");
</script>
<body>
Hello, world!
</body>
</html>
ztext/javascriptr“   Útype)r    Úfind)r   r¶   r    s      r   Útest_double_headz)HTMLTreeBuilderSmokeTest.test_double_head  s4   € ðˆð �y‰y˜‹ˆØ  D§I¡I¨hÓ$7¸Ñ$?Ò?Ñ?Ð?r   c                 ó&  — d}| j                  |«       | j                  |«      }|j                  d¬«      }|j                  t        k(  sJ ‚|j                  d¬«      }||j
                  k(  sJ ‚|j                  d¬«      }||j                  k(  sJ ‚y )Nz<p>foo<!--foobar-->baz</p>ÚfoobarrR   r¦   Úbaz)r6   r    rò   r�   r   r9   r:   )r   r   r    Úcommentr¦   rö   s         r   Útest_commentz%HTMLTreeBuilderSmokeTest.test_comment  s‹   € à-ˆØ×Ñ˜Ô à�y‰y˜Ó ˆØ—)‘) 8�)Ó,ˆØ× Ñ ¤GÒ+Ñ+ð �i‰i˜uˆiÓ%ˆØ˜#×*Ñ*Ò*Ñ*Ø�i‰i˜uˆiÓ%ˆØ˜#×.Ñ.Ò.Ñ.Ð.r   c                 óp  — d}d}| j                  |«       | j                  |«       | j                  |«      }|j                  j                  «       |k(  sJ ‚| j                  |«      }|j                  j                  «       |k(  sJ ‚| j                  d«      }|j                  j                  «       dk(  sJ ‚y)zWhitespace must be preserved in <pre> and <textarea> tags,
        even if that would mean not prettifying the markup.
        z<pre>a   z</pre>
z <textarea> woo
woo  </textarea>
z<textarea></textarea>z<textarea></textarea>
N)r6   r    ÚpreÚprettifyÚtextarea)r   Ú
pre_markupÚtextarea_markupr    s       r   Ú-test_preserved_whitespace_in_pre_and_textareazFHTMLTreeBuilderSmokeTest.test_preserved_whitespace_in_pre_and_textarea&  s¡   € ð *ˆ
Ø>ˆØ×Ñ˜Ô$Ø×Ñ˜Ô)à�y‰y˜Ó$ˆØ�x‰x× Ñ Ó" jÒ0Ñ0à�y‰y˜Ó)ˆØ�}‰}×%Ñ%Ó'¨?Ò:Ñ:à�y‰yÐ0Ó1ˆØ�}‰}×%Ñ%Ó'Ð+DÒDÑDÐDr   c                 óv   — d}| j                  |«       d}| j                  |«       d}| j                  |«       y)z+Inline elements can be nested indefinitely.z<b>Inside a B tag</b>z!<p>A <i>nested <b>tag</b></i></p>z/<p>A <a>doubly <i>nested <b>tag</b></i></a></p>Nrê   )r   Úb_tagÚnested_b_tagÚdouble_nested_b_tags       r   Útest_nested_inline_elementsz4HTMLTreeBuilderSmokeTest.test_nested_inline_elements8  s<   € à'ˆØ×Ñ˜Ôà:ˆØ×Ñ˜Ô&àOÐØ×Ñ˜Õ&r   c                 ó¾   — | j                  d«      }|j                  }|j                  j                  j                  dk(  sJ ‚|j                  j                  dk(  sJ ‚y)zBlock elements can be nested.z*<blockquote><p><b>Foo</b></p></blockquote>ÚFooN)r    Ú
blockquoterª   re   rS   )r   r    r  s      r   Ú test_nested_block_level_elementsz9HTMLTreeBuilderSmokeTest.test_nested_block_level_elementsC  sK   € à�y‰yÐEÓFˆØ—_‘_ˆ
Ø�|‰|�~‰~×$Ñ$¨Ò-Ñ-Ø�|‰|×"Ñ" eÒ+Ñ+Ð+r   c                 óN   — d}| j                  |d«       | j                  d«       y)z$One table can go inside another one.z[<table id="1"><tr><td>Here's another table:<table id="2"><tr><td>foo</td></tr></table></td>zh<table id="1"><tr><td>Here's another table:<table id="2"><tr><td>foo</td></tr></table></td></tr></table>z{<table><thead><tr><td>Foo</td></tr></thead><tbody><tr><td>Bar</td></tr></tbody><tfoot><tr><td>Baz</td></tr></tfoot></table>Nrê   )r   r   s     r   Útest_correctly_nested_tablesz5HTMLTreeBuilderSmokeTest.test_correctly_nested_tablesJ  s6   € ð"ˆð 	×ÑØð!ô	"ð 	×Ñð;õ	<r   c                 óš   — d}| j                  |«      }ddg|j                  d   k(  sJ ‚|j                  |j                  dd¬«      k(  sJ ‚y )Nz<div class=" foo bar	 "></a>r¦   Úbarrd   Údivzfoo bar)Úclass_)r    r  rò   rr   s      r   Ú*test_multivalued_attribute_with_whitespacezCHTMLTreeBuilderSmokeTest.test_multivalued_attribute_with_whitespace^  sP   € ð 0ˆØ�y‰y˜Ó ˆØ�uˆ~ §¡¨'Ñ!2Ò2Ñ2ð �x‰x˜4Ÿ9™9 U°9˜9Ó=Ò=Ñ=Ð=r   c                 óh   — d}| j                  |«      }dg|j                  j                  d   k(  sJ ‚y )Nz1<table><div><div class="css"></div></div></table>Úcssrd   )r    r  rr   s      r   Ú(test_deeply_nested_multivalued_attributezAHTMLTreeBuilderSmokeTest.test_deeply_nested_multivalued_attributej  s5   € ð EˆØ�y‰y˜Ó ˆØˆw˜$Ÿ(™(Ÿ,™, wÑ/Ò/Ñ/Ð/r   c                 óV   — d}| j                  |«      }ddg|j                  d   k(  sJ ‚y )Nz<html class="a b"></html>rk   re   rd   )r    r¶   rr   s      r   Ú"test_multivalued_attribute_on_htmlz;HTMLTreeBuilderSmokeTest.test_multivalued_attribute_on_htmlr  s2   € ð -ˆØ�y‰y˜Ó ˆØ�Sˆz˜TŸY™Y wÑ/Ò/Ñ/Ð/r   c                 ó(   — | j                  dd«       y )Nz<a b="<a>"></a>z<a b="&lt;a&gt;"></a>rê   r   s    r   Ú3test_angle_brackets_in_attribute_values_are_escapedzLHTMLTreeBuilderSmokeTest.test_angle_brackets_in_attribute_values_are_escapedz  s   € Ø×ÑÐ*Ð,CÕDr   c                 ó(   — | j                  dd«       y )Nz$<p>&bull; AT&T is in the s&p 500</p>u)   <p>â€¢ AT&amp;T is in the s&amp;p 500</p>rê   r   s    r   Ú3test_strings_resembling_character_entity_referenceszLHTMLTreeBuilderSmokeTest.test_strings_resembling_character_entity_references}  s   € ð 	×ÑØ2Ø:õ	
r   c                 ó(   — | j                  dd«       y )Nz<p>Bob&apos;s Bar</p>z<p>Bob's Bar</p>rê   r   s    r   Útest_apos_entityz)HTMLTreeBuilderSmokeTest.test_apos_entity…  s   € Ø×ÑØ#Øõ	
r   c                 ó`   — d}| j                  |«      }d|j                  j                  k(  sJ ‚y )Nz%<p>&#147;Hello&#148; &#45;&#9731;</p>u   â€œHelloâ€� -â˜ƒ©r    rª   rS   rr   s      r   Ú*test_entities_in_foreign_document_encodingzCHTMLTreeBuilderSmokeTest.test_entities_in_foreign_document_encoding‹  s-   € ð 9ˆØ�y‰y˜Ó ˆØ! T§V¡V§]¡]Ò2Ñ2Ð2r   c                 ó˜   — d}| j                  d|«       | j                  d|«       | j                  d|«       | j                  d|«       y )Nu   <p id="piÃ±ata"></p>z<p id="pi&#241;ata"></p>z<p id="pi&#xf1;ata"></p>z<p id="pi&#Xf1;ata"></p>z<p id="pi&ntilde;ata"></p>rê   ©r   Úexpects     r   Ú0test_entities_in_attributes_converted_to_unicodezIHTMLTreeBuilderSmokeTest.test_entities_in_attributes_converted_to_unicode—  sK   € ØHˆØ×ÑÐ3°VÔ<Ø×ÑÐ3°VÔ<Ø×ÑÐ3°VÔ<Ø×ÑÐ5°vÕ>r   c                 ó˜   — d}| j                  d|«       | j                  d|«       | j                  d|«       | j                  d|«       y )Nu   <p>piÃ±ata</p>z<p>pi&#241;ata</p>z<p>pi&#xf1;ata</p>z<p>pi&#Xf1;ata</p>z<p>pi&ntilde;ata</p>rê   r  s     r   Ú*test_entities_in_text_converted_to_unicodezCHTMLTreeBuilderSmokeTest.test_entities_in_text_converted_to_unicodež  sK   € ØBˆØ×ÑÐ-¨vÔ6Ø×ÑÐ-¨vÔ6Ø×ÑÐ-¨vÔ6Ø×ÑÐ/°Õ8r   c                 ó(   — | j                  dd«       y )Nz#<p>I said &quot;good day!&quot;</p>z<p>I said "good day!"</p>rê   r   s    r   Ú,test_quot_entity_converted_to_quotation_markzEHTMLTreeBuilderSmokeTest.test_quot_entity_converted_to_quotation_mark¥  s   € Ø×ÑÐ>Ø9õ	;r   c                 ót   — d}| j                  d|«       | j                  d|«       | j                  d|«       y )Nu   ï¿½z&#10000000000000;z&#x10000000000000;z&#1000000000;rê   r  s     r   Útest_out_of_range_entityz1HTMLTreeBuilderSmokeTest.test_out_of_range_entity©  s9   € Ø,ˆØ×ÑÐ,¨fÔ5Ø×ÑÐ-¨vÔ6Ø×Ñ˜¨&Õ1r   c                 óÜ   — | j                  d«      }d|j                  j                  j                  j                  k(  sJ ‚d|j
                  j                  k(  sJ ‚| j                  |«       y)zDMostly to prevent a recurrence of a bug in the html5lib treebuilder.z!<html><h2>
foo</h2><p></p></html>rª   N)r    Úh2rS   r9   r1   rª   r>   r”   s     r   Útest_multipart_stringsz/HTMLTreeBuilderSmokeTest.test_multipart_strings¯  sQ   € à�y‰yÐ=Ó>ˆØ�d—g‘g—n‘n×1Ñ1×6Ñ6Ò6Ñ6Ø�d—f‘f—k‘kÒ!Ñ!Ø× Ñ  Õ&r   c                 óL   — | j                  dd«       | j                  dd«       y)zqVerify consistent handling of empty-element tags,
        no matter how they come in through the markup.
        z<br/><br/><br/>z<br /><br /><br />Nrê   r   s    r   r�   z0HTMLTreeBuilderSmokeTest.test_empty_element_tags¶  s(   € ð 	×ÑÐ*Ð,=Ô>Ø×ÑÐ-Ð/@ÕAr   c                 ó|   — d}| j                  |«      }|j                  j                  €J ‚| j                  |«       y)ú8Prevent recurrence of a bug in the html5lib treebuilder.z?<html><head></head>
  <link></link>
  <body>foo</body>
</html>
N)r    r¶   Úbodyr>   ©r   Úcontentr    s      r   Ú#test_head_tag_between_head_and_bodyz<HTMLTreeBuilderSmokeTest.test_head_tag_between_head_and_body½  s8   € ðˆð
 �y‰y˜Ó!ˆØ�y‰y�~‰~Ð)Ñ)Ø× Ñ  Õ&r   c                 ó`   — d}| j                  |«      }| j                  |j                  «       y)r-  z�<!DOCTYPE html>
<html>
 <body>
   <article id="a" >
   <div><a href="1"></div>
   <footer>
     <a href="2"></a>
   </footer>
  </article>
  </body>
</html>
N)r    r>   Úarticler/  s      r   Útest_multiple_copies_of_a_tagz6HTMLTreeBuilderSmokeTest.test_multiple_copies_of_a_tagÈ  s+   € ðˆð �y‰y˜Ó!ˆØ× Ñ  §¡Õ.r   c                 óä   — d}| j                  |«      }||j                  «       k(  sJ ‚|j                  }d|j                  d   k(  sJ ‚d|j                  d   k(  sJ ‚d|j                  d   k(  sJ ‚y)	z†Parsers don't need to *understand* namespaces, but at the
        very least they should not choke on namespaces or lose
        data.sÙ   <html xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg"><head></head><body><mathml:msqrt>4</mathml:msqrt><b svg:fill="red"></b></body></html>úhttp://www.w3.org/1999/xhtmlÚxmlnsú"http://www.w3.org/1998/Math/MathMLzxmlns:mathmlúhttp://www.w3.org/2000/svgz	xmlns:svgN)r    r©   r¶   )r   r   r    r¶   s       r   Útest_basic_namespacesz.HTMLTreeBuilderSmokeTest.test_basic_namespacesÙ  sq   € ð
 nˆØ�y‰y˜Ó ˆØ˜Ÿ™›Ò&Ñ&Ø�y‰yˆØ-°·±¸7Ñ1CÒCÑCØ3°t·y±yÀÑ7PÒPÑPØ+¨t¯y©y¸Ñ/EÒEÑEÐEr   c                 óV   — d}| j                  |«      }ddg|j                  d   k(  sJ ‚y )Ns   <a class="foo bar">r¦   r  rd   rj   rr   s      r   Ú-test_multivalued_attribute_value_becomes_listzFHTMLTreeBuilderSmokeTest.test_multivalued_attribute_value_becomes_listæ  s/   € Ø'ˆØ�y‰y˜Ó ˆØ�uˆ~ §¡¨¡Ò0Ñ0Ð0r   c                 ó`   — d}| j                  |«      }d|j                  j                  k(  sJ ‚y )NuD   <html><head><meta encoding="euc-jp"></head><body>SacrÃ© bleu!</body>õ   SacrÃ© bleu!)r    r.  rS   rr   s      r   Útest_can_parse_unicode_documentz8HTMLTreeBuilderSmokeTest.test_can_parse_unicode_documentò  s0   € ð yˆØ�y‰y˜Ó ˆØ 4§9¡9×#3Ñ#3Ò3Ñ3Ð3r   c                 ój   — t        d«      }| j                  d|¬«      }|j                  «       dk(  sJ ‚y)z2Parsers should be able to work with SoupStrainers.re   z&A <b>bold</b> <meta/> <i>statement</i>)Ú
parse_onlyz<b>bold</b>N)r
   r    r*   )r   Ústrainerr    s      r   Útest_soupstrainerz*HTMLTreeBuilderSmokeTest.test_soupstrainerú  s9   € ä Ó$ˆØ�y‰yÐAØ$,ð ó .ˆà�{‰{‹} Ò-Ñ-Ð-r   c                 ó(   — | j                  dd«       y )Nz<foo attr='bar'></foo>z<foo attr="bar"></foo>rê   r   s    r   Ú7test_single_quote_attribute_values_become_double_quoteszPHTMLTreeBuilderSmokeTest.test_single_quote_attribute_values_become_double_quotes  s   € Ø×ÑÐ1Ø6õ	8r   c                 ó*   — d}| j                  |«       y )Nú'<foo attr='bar "brawls" happen'>a</foo>rê   )r   Útexts     r   Ú7test_attribute_values_with_nested_quotes_are_left_alonezPHTMLTreeBuilderSmokeTest.test_attribute_values_with_nested_quotes_are_left_alone  s   € Ø<ˆØ×Ñ˜Õr   c                 óœ   — d}| j                  |«      }d|j                  d<   | j                  |j                  j                  «       d«       y )NrG  zBrawls happen at "Bob's Bar"Úattrz:<foo attr="Brawls happen at &quot;Bob's Bar&quot;">a</foo>)r    r¦   r6   r*   )r   rH  r    s      r   Ú:test_attribute_values_with_double_nested_quotes_get_quotedzSHTMLTreeBuilderSmokeTest.test_attribute_values_with_double_nested_quotes_get_quoted	  sB   € Ø<ˆØ�y‰y˜‹ˆØ:ˆ�‰�ÑØ×ÑØ�H‰H�O‰OÓØMõ	Or   c                 óL   — | j                  dd«       | j                  dd«       y )Nz+<this is="really messed up & stuff"></this>z/<this is="really messed up &amp; stuff"></this>z.<a href="http://example.org?a=1&b=2;3">foo</a>z2<a href="http://example.org?a=1&amp;b=2;3">foo</a>rê   r   s    r   Ú.test_ampersand_in_attribute_value_gets_escapedzGHTMLTreeBuilderSmokeTest.test_ampersand_in_attribute_value_gets_escaped  s.   € Ø×ÑÐFØOô	Qð 	×ÑØ<Ø@õ	Br   c                 ó&   — | j                  d«       y )Nz/<a href="http://example.org?a=1&amp;b=2;3"></a>rê   r   s    r   Ú7test_escaped_ampersand_in_attribute_value_is_left_alonezPHTMLTreeBuilderSmokeTest.test_escaped_ampersand_in_attribute_value_is_left_alone  s   € Ø×ÑÐJÕKr   c                 ó0   — d}d}| j                  ||«       y )Nú-<p>&lt;&lt;sacr&eacute;&#32;bleu!&gt;&gt;</p>õ#   <p>&lt;&lt;sacrÃ© bleu!&gt;&gt;</p>rê   )r   rH  Úexpecteds      r   Ú1test_entities_in_strings_converted_during_parsingzJHTMLTreeBuilderSmokeTest.test_entities_in_strings_converted_during_parsing  s   € ð ?ˆØYˆØ×Ñ˜˜xÕ(r   c                 ó`   — d}| j                  |«      }|j                  j                  dk(  sJ ‚y )Ns   <p>‘Foo’</p>u	   â€˜Fooâ€™r  )r   Úquoter    s      r   Ú)test_smart_quotes_converted_on_the_way_inzBHTMLTreeBuilderSmokeTest.test_smart_quotes_converted_on_the_way_in#  s.   € ð &ˆØ�y‰y˜ÓˆØ�v‰v�}‰}Ð bÒbÑbÐbr   c                 ó\   — | j                  d«      }|j                  j                  dk(  sJ ‚y )Nz<a>&nbsp;&nbsp;</a>u   Â Â )r    rk   rS   r”   s     r   Ú0test_non_breaking_spaces_converted_on_the_way_inzIHTMLTreeBuilderSmokeTest.test_non_breaking_spaces_converted_on_the_way_in*  s(   € Ø�y‰yÐ.Ó/ˆØ�v‰v�}‰}Ð 8Ò8Ñ8Ð8r   c                 óŒ   — d}dj                  d«      }| j                  |«      }|j                  j                  d«      |k(  sJ ‚y )NrR  rS  rÌ   )r©   r    rª   )r   rH  rT  r    s       r   Ú&test_entities_converted_on_the_way_outz?HTMLTreeBuilderSmokeTest.test_entities_converted_on_the_way_out.  s@   € Ø>ˆØY×`Ñ`ÐahÓiˆØ�y‰y˜‹ˆØ�v‰v�}‰}˜WÓ%¨Ò1Ñ1Ð1r   c                 óÂ   — d}|j                  d«      }| j                  |«      }|j                  d«      }|j                  dd«      }|j                  d«      }||k(  sJ ‚y )Nuƒ   <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-type"/></head><body><p>SacrÃ© bleu!</p></body></html>z
iso-8859-1rÌ   z
ISO-8859-1)r©   r    rÐ   )r   Úunicode_htmlÚiso_latin_htmlr    ÚresultrT  s         r   Útest_real_iso_8859_documentz4HTMLTreeBuilderSmokeTest.test_real_iso_8859_document4  sp   € ð
 ~ˆð &×,Ñ,¨\Ó:ˆð �y‰y˜Ó(ˆð —‘˜WÓ%ˆð
  ×'Ñ'¨°gÓ>ˆð —?‘? 7Ó+ˆð ˜Ò!Ñ!Ð!r   c                 óà   — d}|j                  d«      }| j                  |«      }|j                  d«      |j                  d«      k(  sJ ‚|j                  d«      |j                  d«      k(  sJ ‚y )Nsk   <html><head></head><body><pre>‚±‚ê‚ÍShift-JIS‚ÅƒR�[ƒfƒBƒ“ƒO‚³‚ê‚½“ú–{Œê‚Ìƒtƒ@ƒCƒ‹‚Å‚·�B</pre></body></html>z	shift-jisrÌ   Úeuc_jp)r*   r    r©   )r   Úshift_jis_htmlr^  r    s       r   Útest_real_shift_jis_documentz5HTMLTreeBuilderSmokeTest.test_real_shift_jis_documentP  so   € ð$ð 	ð &×,Ñ,¨[Ó9ˆØ�y‰y˜Ó&ˆð �{‰{˜7Ó# |×':Ñ':¸7Ó'CÒCÑCØ�{‰{˜8Ó$¨×(;Ñ(;¸HÓ(EÒEÑEÐEr   c                 ó¶   — d}| j                  |d¬«      }|j                  dv sJ ‚|j                  d«      |j                  d«      j                  d«      k(  sJ ‚y )Ns›   <html><head><title>Hebrew (ISO 8859-8) in Visual Directionality</title></head><body><h1>Hebrew (ISO 8859-8) in Visual Directionality</h1>íåìù</body></html>ú	iso8859-8)Úfrom_encoding)rg  z
iso-8859-8rÌ   )r    Úoriginal_encodingr©   r*   )r   Úhebrew_documentr    s      r   Útest_real_hebrew_documentz2HTMLTreeBuilderSmokeTest.test_real_hebrew_documenta  sj   € ð EˆØ�y‰yØ¨;ð ó 8ˆð ×%Ñ%Ð)DÑDÑDØ�{‰{˜7Ó#Ø×"Ñ" ;Ó/×6Ñ6°wÓ?ò
ñ 	
ð 
r   c                 óÄ   — d}d|z  }| j                  |«      }|j                  dddi«      }|d   }d|k(  sJ ‚t        |t        «      sJ ‚d|j	                  d	«      k(  sJ ‚y )
NzE<meta content="text/html; charset=x-sjis" http-equiv="Content-type"/>új<html><head>
%s
<meta http-equiv="Content-language" content="ja"/></head><body>Shift-JIS markup goes here.r†   z
http-equivzContent-typer0  ztext/html; charset=x-sjisztext/html; charset=utf8r¥   )r    rò   rG   r   r©   )r   Úmeta_tagrd  r    Úparsed_metar0  s         r   Ú'test_meta_tag_reflects_current_encodingz@HTMLTreeBuilderSmokeTest.test_meta_tag_reflects_current_encodingn  s~   € ð2ˆð
7à:BñCˆð �y‰y˜Ó(ˆð —i‘i ¨°~Ð(FÓGˆØ˜iÑ(ˆØ*¨gÒ5Ñ5ô ˜'Ô#<Ô=Ñ=ð )¨G¯N©N¸6Ó,BÒBÑBÐBr   c                 óÂ   — d}d|z  }| j                  |«      }|j                  dd¬«      }|d   }d|k(  sJ ‚t        |t        «      sJ ‚d|j	                  d«      k(  sJ ‚y )	Nz'<meta id="encoding" charset="x-sjis" />rm  r†   Úencoding)rZ   Úcharsetzx-sjisr¥   )r    rò   rG   r   r©   )r   rn  rd  r    ro  rs  s         r   Ú3test_html5_style_meta_tag_reflects_current_encodingzLHTMLTreeBuilderSmokeTest.test_html5_style_meta_tag_reflects_current_encodingŠ  s{   € ð >ˆð7à:BñCˆð �y‰y˜Ó(ˆð —i‘i ¨:�iÓ6ˆØ˜iÑ(ˆØ˜7Ò"Ñ"ô ˜'Ô#<Ô=Ñ=ð ˜Ÿ™¨Ó/Ò/Ñ/Ð/r   c                 ó¬   — dD ]O  }| j                  |«      }t        D ]3  }|dv rŒ|j                  |«      }d|v sJ ‚|j                  d«      |vrŒ3J ‚ ŒQ y )N)sB   <meta charset="utf8"></head><meta id="encoding" charset="utf-8" />©ÚidnaÚmbcsÚoemÚ	undefinedÚstring_escapezstring-escapes   meta charset=""Úascii©r    r	   r©   ©r   r   r    rr  Úencodeds        r   Ú2test_python_specific_encodings_not_used_in_charsetzKHTMLTreeBuilderSmokeTest.test_python_specific_encodings_not_used_in_charset¢  sq   € ð

ò 	?ˆFð —9‘9˜VÓ$ˆDÜ5ò ?�Øð  ñ ð ØŸ+™+ hÓ/�Ø)¨WÑ4Ñ4Ø—‘ wÓ/°wÒ>Ñ>ñ?ñ	?r   c                 ó‚   — | j                  d«      }d|j                  d<   d|j                  j                  «       k(  sJ ‚y )Nz<a>text</a>r  r¦   z<a foo="bar">text</a>)r    rk   r*   )r   Údatas     r   Ú5test_tag_with_no_attributes_can_have_attributes_addedzNHTMLTreeBuilderSmokeTest.test_tag_with_no_attributes_can_have_attributes_added¹  s5   € Ø�y‰y˜Ó'ˆØˆ�‰ˆu‰Ø&¨$¯&©&¯-©-«/Ò9Ñ9Ð9r   c                 ód   — | j                  d«      }d|j                  j                  «       k(  sJ ‚y )Nz0<body><div><p>text1</p></span>text2</div></body>z)<body><div><p>text1</p>text2</div></body>)r    r.  r*   r”   s     r   Ú$test_closing_tag_with_no_opening_tagz=HTMLTreeBuilderSmokeTest.test_closing_tag_with_no_opening_tag¾  s.   € ð
 �y‰yÐKÓLˆØ:¸d¿i¹i×>NÑ>NÓ>PÒPÑPÐPr   c                 óP   — | j                  t        «      }| j                  |«       y©z3Test the worst case (currently) for linking issues.N©r    ÚBAD_DOCUMENTrH   r”   s     r   Útest_worst_casez(HTMLTreeBuilderSmokeTest.test_worst_caseÆ  ó    € ð �y‰yœÓ&ˆØ×Ñ˜tÕ$r   N)ÚDOCTYPE)Cr\   r]   r^   Ú__doc__r�   r•   r¢   r¯   r¨   r¸   r»   r¾   rÀ   rÂ   rÄ   rÇ   rÓ   rÖ   rÜ   rÞ   râ   ræ   rë   rí   rï   ró   rø   rÿ   r  r  r
  r  r  r  r  r  r  r  r!  r#  r%  r'  r*  r1  r4  r:  r<  r?  rC  rE  rI  rL  rN  rP  rU  rX  rZ  r\  ra  re  rk  rp  rt  r€  rƒ  r…  rŠ  r"   r   r   ry   ry   2  sX  „ ñò
4ò9ò 0ò+ó,òDò%ò
/ò$+òJòIòIòò"ò	Fò -ò,ò(ò*ò'ò/ò@ò"/òEò$	'ò,ò<ò(
>ò0ò0òEò
ò
ò
3ò?ò9ò;ò2ò'òBò	'ò/ò"Fò1ò4ò.ò8òòOòBòLò)òcò9ò2ò"ò8Fò"
òCò80ò0?ò.:ò
Qó%r   ry   c                   óŠ   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zy)ÚXMLTreeBuilderSmokeTestc                 óì   — | j                  d«      }t        j                  |d«      }t        j                  |«      }|j                  t
        k(  sJ ‚|j                  «       |j                  «       k(  sJ ‚y r—   r™   rž   s       r   r¢   z9XMLTreeBuilderSmokeTest.test_pickle_and_unpickle_identityÏ  r£   r   c                 óP   — | j                  d«      }|j                  «       dk(  sJ ‚y )Nú<root/>s.   <?xml version="1.0" encoding="utf-8"?>
<root/>r³   r”   s     r   Útest_docstring_generatedz0XMLTreeBuilderSmokeTest.test_docstring_generatedØ  s%   € Ø�y‰y˜Ó#ˆØ�{‰{‹}Ð RÒRÑRÐRr   c                 óV   — d}| j                  |«      }||j                  d«      k(  sJ ‚y )Ns,   <?xml version="1.0" encoding="utf8"?>
<foo/>r¥   r³   rr   s      r   Útest_xml_declarationz,XMLTreeBuilderSmokeTest.test_xml_declarationÜ  s,   € ØEˆØ�y‰y˜Ó ˆØ˜Ÿ™ VÓ,Ò,Ñ,Ð,r   c                 ó¢   — d}| j                  |«      }t        D ]3  }|dv rŒ|j                  |«      }d|v sJ ‚|j                  d«      |vrŒ3J ‚ y )Ns   <?xml version="1.0"?>
<foo/>rv  s   <?xml version="1.0"?>r|  r}  r~  s        r   Ú:test_python_specific_encodings_not_used_in_xml_declarationzRXMLTreeBuilderSmokeTest.test_python_specific_encodings_not_used_in_xml_declarationá  se   € ð 6ˆØ�y‰y˜Ó ˆÜ1ò 	;ˆHØð ñ ð Ø—k‘k (Ó+ˆGØ+¨wÑ6Ñ6Ø—?‘? 7Ó+°7Ò:Ñ:ñ	;r   c                 óV   — d}| j                  |«      }||j                  d«      k(  sJ ‚y )Ns<   <?xml version="1.0" encoding="utf8"?>
<?PITarget PIContent?>r¥   r³   rr   s      r   rÞ   z3XMLTreeBuilderSmokeTest.test_processing_instructionô  s,   € ØUˆØ�y‰y˜Ó ˆØ˜Ÿ™ VÓ,Ò,Ñ,Ð,r   c                 óV   — d}| j                  |«      }|j                  d«      |k(  sJ ‚y)zGA real XHTML document should come out *exactly* the same as it went in.rÉ   rÌ   Nr³   rr   s      r   rÓ   z0XMLTreeBuilderSmokeTest.test_real_xhtml_documentù  s0   € ðˆð �y‰y˜Ó ˆØ�{‰{˜7Ó# vÒ-Ñ-Ð-r   c                 óT   — d}| j                  |«      }||j                  «       k(  sJ ‚y )Ns  <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<parent xmlns="http://ns1/">
<child xmlns="http://ns2/" xmlns:ns3="http://ns3/">
<grandchild ns3:attr="value" xmlns="http://ns4/"/>
</child>
</parent>r³   ©r   Údocr    s      r   Útest_nested_namespacesz.XMLTreeBuilderSmokeTest.test_nested_namespaces  s,   € ðˆð �y‰y˜‹~ˆØ�d—k‘k“mÒ#Ñ#Ð#r   c                 ón   — d}t        |d«      }d|j                  _        |j                  «       }d|v sJ ‚y )Nz/
  <script type="text/javascript">
  </script>
zlxml-xmlzconsole.log("< < hey > > ");s   &lt; &lt; hey &gt; &gt;)r   r“   rS   r©   )r   rœ  r    r  s       r   Ú5test_formatter_processes_script_tag_for_xml_documentszMXMLTreeBuilderSmokeTest.test_formatter_processes_script_tag_for_xml_documents  s>   € ðˆô ˜S *Ó-ˆð <ˆ�‰ÔØ—+‘+“-ˆØ)¨WÑ4Ñ4Ð4r   c                 ó`   — d}| j                  |«      }d|j                  j                  k(  sJ ‚y )Nu?   <?xml version="1.0" encoding="euc-jp"><root>SacrÃ© bleu!</root>r>  ©r    ÚrootrS   rr   s      r   r?  z7XMLTreeBuilderSmokeTest.test_can_parse_unicode_document  s-   € ØsˆØ�y‰y˜Ó ˆØ 4§9¡9×#3Ñ#3Ò3Ñ3Ð3r   c                 ó`   — d}| j                  |«      }d|j                  j                  k(  sJ ‚y )NuB   ï»¿<?xml version="1.0" encoding="euc-jp"><root>SacrÃ© bleu!</root>r>  r¡  rr   s      r   Ú1test_can_parse_unicode_document_begining_with_bomzIXMLTreeBuilderSmokeTest.test_can_parse_unicode_document_begining_with_bom   s0   € ð GˆØ�y‰y˜Ó ˆØ 4§9¡9×#3Ñ#3Ò3Ñ3Ð3r   c                 ó^   — d}| j                  |«      }t        |j                  «      |k(  sJ ‚y )Nzƒ<rss xmlns:dc="foo"><dc:creator>b</dc:creator><dc:date>2012-07-02T20:33:42Z</dc:date><dc:rights>c</dc:rights><image>d</image></rss>)r    rÙ   Úrssrr   s      r   Útest_popping_namespaced_tagz3XMLTreeBuilderSmokeTest.test_popping_namespaced_tag%  s.   € ð WˆØ�y‰y˜Ó ˆÜ�4—8‘8‹} Ò&Ñ&Ð&r   c                 óR   — | j                  d«      }|j                  d«      dk(  sJ ‚y )Nr’  Úlatin1s/   <?xml version="1.0" encoding="latin1"?>
<root/>r³   r”   s     r   Ú(test_docstring_includes_correct_encodingz@XMLTreeBuilderSmokeTest.test_docstring_includes_correct_encoding*  s(   € Ø�y‰y˜Ó#ˆØ�{‰{˜8Ó$Ð([Ò[Ñ[Ð[r   c                 óV   — d}| j                  |«      }|j                  d«      |k(  sJ ‚y)z<A large XML document should come out the same as it went in.s4  <?xml version="1.0" encoding="utf-8"?>
<root>0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000</root>rÌ   Nr³   rr   s      r   Útest_large_xml_documentz/XMLTreeBuilderSmokeTest.test_large_xml_document.  s0   € ðˆð �y‰y˜Ó ˆØ�{‰{˜7Ó# vÒ-Ñ-Ð-r   c                 óJ   — | j                  dd«       | j                  d«       y )Nrè   rä   z
<p>foo</p>rê   r   s    r   Ú9test_tags_are_empty_element_if_and_only_if_they_are_emptyzQXMLTreeBuilderSmokeTest.test_tags_are_empty_element_if_and_only_if_they_are_empty6  s    € Ø×Ñ˜ Ô'Ø×Ñ˜Õ&r   c                 ój   — d}| j                  |«      }|j                  }d|d   k(  sJ ‚d|d   k(  sJ ‚y )Nz£<root xmlns:a="http://example.com/" xmlns:b="http://example.net/"><a:foo>This tag is in the a namespace</a:foo><b:foo>This tag is in the b namespace</b:foo></root>zhttp://example.com/zxmlns:azhttp://example.net/zxmlns:b)r    r¢  )r   r   r    r¢  s       r   Útest_namespaces_are_preservedz5XMLTreeBuilderSmokeTest.test_namespaces_are_preserved:  sB   € ð wˆØ�y‰y˜Ó ˆØ�y‰yˆØ$¨¨Y©Ò7Ñ7Ø$¨¨Y©Ò7Ñ7Ð7r   c                 ó^   — d}| j                  |«      }t        |j                  «      |k(  sJ ‚y )NzN<p xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>20010504</dc:date></p>)r    rÙ   rª   rr   s      r   Útest_closing_namespaced_tagz3XMLTreeBuilderSmokeTest.test_closing_namespaced_tagA  s+   € ØaˆØ�y‰y˜Ó ˆÜ�4—6‘6‹{˜fÒ$Ñ$Ð$r   c                 ó^   — d}| j                  |«      }t        |j                  «      |k(  sJ ‚y )Nzs<foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><bar xsi:schemaLocation="http://www.example.com"/></foo>©r    rÙ   r¦   rr   s      r   Útest_namespaced_attributesz2XMLTreeBuilderSmokeTest.test_namespaced_attributesF  s.   € ð GˆØ�y‰y˜Ó ˆÜ�4—8‘8‹} Ò&Ñ&Ð&r   c                 ó^   — d}| j                  |«      }t        |j                  «      |k(  sJ ‚y )Nz<foo xml:lang="fr">bar</foo>r´  rr   s      r   Ú(test_namespaced_attributes_xml_namespacez@XMLTreeBuilderSmokeTest.test_namespaced_attributes_xml_namespaceK  s+   € Ø/ˆØ�y‰y˜Ó ˆÜ�4—8‘8‹} Ò&Ñ&Ð&r   c                 óæ   — d}| j                  |«      }dt        |j                  d«      «      k(  sJ ‚dt        |j                  d«      «      k(  sJ ‚dt        |j                  d«      «      k(  sJ ‚	 y )Na  <?xml version="1.0" encoding="utf-8"?>
<Document xmlns="http://example.com/ns0"
    xmlns:ns1="http://example.com/ns1"
    xmlns:ns2="http://example.com/ns2">
    <ns1:tag>foo</ns1:tag>
    <ns1:tag>bar</ns1:tag>
    <ns2:tag key="value">baz</ns2:tag>
</Document>
é   rW   r˜   zns1:tagr@   zns2:tag)r    rE   rÕ   r›  s      r   Útest_find_by_prefixed_namez2XMLTreeBuilderSmokeTest.test_find_by_prefixed_nameP  sm   € ðˆð �y‰y˜‹~ˆð ”C˜Ÿ™ eÓ,Ó-Ò-Ñ-ð ”C˜Ÿ™ iÓ0Ó1Ò1Ñ1Ø”C˜Ÿ™ iÓ0Ó1Ò1Ñ1àØr   c                 ó¢   — d}| j                  |«      }|j                  }t        j                  |«      }|j                  |j                  k(  sJ ‚y )Nzf<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:w="http://example.com/ns0"/>)r    Údocumentrà   Úprefix)r   Úxmlr    rW   Ú	duplicates        r   Ú!test_copy_tag_preserves_namespacez9XMLTreeBuilderSmokeTest.test_copy_tag_preserves_namespacef  sH   € ð2ˆð �y‰y˜‹~ˆØ�m‰mˆÜ—I‘I˜c“Nˆ	ð �z‰z˜Y×-Ñ-Ò-Ñ-Ð-r   c                 óP   — | j                  t        «      }| j                  |«       yr‡  rˆ  r”   s     r   rŠ  z'XMLTreeBuilderSmokeTest.test_worst_caseq  r‹  r   N)r\   r]   r^   r¢   r“  r•  r—  rÞ   rÓ   r�  rŸ  r?  r¤  r§  rª  r¬  r®  r°  r²  rµ  r·  rº  rÀ  rŠ  r"   r   r   r�  r�  Í  sm   „ ò0òSò-ò
;ò&-ò
	.ò	$ò
5ò4ò
4ò
'ò
\ò.ò'ò8ò%ò
'ò
'ò
=ò,	.ó%r   r�  c                   ó.   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zy)ÚHTML5TreeBuilderSmokeTestz2Smoke test for a tree builder that supports HTML5.c                  ó   — y r   r"   r   s    r   rÓ   z2HTML5TreeBuilderSmokeTest.test_real_xhtml_document{  s   € ð 	r   c                 ó`   — d}| j                  |«      }d|j                  j                  k(  sJ ‚y )Nz<a>r6  )r    rk   Ú	namespacerr   s      r   Útest_html_tags_have_namespacez7HTML5TreeBuilderSmokeTest.test_html_tags_have_namespace€  s-   € ØˆØ�y‰y˜Ó ˆØ-°·±×1AÑ1AÒAÑAÐAr   c                 óš   — d}| j                  |«      }d}||j                  j                  k(  sJ ‚||j                  j                  k(  sJ ‚y )Nz<svg><circle/></svg>r9  )r    ÚsvgrÆ  Úcircle©r   r   r    rÆ  s       r   Útest_svg_tags_have_namespacez6HTML5TreeBuilderSmokeTest.test_svg_tags_have_namespace…  sG   € Ø'ˆØ�y‰y˜Ó ˆØ0ˆ	Ø˜DŸH™H×.Ñ.Ò.Ñ.Ø˜DŸK™K×1Ñ1Ò1Ñ1Ð1r   c                 óš   — d}| j                  |«      }d}||j                  j                  k(  sJ ‚||j                  j                  k(  sJ ‚y )Nz<math><msqrt>5</msqrt></math>r8  )r    ÚmathrÆ  ÚmsqrtrË  s       r   Útest_mathml_tags_have_namespacez9HTML5TreeBuilderSmokeTest.test_mathml_tags_have_namespace�  sG   € Ø0ˆØ�y‰y˜Ó ˆØ8ˆ	Ø˜DŸI™I×/Ñ/Ò/Ñ/Ø˜DŸJ™J×0Ñ0Ò0Ñ0Ð0r   c                 óà   — d}| j                  |«      }t        |j                  d   t        «      sJ ‚|j                  d   dk(  sJ ‚d|j                  d   j                  j
                  k(  sJ ‚y )Nz3<?xml version="1.0" encoding="utf-8"?><html></html>r   z$?xml version="1.0" encoding="utf-8"?r¶   )r    rG   rF   r   r9   r1   rr   s      r   Ú$test_xml_declaration_becomes_commentz>HTML5TreeBuilderSmokeTest.test_xml_declaration_becomes_comment”  sc   € ØFˆØ�y‰y˜Ó ˆÜ˜$Ÿ-™-¨Ñ*¬GÔ4Ñ4Ø�}‰}˜QÑÐ#IÒIÑIØ˜Ÿ™ qÑ)×6Ñ6×;Ñ;Ò;Ñ;Ð;r   N)	r\   r]   r^   r�  rÓ   rÇ  rÌ  rÐ  rÒ  r"   r   r   rÃ  rÃ  x  s   „ Ù<òò
Bò
2ò1ó<r   rÃ  )*r�  Ú__license__rš   rà   Ú	functoolsrÎ   rt   Úbs4r   Úbs4.elementr   r   r   r   r	   r
   r   r   r   Úbs4.builderr   r   r   r   Ú	soupsiever   ÚSOUP_SIEVE_PRESENTÚImportErrorÚhtml5libÚHTML5LIB_PRESENTÚ
lxml.etreeÚlxmlÚLXML_PRESENTÚetreeÚLXML_VERSIONr‰  Úobjectr   rb   ry   r�  rÃ  r"   r   r   ú<module>rã     s  ðá ð €ã Û Û Û Û Ý ÷
÷ 
õ 
÷ñ ð
 (€ð
Ý-ØÐðÛØÐðÛØ€LØ—:‘:×*Ñ*€Lð
"€ôJx;ˆvô x;ôv!˜6ô !ô6X
%Ð3ô X
%ôvh%Ð2ô h%ôV!<Ð 8õ !<øðe" ò ØÒðûð ò ØÒðûð ò Ø€LØ‚Lðús6   ÁB( ÁB5 ÁC Â(B2Â1B2Â5B?Â>B?Ã	CÃC