/usr/lib/python3/dist-packages/bs4/__pycache__
NameSizeModeActions
dammit.cpython-310.pyc1655490644editdlrm
diagnose.cpython-310.pyc82980644editdlrm
element.cpython-310.pyc648580644editdlrm
formatter.cpython-310.pyc60810644editdlrm
testing.cpython-310.pyc435140644editdlrm
__init__.cpython-310.pyc231550644editdlrm
Edit: /usr/lib/python3/dist-packages/bs4/__pycache__/testing.cpython-310.pyc (43514B)
o 7a4@sdZdZddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z m Z m Z mZmZmZmZmZmZddlmZeZdZGd d d ejZGd d d eZGd ddeZGdddeZGdddeZddZdS)zHelper classes for tests.MITN)TestCase) BeautifulSoup) CharsetMetaAttributeValueCommentContentMetaAttributeValueDoctypePYTHON_SPECIFIC_ENCODINGS SoupStrainerScript StylesheetTag)HTMLParserTreeBuilderu- A bare string
HTML5 does allow CDATA sections in SVG
A tag
A
tag that supposedly has contents.
AT&T
This numeric entity is missing the final semicolon:
, that attribute value was closed by the subsequent tag
a
This document contains (do you see it?)
This document ends with That attribute value was bogus
The doctype is invalid because it contains extra whitespace
That boolean attribute had no value
Here's a nonexistent entity: &#foo; (do you see it?)
This document ends before the entity finishes: >

Paragraphs shouldn't contain block display elements, but this one does:

you see?

Multiple values for the same attribute.
Here's a table
This tag contains nothing but whitespace:

This p tag is cut off by

