python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_htmlparser.cpython-312.opt-2.pyc

ΑexB	ddlZddlZddlZddlmZGddejjZGddeZ	GddeZ
Gd	d
ejZGddeZ
Gd
deZGddejZedk(rej"yy)N)patchcTeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZy
)EventCollectorcg|_|jj|_tjjj
|g|i|yN)eventsappendhtmlparser
HTMLParser__init__)selfargskws   H/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_htmlparser.pyr
zEventCollector.__init__s<kk(('':t:r:cg}d}|jD]<}|d}||cxk(rdk(rnnd|dd|dzf|d<n|j||}>||_|S)Nrdata)rr	)rLprevtypeeventtypes     r
get_eventszEventCollector.get_eventsst
[[	E8Dx)6)2qE!H!45"H
	rc,|jd||fy)Nstarttagr	rtagattrss   rhandle_starttagzEventCollector.handle_starttag"sZe,-rc,|jd||fy)Nstartendtagrrs   rhandle_startendtagz!EventCollector.handle_startendtag%s]C/0rc*|jd|fy)Nendtagr)rr s  r
handle_endtagzEventCollector.handle_endtag(sXsO$rc*|jd|fy)Ncommentrrrs  rhandle_commentzEventCollector.handle_comment-Y%&rc*|jd|fy)Ncharrefrr+s  rhandle_charrefzEventCollector.handle_charref0r-rc*|jd|fy)Nrrr+s  rhandle_datazEventCollector.handle_data3VTN#rc*|jd|fy)Ndeclrr+s  rhandle_declzEventCollector.handle_decl6r3rc*|jd|fy)N	entityrefrr+s  rhandle_entityrefzEventCollector.handle_entityref9s[$'(rc*|jd|fy)Npirr+s  r	handle_pizEventCollector.handle_pi<sT4L!rc*|jd|fy)Nunknown declr)rr5s  runknown_declzEventCollector.unknown_decl?s^T*+rN)__name__
__module____qualname__r
rr"r%r(r,r0r2r6r9r<r?rrrr
s>;

".1%
''$$)",rrceZdZdZy)EventCollectorExtracttj||||jd|jfy)N
starttag_text)rr"r	get_starttag_textrs   rr"z#EventCollectorExtra.handle_starttagEs.&&tS%8_d&<&<&>?@rN)r@rArBr"rCrrrErECsArrEceZdZdZdZy)EventCollectorCharrefsc&|jdyNz6This should never be called with convert_charrefs=Truefailr+s  rr0z%EventCollectorCharrefs.handle_charrefL		JKrc&|jdyrLrMr+s  rr9z'EventCollectorCharrefs.handle_entityrefOrOrN)r@rArBr0r9rCrrrJrJJsLLrrJc eZdZdZddZdZy)TestCaseBasectdSNFconvert_charrefs)rrs r
get_collectorzTestCaseBase.get_collectorUs
u55rNcF||j}|}|D]}|j||j|j}||k7rP|j	dt|zdzt
j|zdzt
j|zyy)Nz6received events did not match expected events
Source:
z
Expected:
z
Received:
)rXfeedcloserrNreprpprintpformat)rsourceexpected_events	collectorrsrs       r
_run_checkzTestCaseBase._run_checkXs**,I	AKKN	""$_$II$&*6l3%&(.(GH&&)/v(>?
@%rc>|j||tdyrT)rcrE)rr_rs   r_run_check_extrazTestCaseBase._run_check_extrafs+UC	Err)r@rArBrXrcrerCrrrRrRSs6@ErrRceZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZy)HTMLParserTestCasecP|jddg|jddgy)Nz<?processing instruction>)r;zprocessing instructionz<?processing instruction ?>)r;zprocessing instruction ?rcrWs r test_processing_instruction_onlyz3HTMLParserTestCase.test_processing_instruction_onlyms23,6		
5.8	rcZ|jddddddgfddddddd	d
dgfdd
dddddgy)Nz
<!DOCTYPE html PUBLIC 'foo'>
<HTML>&entity;&#32;
<!--comment1a
-></foo><bar>&lt;<?pi?></foo<bar
comment1b-->
<Img sRc='Bar' isMAP>sample
text
&#x201C;
<!--comment2a-- --comment2b-->
</Html>
)r
)r5zDOCTYPE html PUBLIC 'foo'rr
)r8entity)r/32)r*z4comment1a
-></foo><bar>&lt;<?pi?></foo<bar
comment1bimg)srcBar)ismapN)rzsample
text
)r/x201C)r*zcomment2a-- --comment2br'r
rirWs rtest_simple_htmlz#HTMLParserTestCase.test_simple_htmlus`)I9:*#	rcf|jdddgfddg|jdgddgfddgy)	Nz
<p>&#bad;</p>rp)rz&#bad;r'rwz<div>&#bad;</div>divr'ryrirWs rtest_malformatted_charrefz,HTMLParserTestCase.test_malformatted_charrefsN
b!*
		
