config root man

Current Path : /usr/local/lib/python2.5/test/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/test/test_htmlparser.pyc

³ò
h”Rc@sÉdZddkZddkZddkZddkZddklZdeifd„ƒYZdefd„ƒYZdei	fd	„ƒYZ
d
e
fd„ƒYZd„Ze
d
joeƒndS(sTests for HTMLParser.py.iÿÿÿÿN(ttest_supporttEventCollectorcBsteZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
RS(cCs,g|_|ii|_tii|ƒdS(N(teventstappendt
HTMLParsert__init__(tself((s0/usr/local/lib/python2.5/test/test_htmlparser.pyRs	cCsŒg}d}xp|iD]e}|d}||jo
djno$d|dd|df|d<n|i|ƒ|}qW||_|S(Nitdataiÿÿÿÿi(tNoneRR(RtLtprevtypeteventttype((s0/usr/local/lib/python2.5/test/test_htmlparser.pyt
get_eventss

$

	cCs|id||fƒdS(Ntstarttag(R(Rttagtattrs((s0/usr/local/lib/python2.5/test/test_htmlparser.pythandle_starttag"scCs|id||fƒdS(Ntstartendtag(R(RRR((s0/usr/local/lib/python2.5/test/test_htmlparser.pythandle_startendtag%scCs|id|fƒdS(Ntendtag(R(RR((s0/usr/local/lib/python2.5/test/test_htmlparser.pyt
handle_endtag(scCs|id|fƒdS(Ntcomment(R(RR((s0/usr/local/lib/python2.5/test/test_htmlparser.pythandle_comment-scCs|id|fƒdS(Ntcharref(R(RR((s0/usr/local/lib/python2.5/test/test_htmlparser.pythandle_charref0scCs|id|fƒdS(NR(R(RR((s0/usr/local/lib/python2.5/test/test_htmlparser.pythandle_data3scCs|id|fƒdS(Ntdecl(R(RR((s0/usr/local/lib/python2.5/test/test_htmlparser.pythandle_decl6scCs|id|fƒdS(Nt	entityref(R(RR((s0/usr/local/lib/python2.5/test/test_htmlparser.pythandle_entityref9scCs|id|fƒdS(Ntpi(R(RR((s0/usr/local/lib/python2.5/test/test_htmlparser.pyt	handle_pi<scCs|id|fƒdS(Nsunknown decl(R(RR((s0/usr/local/lib/python2.5/test/test_htmlparser.pytunknown_decl?s(t__name__t
__module__RR
RRRRRRRRR R!(((s0/usr/local/lib/python2.5/test/test_htmlparser.pyR
s											tEventCollectorExtracBseZd„ZRS(cCs0ti|||ƒ|id|iƒfƒdS(Nt
starttag_text(RRRtget_starttag_text(RRR((s0/usr/local/lib/python2.5/test/test_htmlparser.pyREs(R"R#R(((s0/usr/local/lib/python2.5/test/test_htmlparser.pyR$CstTestCaseBasecBs&eZed„Zd„Zd„ZRS(cCs}|ƒ}x|D]}|i|ƒqW|iƒ|iƒ}||jo/|idti|ƒdti|ƒƒndS(Ns8received events did not match expected events
Expected:
s
Received:
(tfeedtcloseR
tfailtpprinttpformat(Rtsourcetexpected_eventst	collectortparsertsR((s0/usr/local/lib/python2.5/test/test_htmlparser.pyt
_run_checkLs	

cCs|i||tƒdS(N(R2R$(RR-R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyt_run_check_extraWscCs#|d„}|iti|ƒdS(NcSs'tiƒ}|i|ƒ|iƒdS(N(RR(R)(R-R0((s0/usr/local/lib/python2.5/test/test_htmlparser.pytparse[s
(tassertRaisesRtHTMLParseError(RR-R4((s0/usr/local/lib/python2.5/test/test_htmlparser.pyt_parse_errorZs(R"R#RR2R3R7(((s0/usr/local/lib/python2.5/test/test_htmlparser.pyR'Js	tHTMLParserTestCasecBs³eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„Zd„Zd„Zd„ZRS(cCs*|iddgƒ|iddgƒdS(Ns<?processing instruction>Rsprocessing instructions<?processing instruction ?>sprocessing instruction ?(spisprocessing instruction(spisprocessing instruction ?(R2(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyt test_processing_instruction_onlyds	
	cCs_|iddddddgfdddddddddgfd d!d"d#d$d%d&gƒdS('NsÂ
<!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>
Rs
RsDOCTYPE html PUBLIC 'foo'RthtmlRtentityRt32Rs4comment1a
-></foo><bar>&lt;<?pi?></foo<bar
comment1btimgtsrctBartismapssample
text
tx201Cscomment2a-- --comment2bR(sdatas
(sdeclsDOCTYPE html PUBLIC 'foo'(sdatas
(s	entityrefR;(scharrefR<(sdatas
(scomments4comment1a
-></foo><bar>&lt;<?pi?></foo<bar
comment1b(sdatas
(R>R?(R@N(sdatassample
text
(scharrefRA(sdatas
(scommentscomment2a-- --comment2b(sdatas
(sendtagR:(sdatas
(R2R(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_simple_htmlls&cCs|idddgƒdS(Ns&entityref fooRRs foo(s	entityrefs	entityref(sdatas foo(R2(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_unclosed_entityrefŒs	cCs'd}|id|d|fgƒdS(Ns‘DOCTYPE html [
  <!ELEMENT html - O EMPTY>
  <!ATTLIST html
      version CDATA #IMPLIED
      profile CDATA 'DublinCore'>
  <!NOTATION datatype SYSTEM 'http://xml.python.org/notations/python-module'>
  <!ENTITY myEntity 'internal parsed entity'>
  <!ENTITY anEntity SYSTEM 'http://xml.python.org/entities/something.xml'>
  <!ENTITY % paramEntity 'name|name|name'>
  %paramEntity;
  <!-- comment -->
]s<!%s>R(R2(Rtinside((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_doctype_decl’s

cCs2|idddgfddgfddgƒdS(Ns<a><b></a></b>RtatbR(sendtagRF(sendtagRG(R2(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_bad_nesting¤s
	cCs|iddgƒdS(Ns#this text & contains & ampersands &R(sdatas#this text & contains & ampersands &(R2(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_bare_ampersands¯s	cCs|iddgƒdS(Ns.this < text > contains < bare>pointy< bracketsR(sdatas.this < text > contains < bare>pointy< brackets(R2(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_bare_pointy_brackets´s	cCsbdddd
ddgfg}|id|ƒ|id	|ƒ|id
|ƒ|id|ƒdS(NRRFRGtvtctdtes<a b='v' c="v" d=v e>s<a  b = 'v' c = "v" d = v e>s<a
b
=
'v'
c
=
"v"
d
=
v
e>s<a	b	=	'v'	c	=	"v"	d	=	v	e>(RGRK(RLRK(RMRK(RNN(RR2(Rtoutput((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_attr_syntax¹s
cCs‰|iddddddgfgƒ|id
ddddgfgƒ|iddd
dgfgƒ|iddddgfgƒdS(Ns'<a b='xxx
	xxx' c="yyy	
yyy" d='	xyz
'>RRFRGsxxx
	xxxRLsyyy	
yyyRMs	xyz
s
<a b='' c="">ts<e a=rgb(1,2,3)>RNs
rgb(1,2,3)s<a href=mailto:xyz@example.com>threfsmailto:xyz@example.com(RGsxxx
	xxx(RLsyyy	
yyy(RMs	xyz
(RGRQ(RLRQ(RFs
rgb(1,2,3)(RRsmailto:xyz@example.com(R2(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_attr_valuesÂs					cCs#|iddddgfgƒdS(Ns!<a b='&amp;&gt;&lt;&quot;&apos;'>RRFRGs&><"'(RGs&><"'(R2(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_attr_entity_replacementÔs	cCs)|iddddd	d
gfgƒdS(Ns<a a.b='v' c:d=v e-f=v>RRFsa.bRKsc:dse-f(sa.bRK(sc:dRK(se-fRK(R2(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_attr_funky_namesÙs	cCs|idƒdS(Ns"<!spacer type="block" height="25">(R7(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_illegal_declarationsÞscCsB|iddddgfgƒ|idddd	gfgƒdS(
Ns	<a b='<'>RRFRGt<s	<a b='>'>t>(RGRW(RGRX(R2(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_starttag_end_boundaryáscCs+ddd*gfg}|idg|ƒ|iddg|ƒ|idd	g|ƒ|id
dg|ƒ|idd
g|ƒ|iddg|ƒddd+gfg}|idg|ƒ|iddg|ƒ|iddg|ƒ|id
dg|ƒ|idd
g|ƒ|iddg|ƒd,g}|iddg|ƒ|iddg|ƒ|iddg|ƒ|iddg|ƒ|idd g|ƒ|id!d"g|ƒ|id#d$g|ƒ|id%d&g|ƒ|id'd(g|ƒ|id)dg|ƒ|iddg|ƒdS(-NRRFRGRWs	<a b='<'>s<a sb='<'>s<a bs='<'>s<a b=s'<'>s<a b='<s'>s<a b='<'RXs	<a b='>'>sb='>'>s='>'>s'>'>s<a b='>s<a b='>'RtabcRQs
<!--abc-->s	!--abc-->s<!s--abc-->s<!-s-abc-->s<!--sabc-->s<!--asbc-->s<!--absc-->s<!--abcs-->s<!--abc-s->s	<!--abc--(RGRW(RGRX(scommentRZ(R2(RRO((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_buffer_artefactsås4	cCsº|idƒ|idƒ|idƒ|idƒ|idƒ|idƒ|idƒ|idƒ|id	ƒ|id
ƒ|idƒ|idƒ|id
ƒ|idƒdS(Ns</>s</$>s</s</as<a<a>s</a<a>s<!s<a $>s<as<a foo='bar's<a foo='bars
<a foo='>'s	<a foo='>s<a foo=>(R7(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_starttag_junk_charss












cCs|idƒdS(Ns<!DOCTYPE foo $ >(R7(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_declaration_junk_charsscCsm|idddgfgƒ|idddgfdgƒ|idddgfdddgfd
gƒdS(Ns<p/>Rtps<p></p>RRs<p><img src='foo' /></p>R=R>tfoo(sendtagR^(ssrcR_(sendtagR^(R2(R((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_startendtags		
	cCs5d}|i|ddd	d
gfd|fgƒdS(Ns <foo:bar   
   one="1"	two=2   >Rsfoo:bartonet1ttwot2R%(RaRb(RcRd(R3(RR1((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_get_starttag_text$s	cCsTd}|i|ddgfd	d
gƒd}|i|ddgfddgƒdS(
Ns=<script> <!-- not a comment --> &not-an-entity-ref; </script>RtscriptRs, <!-- not a comment --> &not-an-entity-ref; Rs&<script> <not a='start tag'> </script>s <not a='start tag'> (sdatas, <!-- not a comment --> &not-an-entity-ref; (sendtagsscript(sdatas <not a='start tag'> (sendtagsscript(R2(RR1((s0/usr/local/lib/python2.5/test/test_htmlparser.pyttest_cdata_content*s	
	(R"R#R9RBRCRERHRIRJRPRSRTRURVRYR[R\R]R`ReRg(((s0/usr/local/lib/python2.5/test/test_htmlparser.pyR8bs&		 																	cCstitƒdS(N(Rtrun_unittestR8(((s0/usr/local/lib/python2.5/test/test_htmlparser.pyt	test_main9st__main__(t__doc__RR+tsystunittestttestRRR$tTestCaseR'R8RiR"(((s0/usr/local/lib/python2.5/test/test_htmlparser.pys<module>s9×	


Man Man