the end of the blockquote tag
Here's a nested table:
foo
This table contains bare markup
This document contains a surprise doctype
Tag name contains Unicode characters
c@sDeZdZeddZddZddZddd Zd d Zdd dZ dS)SoupTestcCstSN)default_builderselfr-/usr/lib/python3/dist-packages/bs4/testing.pyrDszSoupTest.default_buildercKs"|d|j}t|fd|i|S)z*Build a Beautiful Soup object from markup.builder)poprr)rmarkupkwargsrrrrsoupHsz SoupTest.soupcKs|jdi||S)z[Turn an HTML fragment into a document. The details depend on the builder. Nr)rtest_fragment_to_document)rrrrrr document_forMszSoupTest.document_forNcCst|j}t||d}|dur|}||||tddt|jDs*J||j gdd|j DdS)N)rcss|]}|dkVqdS)rNr).0vrrr bsz,SoupTest.assertSoupEquals..cSsg|]}|jqSr)name)rxrrr gsz-SoupTest.assertSoupEquals..) rr assertEqualdecoderalllistopen_tag_countervalues ROOT_TAG_NAMEtagStack)rto_parsecompare_parsed_torobjrrrassertSoupEqualsTs  zSoupTest.assertSoupEqualscCs8d}|jD]}|r|||j|||j|}qdS)zyEnsure that next_element and previous_element are properly set for all descendants of the given element. N) descendantsr# next_elementprevious_element)relementearliererrrassertConnectednessjs zSoupTest.assertConnectednessFc Csd}|jdur4|jdusJd||jd|jdus%Jd||jd|jdus4Jd||jdd}d}d}t|jd}|jD]}d}|dkr|jdur~|j|us`Jd||j||j|usoJd||j||jdus~Jd||jdn\|j|j|dusJd ||j|j|d|j|dj|usJd |j|d|j|dj||dur|j|usJd ||j||jj|j|usJd ||j|t|t r|jr| |d }|jdusJd ||jd|dur|}n|}||kr|jdusJd ||jd|d7}qD|dur"|n|}|dur+|}|sn|durn|} |durN|jdusKJd ||jd dS|jduri|j|jusfJd ||j|j dS|j}q6|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: {}rz/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) parentr1formatprevious_sibling next_siblinglencontentsr0 isinstancer linkage_validator) rel_recursive_call descendantidxchild last_childlast_idxtargetrrrr>us                   zSoupTest.linkage_validatorr)F) __name__ __module__ __qualname__propertyrrrr.r5r>rrrrrBs   rc@seZdZddZdS)TreeBuilderSmokeTestc CsHg}|D]}tjdd ||}Wdn1swYqdS)NF)record)warningscatch_warningsr)r bad_markuprrrrrtest_fuzzed_inputs  z&TreeBuilderSmokeTest.test_fuzzed_inputN)rGrHrIrPrrrrrKs rKc@s eZdZdZddZddZddZdd Zdd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Z d=d>Z!d?d@Z"dAdBZ#dCdDZ$dEdFZ%dGdHZ&dIdJZ'dKdLZ(dMdNZ)dOdZdPdQZ*dRdSZ+dTdUZ,dVdWZ-dXdYZ.dZd[Z/d\d]Z0d^d_Z1d`daZ2dbdcZ3dddeZ4dfdgZ5dhdiZ6djdkZ7dldmZ8dndoZ9dpdqZ:drdsZ;dtduZdzd{Z?d|d}Z@d~dZAdS)HTMLTreeBuilderSmokeTestaCA 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. cCs0dD]}|d}||}|d|jqdS)zmVerify that all HTML4 and HTML5 empty element (aka void element) tags are handled correctly. )areabasebrcolembedhrimginputkeygenlinkmenuitemmetaparamsourcetrackwbrspacerframeTN)rnew_tagr#is_empty_element)rr rrerrrtest_empty_element_tagss   z0HTMLTreeBuilderSmokeTest.test_empty_element_tagscCsp|d}t|jjtsJt|jjtsJ|d}t|jjts%J|d|jjt|jjts6JdS)Nz7zz)rr=stylestringr scriptr r#rrrrrtest_special_string_containers sz7HTMLTreeBuilderSmokeTest.test_special_string_containerscCF|d}t|d}t|}||jt|||dSNz foorpickledumpsloadsr# __class__rr$rtreedumpedloadedrrr!test_pickle_and_unpickle_identity0   z:HTMLTreeBuilderSmokeTest.test_pickle_and_unpickle_identitycCsh||\}}|jd}||jt|||||ddt||||jjdddS)z8Assert that a given doctype string is handled correctly.rutf8Nfoo_document_with_doctyper<r#rtrencoder;prdoctype_fragment doctype_strrdoctyperrrassertDoctypeHandled9s  z-HTMLTreeBuilderSmokeTest.assertDoctypeHandledDOCTYPEcCs,d||f}|d}||}|d|fS)z5Generate and parse a document with the given doctype.zz

foo