,-
#0
	rc,|jdddgy)Nz&entityref foo)r8r8)rz foorirWs rtest_unclosed_entityrefz*HTMLParserTestCase.test_unclosed_entityrefs(&+	rc<|jdddgfddgfddgy)Nz<a><b></a></b>rabr'rr'rrirWs rtest_bad_nestingz#HTMLParserTestCase.test_bad_nestings2	
(
b!
b!	+	rc*|jddgy)N#this text & contains & ampersands &)rrrirWs rtest_bare_ampersandsz'HTMLParserTestCase.test_bare_ampersandss=;@	rc*|jddgy)N.this < text > contains < bare>pointy< brackets)rrrirWs rtest_bare_pointy_bracketsz,HTMLParserTestCase.test_bare_pointy_bracketssHFK	rc`|jddddgfg|jddddgfgy)N	<a b='<'>rrr<	<a b='>'>r>rirWs rtest_starttag_end_boundaryz-HTMLParserTestCase.test_starttag_end_boundarys6:sZL*I)JK:sZL*I)JKrcdddgfg}|jdg||jddg||jddg||jd	d
g||jddg||jd
dg|dddgfg}|jdg||jddg||jddg||jd	dg||jddg||jddg|dg}|jddg||jddg||jddg||jddg||jdd g||jd!d"g||jd#d$g||jd%d&g||jd'd(g||jd)dg||jddg|y)*Nrrrrz<a zb='<'>z<a bz='<'>z<a b=z'<'>z<a b='<z'>z<a b='<'rrrzb='>'>z='>'>z'>'>z<a b='>z<a b='>')r*abcz
<!--abc-->rz	!--abc--><!z--abc-->z<!-z-abc-->z<!--zabc-->z<!--azbc-->z<!--abzc-->z<!--abcz-->z<!--abc-z->z	<!--abc--riroutputs  rtest_buffer_artefactsz(HTMLParserTestCase.test_buffer_artefactsssZL12
v.)62)62&)62D)62S)62sZL12
v.)62)62&)62D)62S)62$%\*F3k*F3z*F3	*F3*F3'*F36*F3E*F3T*F3c*F3r*F3rcPgd}|D]}|jd|zdd|zfgy)N)
HTMLzOHTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"z[HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"zbhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"zfhtml PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"zYmath PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd"zhtml PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"zWsvg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"z'html PUBLIC "-//IETF//DTD HTML 2.0//EN"z,html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"z
<!DOCTYPE %s>r5zDOCTYPE ri)rdtdsdtds   rtest_valid_doctypesz&HTMLParserTestCase.test_valid_doctypess>@$	:COOOc1$j3&678
:	:rc|jdddgfg|jdddgfdg|jdddgfddd	gfdgy)
Nz<p/>r$rwz<p></p>rrxz<p><img src='foo' /></p>ro)rpfoorirWs rtest_startendtagz#HTMLParserTestCase.test_startendtagsq
C$!		
	