r{)rr)rrdoctype_stringrrrrrrr~Js  z/HTMLTreeBuilderSmokeTest._document_with_doctypecCs|d|ddS)z?Make sure normal, everyday HTML doctypes are handled correctly.htmlz4html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"Nrrrrrtest_normal_doctypesQs z-HTMLTreeBuilderSmokeTest.test_normal_doctypescCs(|d}|jd}|d|dS)Nz rrd)rr<r#strip)rrrrrrtest_empty_doctypeWs  z+HTMLTreeBuilderSmokeTest.test_empty_doctypecCstdD]5}|d|\}}|jd}||jt||d||ddt|d||jjddqdS)N)rDocTyperrr{sr|r}rrrrtest_mixed_case_doctype\s  z0HTMLTreeBuilderSmokeTest.test_mixed_case_doctypecCd}||dS)Nznhtml PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"r)rrrrrtest_public_doctype_with_urlqz5HTMLTreeBuilderSmokeTest.test_public_doctype_with_urlcC|ddS)Nz$foo SYSTEM "http://www.example.com/"rrrrrtest_system_doctypeuz,HTMLTreeBuilderSmokeTest.test_system_doctypecCr)Nz#xsl:stylesheet SYSTEM "htmlent.dtd"rrrrrtest_namespaced_system_doctypexz7HTMLTreeBuilderSmokeTest.test_namespaced_system_doctypecCr)Nz#xsl:stylesheet PUBLIC "htmlent.dtd"rrrrrtest_namespaced_public_doctype|rz7HTMLTreeBuilderSmokeTest.test_namespaced_public_doctypecCs4d}||}||ddd|dddS)zJA real XHTML document should come out more or less the same as it went in. Hello. Goodbye. utf-8 N)rr#rreplacerrrrrrtest_real_xhtml_documents   z1HTMLTreeBuilderSmokeTest.test_real_xhtml_documentcCs(d}||}|dt|ddS)ztWhen a namespaced XML document is parsed as HTML it should be treated as HTML with weird tag names. s.contentrozns1:fooNrr#r;find_allrrrrtest_namespaced_html z-HTMLTreeBuilderSmokeTest.test_namespaced_htmlcCsBd}||}|||d}||}|||ddS)Nzsr{)rr#r$rrrrrtest_processing_instructions   z4HTMLTreeBuilderSmokeTest.test_processing_instructioncCst|jdS)zMake 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)copydeepcopyrrrrr test_deepcopysz&HTMLTreeBuilderSmokeTest.test_deepcopycC.|d}||jj|t|jddS)zA

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. 



N)r assertFalserrfr#strrkrrr!test_p_tag_is_never_empty_element z:HTMLTreeBuilderSmokeTest.test_p_tag_is_never_empty_elementcCs(|dd|dd|dddS)zA tag that's not closed by the end of the document should be closed. This applies to all tags except empty-element tags. 

rzzz

Nr.rrrrtest_unclosed_tags_get_closeds  z6HTMLTreeBuilderSmokeTest.test_unclosed_tags_get_closedcCr)zA
tag is designated as an empty-element tag. Some parsers treat

as one
tag, some parsers as two tags, but it should always be an empty-element tag. z

rN)r assertTruerTrfr#rrkrrr#test_br_is_always_empty_element_tagrzrrrrrtest_nested_formatting_elementsrz8HTMLTreeBuilderSmokeTest.test_nested_formatting_elementscCs(d}||}|d|dddS)Nz Ordinary HEAD element test Hello, world! ztext/javascriptrjtype)rr#find)rrrrrrtest_double_heads z)HTMLTreeBuilderSmokeTest.test_double_headcCsjd}||||}|jdd}||jt|jdd}|||j|jdd}|||jdS)Nz

foobaz

foobar)textr|baz)r.rrr#rtrr0r1)rrrcommentr|rrrr test_comments     z%HTMLTreeBuilderSmokeTest.test_commentcCstd}d}||||||}||j|||}||j||d}||jddS)zWhitespace must be preserved in
 and zN)r.rr#preprettifytextarea)r
pre_markuptextarea_markuprrrr-test_preserved_whitespace_in_pre_and_textareas




zFHTMLTreeBuilderSmokeTest.test_preserved_whitespace_in_pre_and_textareacCs.d}||d}||d}||dS)z+Inline elements can be nested indefinitely.zInside a B tagz!

A nested tag

z/

A doubly nested tag

Nr)rb_tag nested_b_tagdouble_nested_b_tagrrrtest_nested_inline_elementss   z4HTMLTreeBuilderSmokeTest.test_nested_inline_elementscCs6|d}|j}||jjjd||jjddS)zBlock elements can be nested.z*

Foo

FooN)r blockquoter#rbri)rrrrrr test_nested_block_level_elementss z9HTMLTreeBuilderSmokeTest.test_nested_block_level_elementscCsd}||d|ddS)z$One table can go inside another one.z[zh
Here's another table:
foo
Here's another table:
foo
z{
Foo
Bar
Baz
Nr)rrrrrtest_correctly_nested_tablessz5HTMLTreeBuilderSmokeTest.test_correctly_nested_tablescCs@d}||}|ddg|jd||j|jddddS)Nz
r|barclassdivzfoo bar)class_)rr#rrrrrr*test_multivalued_attribute_with_whitespace#s zCHTMLTreeBuilderSmokeTest.test_multivalued_attribute_with_whitespacecCs(d}||}|dg|jjddS)Nz1
cssr)rr#rrrrr(test_deeply_nested_multivalued_attribute/rzAHTMLTreeBuilderSmokeTest.test_deeply_nested_multivalued_attributecC(d}||}|ddg|jddS)Nzarr)rr#rrrrr"test_multivalued_attribute_on_html7rz;HTMLTreeBuilderSmokeTest.test_multivalued_attribute_on_htmlcC|dddS)Nzzrrrrr3test_angle_brackets_in_attribute_values_are_escaped?szLHTMLTreeBuilderSmokeTest.test_angle_brackets_in_attribute_values_are_escapedcCr)Nz$

• AT&T is in the s&p 500

u)

• AT&T is in the s&p 500

rrrrr3test_strings_resembling_character_entity_referencesBszLHTMLTreeBuilderSmokeTest.test_strings_resembling_character_entity_referencescCr)Nz

Bob's Bar

z

Bob's Bar

rrrrrtest_apos_entityJsz)HTMLTreeBuilderSmokeTest.test_apos_entitycC"d}||}|d|jjdS)Nz%

“Hello” -☃

u“Hello” -☃rr#rrirrrr*test_entities_in_foreign_document_encodingPs zCHTMLTreeBuilderSmokeTest.test_entities_in_foreign_document_encodingcC8d}|d||d||d||d|dS)Nu

z

z

z

z

rrexpectrrr0test_entities_in_attributes_converted_to_unicode\    zIHTMLTreeBuilderSmokeTest.test_entities_in_attributes_converted_to_unicodecCr)Nu

piñata

z

piñata

z

piñata

z

piñata

z

piñata

rrrrr*test_entities_in_text_converted_to_unicodecrzCHTMLTreeBuilderSmokeTest.test_entities_in_text_converted_to_unicodecCr)Nz#

I said "good day!"

z

I said "good day!"

rrrrr,test_quot_entity_converted_to_quotation_markjzEHTMLTreeBuilderSmokeTest.test_quot_entity_converted_to_quotation_markcCs,d}|d||d||d|dS)Nu�z�z�z �rrrrrtest_out_of_range_entityns  z1HTMLTreeBuilderSmokeTest.test_out_of_range_entitycCs<|d}|d|jjjj|d|jj||dS)zDMostly to prevent a recurrence of a bug in the html5lib treebuilder.z!

foo

rN)rr#h2rir0r rr5rkrrrtest_multipart_stringsts z/HTMLTreeBuilderSmokeTest.test_multipart_stringscCs|dd|dddS)zqVerify consistent handling of empty-element tags, no matter how they come in through the markup. z


z