b!$		
2
b!
EN#345	rc>d}|j|ddddgfd|fgy)Nz <foo:bar   
   one="1"	two=2   >rzfoo:bar)one1)two2rG)re)rrbs  rtest_get_starttag_textz)HTMLParserTestCase.test_get_starttag_texts34a
\<$@A
a ""	#rc	gd}gd}|D]H}|D]A}|j}dj||}|j|d|gfd|fd|fgCJy)N)z*<!-- not a comment --> &not-an-entity-ref;z<not a='start tag'>z<a href="" /> <p> <span></span>zfoo = "</scr" + "ipt>";zfoo = "</SCRIPT" + ">";zfoo = <
/script> z*<!-- document.write("</scr" + "ipt>"); -->z
//<![CDATA[
document.write('<s'+'cript type="text/javascript" src="http://www.example.org/r='+new Date().getTime()+'"><\/s'+'cript>');
//]]>z 
<!-- //
var foo = 3.14;
// -->
zfoo = "</sty" + "le>";u<!-- ☃ -->)scriptstyleSCRIPTSTYLEScriptStylez <{element}>{content}</{element}>elementcontentrrr')lowerformatrc)rcontentselementsrr
element_lowerrbs       rtest_cdata_contentz%HTMLParserTestCase.test_cdata_contents
(M	@G#
@ '


6==gGN>PZ$C%+W$5%-}$=$?@	
@	@rcGddt}d}dD]X}|jj}dj||}|j	|d|gfd|fd	|fg|d
Zy)
NceZdZdZy)BHTMLParserTestCase.test_cdata_with_closing_tags.<locals>.Collectorc|jSr)rrWs rrzMHTMLParserTestCase.test_cdata_with_closing_tags.<locals>.Collector.get_events0s{{"rN)r@rArBrrCrr	Collectorr/s
#rrz<!-- not a comment --> &not-an-entity-ref;
                  <a href="" /> </p><p> <span></span></style>
                  '</script' + '>')z scriptzscript z script z
scriptzscript
z
script
z<script>{content}</{element}>rrrr'FrUra)rrstriprrc)rrrrrrbs      rtest_cdata_with_closing_tagsz/HTMLParserTestCase.test_cdata_with_closing_tags*s
	#	#&>	IG#MMO113M/66w?F7HAOOA]B ?!' 1!)= 9 ;'0&G

I	Irc4d}gd}|j||y)Nz<!-- I'm a valid comment --><!--me too!--><!------><!----><!----I have many hyphens----><!-- I have a > in the middle --><!-- and I have -- in the middle! -->))r*z I'm a valid comment )r*zme too!)r*z--r*r)r*z--I have many hyphens--)r*z I have a > in the middle )r*z and I have -- in the middle! rirr
expecteds   r
test_commentsz HTMLParserTestCase.test_comments@s!8C	
h'rc4d}gd}|j||y)Nzs<!--[if IE & !(lte IE 8)]>aren't<![endif]--><!--[if IE 8]>condcoms<![endif]--><!--[if lte IE 7]>pretty?<![endif]-->))r*z%[if IE & !(lte IE 8)]>aren't<![endif])r*zf IE 8]>condcoms<![endif])r*z[if lte IE 7]>pretty?<![endif]rirs   r
test_condcomsz HTMLParserTestCase.test_condcomsQs!8C	
h'rc
d}|j|jgd}dddgfddg}|D]*}|jdj|||	,d
ddgdfd
dd
g}|D]*}|jdj|||	,|D]U}d
j	|gdz}d
ddgfd|fdd
ddgfd|fdd
g	}|jdj||||	Wd}tdt
|D]$}|j|d|d|d|fg|	&|jddg|	y)NctSr)rJrCrr<lambda>z:HTMLParserTestCase.test_convert_charrefs.<locals>.<lambda>\s
24r)z&quot;z&#34;z&#x22;z&quotz&#34z&#x22rr)hrefzfoo"zar)rza"zrz<a href="foo{0}zar">a{0}z</a>r)r"))xr)yz"X)zzX"z*{0}<a x="{0}" y="{0}X" z="X{0}">{0}</a>{0}Xrr)r'rr)r'rz/{1}<script>{0}</script>{1}<style>{0}</style>{1}z&quo &# &#xrno charrefs here)rr)
assertTruerVrcrjoinrangelen)rracharrefsrr/textr
rs        rtest_convert_charrefsz(HTMLParserTestCase.test_convert_charrefsZs4		445J':&;<#_6	=GOO;BB7K$	

=	="&LM!?MC 	=GOO))/$	

=	=
 		=G88WIaK(D%#Xr2VTN,m#Wb1FD>+]	<H

OO44:F44I$	

=		=q#d)$	3AOOD!HRa'9&:&/k

3	3	
*-I,J"++		/rcJ|jddddgfdddddd	gfd
ddd
g	y)NzF<html <html>te>>xt&a<<bc</a></html>
<img src="URL><//img></html</html>rr
)z<htmlN)rzte>>xt)r8r)rrzbc<)rNrt)rz
<img src="URL>)r*z/img)r'zhtml<rirWs rtest_tolerant_parsingz(HTMLParserTestCase.test_tolerant_parsingsF='/1BC..)'
>.8//	?1
	2rc|jdg|jddg|jddg|jddg|jdd	d