Nrrrrrrg{s cCs,d}||}|d|jj||dS)8Prevent recurrence of a bug in the html5lib treebuilder.z? foo N)rassertNotEqualrbodyr5rcontentrrrr#test_head_tag_between_head_and_bodys z N)rr5articlerrrrtest_multiple_copies_of_a_tags z6HTMLTreeBuilderSmokeTest.test_multiple_copies_of_a_tagcCs^d}||}||||j}|d|jd|d|jd|d|jddS) zParsers don't need to *understand* namespaces, but at the very least they should not choke on namespaces or lose data.s4http://www.w3.org/1999/xhtmlxmlns"http://www.w3.org/1998/Math/MathMLz xmlns:mathmlhttp://www.w3.org/2000/svgz xmlns:svgN)rr#rr)rrrrrrrtest_basic_namespacess   z.HTMLTreeBuilderSmokeTest.test_basic_namespacescCr)Nsr|rr)rr#rrrrr-test_multivalued_attribute_value_becomes_lists zFHTMLTreeBuilderSmokeTest.test_multivalued_attribute_value_becomes_listcCr)NuDSacré bleu! Sacré bleu!)rr#rrirrrrtest_can_parse_unicode_documents z8HTMLTreeBuilderSmokeTest.test_can_parse_unicode_documentcCs*td}|jd|d}||ddS)z2Parsers should be able to work with SoupStrainers.rz&A bold statement) parse_onlyz boldN)r rr#r$)rstrainerrrrrtest_soupstrainers z*HTMLTreeBuilderSmokeTest.test_soupstrainercCr)Nzzrrrrr7test_single_quote_attribute_values_become_double_quotesrzPHTMLTreeBuilderSmokeTest.test_single_quote_attribute_values_become_double_quotescCr)N'ar)rrrrr7test_attribute_values_with_nested_quotes_are_left_alonerzPHTMLTreeBuilderSmokeTest.test_attribute_values_with_nested_quotes_are_left_alonecCs.d}||}d|jd<||jddS)NrzBrawls happen at "Bob's Bar"attrz:a)rr|r.r$)rrrrrr:test_attribute_values_with_double_nested_quotes_get_quoteds  zSHTMLTreeBuilderSmokeTest.test_attribute_values_with_double_nested_quotes_get_quotedcCs|dd|dddS)Nz+z/z.fooz2foorrrrr.test_ampersand_in_attribute_value_gets_escapedszGHTMLTreeBuilderSmokeTest.test_ampersand_in_attribute_value_gets_escapedcCr)Nz/rrrrr7test_escaped_ampersand_in_attribute_value_is_left_alonerzPHTMLTreeBuilderSmokeTest.test_escaped_ampersand_in_attribute_value_is_left_alonecCsd}d}|||dS)N-

<<sacré bleu!>>

#

<<sacré bleu!>>

r)rrexpectedrrr1test_entities_in_strings_converted_during_parsingszJHTMLTreeBuilderSmokeTest.test_entities_in_strings_converted_during_parsingcCs"d}||}||jjddS)Ns

Foo

u ‘Foo’r)rquoterrrr)test_smart_quotes_converted_on_the_way_ins  zBHTMLTreeBuilderSmokeTest.test_smart_quotes_converted_on_the_way_incCs|d}||jjddS)Nz  u  )rr#rrirkrrr0test_non_breaking_spaces_converted_on_the_way_ins zIHTMLTreeBuilderSmokeTest.test_non_breaking_spaces_converted_on_the_way_incCs0d}dd}||}||jd|dS)Nrrr)rrr#r)rrrrrrr&test_entities_converted_on_the_way_outs  z?HTMLTreeBuilderSmokeTest.test_entities_converted_on_the_way_outcCsHd}|d}||}|d}|dd}|d}|||dS)Nu

Sacré bleu!