gfg|jddg|jd
dg|jddg|jddg|jddg|jddg|jddg|jdd	dgfg|jdd	dgfg|jdddgfg|jdd	dgfg|jd ddgfgy)!Nz</>z</$>)r*$</)rr</a)rrz<a<a>ra<az</a<a>)r'rr)rr<a)rr<a foo='bar')rr<a foo='bar)rr
<a foo='>')rr	<a foo='>)rrz<a$>za$z<a$b>za$bz<a$b/>r$z<a$b  >z<a$b  />rirWs rtest_starttag_junk_charsz+HTMLParserTestCase.test_starttag_junk_charssPr"!1 23~./01:ub"9!:;#4"56~./~./)A(BC
(?'@A'=&>?&;%<=*dB!7 89:ub"9!:;M5"#=">?	Z$;#<=
mUB%?$@Arc
|jddddgfgd}ddgdfg}|j||d}ddgd	fd
dgd	fg}|j||d}d
dgfd
dgfd
dgfd
dgfddgfddgfddgfddgfg}|j||y)
Nz<a foo="var"/>r$r)rvarzj<img width=902 height=250px src="/sites/default/files/images/homepage/foo.jpg" /*what am I doing here*/ />ro))width902)height250px)rpz,/sites/default/files/images/homepage/foo.jpg)z*whatN)amN)iN)doingN)zhere*Nz9<a / /foo/ / /=/ / /bar/ / /><a / /foo/ / /=/ / /bar/ / >))rN)=N)barNrzD<meta><meta / ><meta // ><meta / / ><meta/><meta /><meta //><meta//>metarirs   rtest_slashes_in_starttagz+HTMLParserTestCase.test_slashes_in_starttags(M3@P+Q*RS.
5
/
	
h'/C!LM
IJ
	
h'3$z62&>
$z62&>
FB'-)D
FB'-)D	
	
h'rc*|jddgy)Nz<!DOCTYPE foo $ >)r5zDOCTYPE foo $ rirWs rtest_declaration_junk_charsz.HTMLParserTestCase.test_declaration_junk_charss+.H-IJrc*|jddgy)Nz"<!spacer type="block" height="25">)r*zspacer type="block" height="25"rirWs rtest_illegal_declarationsz,HTMLParserTestCase.test_illegal_declarationss<GH	Jrcrd}ddgfdddgfdddgfdddgfdddgfdddgfddgfg}|j||y)Nzn<br></label</p><br></div end tmAd-leaderBoard><br></<h4><br></li class="unit"><br></li
						</ul><br></><br>rbr)r'zlabel<rz)r*z<h4)r'lirirs   rtest_invalid_end_tagsz(HTMLParserTestCase.test_invalid_end_tagssvMr*(r*%r*&r*$r*$r*r*#,$	
h'rc>d}ddgfdddg}|j||y)Nz(<b>This</b attr=">"> confuses the parserrr)rThisr)rz"> confuses the parserrirs   rtest_broken_invalid_end_tagz.HTMLParserTestCase.test_broken_invalid_end_tags3
:b)$#68	
h'rcd}dddgfddgfddddgfd	d
ddd
gfdddgfddddg}|j||d}ddgdfddgfddddgfd	d
g}|j||y)Nz[<div style=""    ><b>The <a href="some_url">rain</a> <br /> in <span>Spain</span></b></div>rryrrr)rzThe r)rsome_url)rrainrr r$r)rz in span)rSpainr'rrrzz><div style="", foo = "bar" ><b>The <a href="some_url">rain</a>)r,N)rrrirs   r$test_correct_detection_of_start_tagsz7HTMLParserTestCase.test_correct_detection_of_start_tagss90
b!
345
D"%
$
 	
h'O
 LM
b!
345

	
h'rcdddgfddgfdgdfddd	gfg}|D]\}}|j||y)
Na&)rr
za&b)rabza&b )rrr8rrza&b;rr
ri)rrr
rs    rtest_EOF_in_charrefz&HTMLParserTestCase.test_EOF_in_charrefs[N#$
^$%
GH
m%789	
#	,ND(OOD(+	,rc4d}gd}|j||y)Nz<! not really a comment ><! not a comment either --><! -- close enough --><!><!<-- this was an empty comment><!!! another bogus comment !!!>))r*z not really a comment )r*z not a comment either --)r*z -- close enough --r)r*z<-- this was an empty comment)r*z!! another bogus comment !!!rirs   rtest_broken_commentsz'HTMLParserTestCase.test_broken_commentss 2

	
h'rcpd}dddddddgfdd	dd
dgfddd
dgfdddddd
dgfdg}|j||y)Nz<![if !(IE)]>broken condcom<![endif]><![if ! IE]><link href="favicon.tiff"/><![endif]><![if !IE 6]><img src="firefox.png" /><![endif]><![if !ie 6]><b>foo</b><![endif]><![if (!IE)|(lt IE 9)]><img src="mammoth.bmp" /><![endif]>)r>zif !(IE))rzbroken condcom)r>endif)r>zif ! IEr$link)rzfavicon.tiff)r>zif !IE 6ro)rpzfirefox.png)r>zif !ie 6rr)rrr)r>zif (!IE)|(lt IE 9))rpzmammoth.bmprirs   rtest_broken_condcomsz'HTMLParserTestCase.test_broken_condcoms.s~M
)&%'
F%=$>?%(
E$:#;<%(
b!%2
E$:#;<%#
&	
h'rctd}|jd|j|jdddgfddd	gy)
NTrUzfoo <a>link</a> bar &amp; baz)rzfoo rr)rrr)rz
 bar & baz)rrZassertEqualr)rrs  r"test_convert_charrefs_dropped_textz5HTMLParserTestCase.test_convert_charrefs_dropped_textOsO 634

C46F
4
6	
rN) r@rArBrjrur{r}rrrrrrrrrrrrrrrrrrrrrrrrrrCrrrgrgks@	

L4<:0#@>I,("(%/R2B&(>KJ(4
((B,( (B

rrgcreZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZy)AttributesTestCasecddgdfg}|jd||jd||jd||jd|y)Nrr))rv)cr)dr)eNz<a b='v' c="v" d=v e>z<a  b = 'v' c = "v" d = v e>z<a
b
=
'v'
c
=
"v"
d
=
v
e>z<a	b	=	'v'	c	=	"v"	d	=	v	e>rirs  rtest_attr_syntaxz#AttributesTestCase.test_attr_syntax^sRsM
N
	
3V<:FCCVLCVLrc|jdddgdfg|jdddddgfg|jddd	d
gfg|jddddgfgy)
Nz'<a b='xxx
	xxx' c="yyy	