z iso-8859-1rz ISO-Latin-1)rrrr#)r unicode_htmliso_latin_htmlrresultrrrrtest_real_iso_latin_documents     z5HTMLTreeBuilderSmokeTest.test_real_iso_latin_documentcCsLd}|d}||}||d|d||d|ddS)Nsk
Shift-JISŃR[fBOꂽ{̃t@CłB
z shift-jisreuc_jp)r$rr#r)rshift_jis_htmlr rrrrtest_real_shift_jis_documents   z5HTMLTreeBuilderSmokeTest.test_real_shift_jis_documentcCsBd}|j|dd}|jdvsJ||d|dddS)NsHebrew (ISO 8859-8) in Visual Directionality

Hebrew (ISO 8859-8) in Visual Directionality

iso8859-8) from_encoding)rz iso-8859-8r)roriginal_encodingr#rr$)rhebrew_documentrrrrtest_real_hebrew_document)sz2HTMLTreeBuilderSmokeTest.test_real_hebrew_documentcCs`d}d|}||}|dddi}|d}|d||t|t|d|d dS) NzEj %s Shift-JIS markup goes here.r]z http-equivz Content-typerztext/html; charset=x-sjisztext/html; charset=utf8r{)rrr#rr=rr)rmeta_tagrr parsed_metarrrr'test_meta_tag_reflects_current_encoding6s  z@HTMLTreeBuilderSmokeTest.test_meta_tag_reflects_current_encodingcCs^d}d|}||}|jddd}|d}|d||t|t|d|ddS) Nz'rr]encoding)idcharsetzx-sjisr{)rrr#rr=rr)rrrrrrrrr3test_html5_style_meta_tag_reflects_current_encodingRs  zLHTMLTreeBuilderSmokeTest.test_html5_style_meta_tag_reflects_current_encodingcCsTdD]%}||}tD]}|dvrq ||}d|vsJ|d|vs&Jq qdS)N)sBidnambcsoem undefined string_escapez string-escapesmeta charset=""asciirr rrrrrencodedrrr2test_python_specific_encodings_not_used_in_charsetjs   zKHTMLTreeBuilderSmokeTest.test_python_specific_encodings_not_used_in_charsetcCs*|d}d|jd<|d|jdS)Nz textrr|ztext)rrr#r$)rdatarrr5test_tag_with_no_attributes_can_have_attributes_addeds  zNHTMLTreeBuilderSmokeTest.test_tag_with_no_attributes_can_have_attributes_addedcCs |d}|d|jdS)Nz0

text1

text2
z)

text1

text2
)rr#rr$rkrrr$test_closing_tag_with_no_opening_tags  z=HTMLTreeBuilderSmokeTest.test_closing_tag_with_no_opening_tagcC|t}||dSz3Test the worst case (currently) for linking issues.Nr BAD_DOCUMENTr>rkrrrtest_worst_case z(HTMLTreeBuilderSmokeTest.test_worst_caseN)r)BrGrHrI__doc__rgrlryrr~rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r rrrrr(r*r+r0rrrrrQ s               rQc@seZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)S)*XMLTreeBuilderSmokeTestcCrmrnrprurrrryrzz9XMLTreeBuilderSmokeTest.test_pickle_and_unpickle_identitycCs|d}||ddS)Ns. rr#rrkrrrtest_docstring_generateds z0XMLTreeBuilderSmokeTest.test_docstring_generatedcC$d}||}|||ddS)Ns, r{r5rrrrtest_xml_declaration z,XMLTreeBuilderSmokeTest.test_xml_declarationcCsNd}||}tD]}|dvrq ||}d|vsJ|d|vs$Jq dS)Ns rsr$r%r&rrr:test_python_specific_encodings_not_used_in_xml_declarations   zRXMLTreeBuilderSmokeTest.test_python_specific_encodings_not_used_in_xml_declarationcCr7)Ns< r{r5rrrrrr9z3XMLTreeBuilderSmokeTest.test_processing_instructioncC$d}||}||d|dS)zGA real XHTML document should come out *exactly* the same as it went in.rrNr5rrrrrs   z0XMLTreeBuilderSmokeTest.test_real_xhtml_documentcCs"d}||}|||dS)Ns r5rdocrrrrtest_nested_namespacess z.XMLTreeBuilderSmokeTest.test_nested_namespacescCs0d}t|d}d|j_|}|d|vdS)Nz/ zlxml-xmlzconsole.log("< < hey > > ");s< < hey > >)rrjrirr)rr=rr'rrr5test_formatter_processes_script_tag_for_xml_documentss  zMXMLTreeBuilderSmokeTest.test_formatter_processes_script_tag_for_xml_documentscCr)Nu?Sacré bleu!r)rr#rootrirrrrr z7XMLTreeBuilderSmokeTest.test_can_parse_unicode_documentcC$d}||}|t|j|dS)Nzb2012-07-02T20:33:42Zcd)rr#rrssrrrrtest_popping_namespaced_tags   z3XMLTreeBuilderSmokeTest.test_popping_namespaced_tagcCs |d}||dddS)Nr4latin1s/ r5rkrrr(test_docstring_includes_correct_encodings z@XMLTreeBuilderSmokeTest.test_docstring_includes_correct_encodingcCr;)z 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000rNr5rrrrtest_large_xml_documents z/XMLTreeBuilderSmokeTest.test_large_xml_documentcCs|dd|ddS)Nrrz