yyy" d='	xyz
'>rr))rzxxx
	xxx)rzyyy	
yyy)rz	xyz
z
<a b='' c="">)rr)rrz<e a=rgb(1,2,3)>r)rz
rgb(1,2,3)z<a href=mailto:xyz@example.com>)rzmailto:xyz@example.comrirWs rtest_attr_valuesz#AttributesTestCase.test_attr_valuesgsK$c,>?@	A	
+$cIy+ABC	E	
*$c,?+@AB	D	
-# BC
DE	Grc|jdddddgfg|jddddd	gfg|jd
dddd	gfgy)Nu!<img src=/foo/bar.png alt=中文>rro)rpz/foo/bar.png)altu中文u+<a title='テスト' href='テスト.html'>r)titleu	テスト)ruテスト.htmlu+<a title="テスト" href="テスト.html">rirWs rtest_attr_nonasciiz%AttributesTestCase.test_attr_nonasciivs5%"9"9";<
=	>	
K# ? C EF
G	H	
K# ? C EF
G	Hrc2|jddddgfgy)Nz!<a b='&amp;&gt;&lt;&quot;&apos;'>rr)rz&><"'rirWs rtest_attr_entity_replacementz/AttributesTestCase.test_attr_entity_replacements!/#0
12	4rc4|jdddgdfgy)Nz<a a.b='v' c:d=v e-f=v>rr))za.br)zc:dr)ze-frrirWs rtest_attr_funky_namesz(AttributesTestCase.test_attr_funky_namess %#I
JK	Mrc2|jddddgfgy)Nz0<html foo='&euro;&amp;&#97;&#x61;&unsupported;'>rr
)ru€&aa&unsupported;rirWs rtest_entityrefs_in_attributesz0AttributesTestCase.test_entityrefs_in_attributess#>&#D"E
FG	IrcF|jddddgfdddgfdddgfgy)	Nz<a $><b $=%><c \=/>rr)rNr)r%r)\/rirWs rtest_attr_funky_names2z)AttributesTestCase.test_attr_funky_names2s:"#}
-#
|
,#}
-
/	0rcdD]P}|jd|zdddgfg|jd|zdddgfg|jd|zdddgfgRy)N)&z&amp;z&#38;z&#x26;z
<a href="%s">rr)rr2z
<a href='%s'>z<a href=%s>ri)rrms  r test_entities_in_attribute_valuez3AttributesTestCase.test_entities_in_attribute_values|7	BFOOOf4(#
?@
BOOOf4(#
?@
BOOMF2(#
?@
B	Brchd}dddgfdddddgfddddd	gfd
ddddgfddg}|j||y)
Nz<a href=test'style='color:red;bad1'>test - bad1</a><a href=test'+style='color:red;ba2'>test - bad2</a><a href=test'&nbsp;style='color:red;bad3'>test - bad3</a><a href = test'&nbsp;style='color:red;bad4'  >test - bad4</a>rr)rztest'style='color:red;bad1')rztest - bad1r)rztest'+style='color:red;ba2')rztest - bad2)rutest' style='color:red;bad3')rztest - bad3)rutest' style='color:red;bad4')rztest - bad4rirs   rtest_malformed_attributesz,AttributesTestCase.test_malformed_attributessr
L	
FGH#_
FGH#_
JKL#_
JKL#_	
	