foo

rrrrr9test_tags_are_empty_element_if_and_only_if_they_are_emptys zQXMLTreeBuilderSmokeTest.test_tags_are_empty_element_if_and_only_if_they_are_emptycCs8d}||}|j}|d|d|d|ddS)NzThis tag is in the a namespaceThis tag is in the b namespacezhttp://example.com/zxmlns:azhttp://example.net/zxmlns:b)rr@r#)rrrr@rrrtest_namespaces_are_preserveds  z5XMLTreeBuilderSmokeTest.test_namespaces_are_preservedcCrB)NzN

20010504

)rr#rrrrrrtest_closing_namespaced_tag r9z3XMLTreeBuilderSmokeTest.test_closing_namespaced_tagcCrB)Nzsrr#rr|rrrrtest_namespaced_attributesr9z2XMLTreeBuilderSmokeTest.test_namespaced_attributescCrB)NzbarrKrrrr(test_namespaced_attributes_xml_namespacer9z@XMLTreeBuilderSmokeTest.test_namespaced_attributes_xml_namespacecCsd}||}|dt|d|dt|d|dt|d|dt|jddd |dt|ddgdS) Na foo bar baz tagrozns1:tagr6zns2:tagvalue)keyrr<rrrtest_find_by_prefixed_names z2XMLTreeBuilderSmokeTest.test_find_by_prefixed_namecCs2d}||}|j}t|}||j|jdS)Nzf )rdocumentrr#prefix)rxmlrrO duplicaterrr!test_copy_tag_preserves_namespace1s   z9XMLTreeBuilderSmokeTest.test_copy_tag_preserves_namespacecCr,r-r.rkrrrr0<r1z'XMLTreeBuilderSmokeTest.test_worst_caseN)rGrHrIryr6r8r:rrr>r?rrDrFrGrHrIrJrLrMrRrWr0rrrrr3s*      r3c@s8eZdZdZddZddZddZdd Zd d Zd S) HTML5TreeBuilderSmokeTestz2Smoke test for a tree builder that supports HTML5.cCdSrrrrrrrFsz2HTML5TreeBuilderSmokeTest.test_real_xhtml_documentcCr)Nz
r)rr#r namespacerrrrtest_html_tags_have_namespaceKrAz7HTML5TreeBuilderSmokeTest.test_html_tags_have_namespacecC6d}||}d}|||jj|||jjdS)Nzr)rr#svgrZcirclerrrrZrrrtest_svg_tags_have_namespaceP  z6HTML5TreeBuilderSmokeTest.test_svg_tags_have_namespacecCr\)Nz5r)rr#mathrZmsqrtr_rrrtest_mathml_tags_have_namespaceXraz9HTML5TreeBuilderSmokeTest.test_mathml_tags_have_namespacecCsPd}||}|t|jdt||jdd|d|jdjjdS)Nz3rz$?xml version="1.0" encoding="utf-8"?r)rrr=r<rr#r0r rrrr$test_xml_declaration_becomes_comment_s  z>HTML5TreeBuilderSmokeTest.test_xml_declaration_becomes_commentN) rGrHrIr2rr[r`rdrerrrrrXCs rXcsddfdd}|S)Nc_rYrr)testargsrrrrnothinggszskipIf..nothingcs rS|Srr) test_item conditionrhrr decoratorjszskipIf..decoratorr)rkreasonrlrrjrskipIffsrn)r2 __license__rqr functoolsunittestrMrbs4r bs4.elementrrrrr r r r r bs4.builderrrr/robjectrKrQr3rXrnrrrrs4  , %'"- #