h'rcx|jdddgfddddgfdg|jd	ddgfdddd
gfdgy)Nz<x><y z=""o"" /></x>rrr$r)rr)zo""N)r'rz<x><y z="""" /></x>)z""NrirWs r"test_malformed_adjacent_attributesz5AttributesTestCase.test_malformed_adjacent_attributessd.$c2.*C)]1KL+-	.	
-$c2.*C)\1JK+-	.rcd|jdddddgfg|jdddddgfgy)	Nz<a width="100%"cellspacing=0>rrrz100%cellspacing0z<a id="foo"class="bar">)idrclassrrirWs rtest_adjacent_attributesz+AttributesTestCase.test_adjacent_attributessT7$c,.ABDE	F	
1$c(/:<=	>rc2|jddddgfgy)Nz<a v=>rr)rrrirWs rtest_missing_attribute_valuez/AttributesTestCase.test_missing_attribute_values$cI;78	:rc2|jddddgfgy)Nz-<a href=javascript:popup('/popup/help.html')>rr)rz$javascript:popup('/popup/help.html')rirWs rtest_javascript_attribute_valuez2AttributesTestCase.test_javascript_attribute_values)G$cKLNO	Prc6|jddddgfddgy)Nz-<a href='http://www.example.org/">;'>spam</a>rr)rzhttp://www.example.org/">;)rspamrrirWs rtest_end_tag_in_attribute_valuez2AttributesTestCase.test_end_tag_in_attribute_values,H$cBCE)?<	=rcd}ddgfddddgfddgdfdd	gfdd
dgfddd
gfddddgfdddgfdddddddgfdddgfddddg}|j||y)Nz<html><body bgcolor=d0ca90 text='181008'><table cellspacing=0 cellpadding=1 width=100% ><tr><td align=left><font size=-1>- <a href=/rabota/><span class=en> software-and-i</span></a>- <a href='/1/'><span class=en> library</span></a></table>rr
body)bgcolord0ca90)r181008table)r:)cellpaddingrr9trtd)alignleftfont)sizez-1)rz- r)rz/rabota/r)r?en)rz software-and-irr)rz/1/)rz library)r'rMrirs   rtest_with_unquoted_attributesz0AttributesTestCase.test_with_unquoted_attributessM$
"79K!LM
O
Q
r"
 123
.!12Z/C.DE
/!235PZ.?@
/!235I1D
	
h'rcd}dddgfddddgfddddgfddgd	fdddd
gfddddgfddd
dgfddddgfddddgfg	}|j||y)Nz<div class=bar,baz=asd><div class="bar",baz="asd"><div class=bar, baz=asd,><div class="bar", baz="asd",><div class="bar",><div class=,bar baz=,asd><div class=,"bar" baz=,"asd"><div ,class=bar ,baz=asd><div class,="bar" baz,="asd">rry)r?zbar,baz=asdr>)z,bazasd)r?zbar,)bazzasd,)r>r)rYrXrr)r?z,bar)rYz,asd)r?z,"bar")rYz,"asd")z,classr)zclass,r)zbaz,rXrirs   rtest_comma_between_attributesz0AttributesTestCase.test_comma_between_attributess0!9 ;<
!1? CD
!2O DE
!>
?
!1; ?@
!2O DE
!46G HI
!2O DE
!2O DE
	
h'rc2|jddddgfgy)Nz<form action=bogus|&#()value>rform)actionzbogus|&#()valuerirWs r-test_weird_chars_in_unquoted_attribute_valuesz@AttributesTestCase.test_weird_chars_in_unquoted_attribute_valuess)7'!> ?A:B	CrN)r@rArBrr!r%r'r)r+r0r3r5r7r@rBrDrGrVrZr^rCrrrr\s_M
G
H4
M
I0B((	.>:P
=(0(8Crrc>eZdZededdZy)TestInheritancez_markupbase.ParserBase.__init__z_markupbase.ParserBase.resetctd5}t|j|jdddy#1swYyxYw)Nz_markupbase.ParserBase)rrassert_called_once)rsuper_reset_methodsuper_init_methodparser_bases    rtest_base_class_methods_calledz.TestInheritance.test_base_class_methods_calledsB+
,	4002113	4	4	4s+AA	N)r@rArBrrfrCrrr`r`s(
,-
)*4+.4rr`__main__)html.parserr
r]unittest
unittest.mockrrrrrErJTestCaserRrgrr`r@mainrCrr<module>rms
6,T[[++6,rA.AL^LE8$$E0n
n
bzCzCz4h''4zHMMOr