Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.188.30.161
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_sgmllib.pyc
�
?��cc@s�ddlZddlZddlZddlmZejdde�Zdejfd��YZ	de	fd��YZ
d	e	fd
��YZdejfd��YZ
d
�Zedkr�e�ndS(i����N(ttest_supporttsgmllibt
deprecatedtEventCollectorcBskeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(cCs,g|_|jj|_tjj|�dS(N(teventstappendRt
SGMLParsert__init__(tself((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyR
s	cCs�g}d}xm|jD]b}|d}||ko=dknred|dd|df|d<n
|j|�|}qW||_|S(Nitdatai����i(tNoneRR(RtLtprevtypeteventttype((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyt
get_eventss
#

	cCs|jd||f�dS(Ntstarttag(R(Rttagtattrs((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pytunknown_starttag scCs|jd|f�dS(Ntendtag(R(RR((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pytunknown_endtag#scCs|jd|f�dS(Ntcomment(R(RR	((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pythandle_comment(scCs|jd|f�dS(Ntcharref(R(RR	((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pythandle_charref+scCs|jd|f�dS(NR	(R(RR	((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pythandle_data.scCs|jd|f�dS(Ntdecl(R(RR((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pythandle_decl1scCs|jd|f�dS(Nt	entityref(R(RR	((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pythandle_entityref4scCs|jd|f�dS(Ntpi(R(RR	((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyt	handle_pi7scCs|jd|f�dS(Nsunknown decl(R(RR((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pytunknown_decl:s(
t__name__t
__module__RRRRRRRRRR R!(((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyRs										tCDATAEventCollectorcBseZd�ZRS(cCs$|jdd|f�|j�dS(NRtcdata(Rt
setliteral(RR((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pytstart_cdata?s(R"R#R'(((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyR$>stHTMLEntityCollectorcBsDeZejd�Zd�Zd�Zd�Zd�Zd�Z	RS(s:(?:&([a-zA-Z][-.a-zA-Z0-9]*)|&#(x[0-9a-zA-Z]+|[0-9]+))(;?)cCs:|jdd|f�|ddkr6tj||�SdS(NRtconvertitx(RRtconvert_charref(Rtname((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyR+IscCs*|jdd|f�tj||�dS(Nt	codepointR)(RRtconvert_codepoint(RR-((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyR.NscCs&|jdd|f�tj||�S(NRR)(RRtconvert_entityref(RR,((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyR/RscCs*|jd|f�tjj||�dS(NR(RRRR(RR	((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyRZscCs*|jd|f�tjj||�dS(NR(RRRR(RR	((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyR^s(
R"R#tretcompiletentity_or_charrefR+R.R/RR(((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyR(Ds				tSGMLParserTestCasecBseZeZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!RS(cCsO|j�}y,x|D]}|j|�qW|j�Wn
�nX|j�S(N(t	collectortfeedtcloseR(Rtsourcetparserts((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyRgs
cCs^y|j|�}Wn
�nX||krZ|jdtj|�dtj|��ndS(Ns8received events did not match expected events
Expected:
s
Received:
(Rtfailtpprinttpformat(RR7texpected_eventsR((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pytcheck_eventsrscCset�}y|j|�|j�Wntjk
r:n'X|jd|tj|j��f�dS(Ns+expected SGMLParseError for %r
Received:
%s(	RR5R6RtSGMLParseErrorR:R;R<R(RR7R8((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pytcheck_parse_error~s	
	cCs*d}|jd|gd|fg�dS(Ns�DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN'
             SYSTEM 'http://www.w3.org/TR/html401/strict.dtd' [
  <!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(R>(Rtinside((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_doctype_decl_internal�scCs'd}|jd|d|fg�dS(Ns/DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN's<!%s>R(R>(RRA((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_doctype_decl_external�s
cCs&|jdddddgfg�dS(	s7Make sure attribute names with underscores are accepteds<a has_under _under>Rtat	has_undert_underN(RERE(RFRF(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_underscore_in_attrname�s		cCs#|jdddgfdg�dS(s1Make sure tag names with underscores are accepteds<has_under></has_under>RRERN(RRE(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_underscore_in_tagname�s	cCs#|jddddgfg�dS(s@Be sure quotes in unquoted attributes are made part of the values<a href=foo'bar"baz>RRDthrefsfoo'bar"bazN(RIsfoo'bar"baz(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_quotes_in_unquoted_attrs�s	cCs2|jdddgfd	ddgfd
g�dS(s(Handling of XHTML-style empty start tagss<br />text<i></i>RtbrR	ttexttiRN(R	RL(RRM(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_xhtml_empty_tag�s
	cCs|jddg�dS(Ns<?processing instruction>Rsprocessing instruction(Rsprocessing instruction(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyt test_processing_instruction_only�s	cCs2|jdddgfddgfddg�dS(Ns<a><b></a></b>RRDtbR(RRD(RRP(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_bad_nesting�s
	cCs|jddg�dS(Ns#this text & contains & ampersands &R	(R	s#this text & contains & ampersands &(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_bare_ampersands�s	cCs|jddg�dS(Ns.this < text > contains < bare>pointy< bracketsR	(R	s.this < text > contains < bare>pointy< brackets(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_bare_pointy_brackets�s	cCsbdddd
ddgfg}|jd|�|jd	|�|jd
|�|jd|�dS(NRRDRPtvtctdtes<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>(RPRT(RURT(RVRT(RWRW(R>(Rtoutput((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_attr_syntax�s
cCs�|jddddddgfg�|jd
ddddgfg�d}d
}d}d|||f}|jd|ddd|fgfg�|jddddgfg�dS(Ns'<a b='xxx
	xxx' c="yyy	
yyy" d='	xyz
'>RRDRPsxxx
	xxxRUsyyy	
yyyRVs	xyz
s
<a b='' c="">ts$-_.+s!*'(),s;/?:@&=s+http://example.com:8080/path/to/file?%s%s%ss<e a=%s>RWs<e a=rgb(1,2,3)>s
rgb(1,2,3)(RPsxxx
	xxx(RUsyyy	
yyy(RVs	xyz
(RPRZ(RURZ(RDs
rgb(1,2,3)(R>(Rtsafetextratreservedturl((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_attr_values�s			
	cCs>|jdddddddddddd d!g
fg�dS("s9Substitution of entities and charrefs in attribute valuess�<a b=&lt; c=&lt;&gt; d=&lt-&gt; e='&lt; '
                                f="&xxx;" g='&#32;&#33;' h='&#500;'
                                i='x?a=b&c=d;'
                                j='&amp;#42;' k='&#38;#42;'>RRDRPt<RUs<>RVs&lt->RWs< tfs&xxx;tgs !ths&#500;RMs
x?a=b&c=d;tjs&#42;tkN(RPR`(RUs<>(RVs&lt->(RWs< (Ras&xxx;(Rbs !(Rcs&#500;(RMs
x?a=b&c=d;(Rds&#42;(Res&#42;(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_attr_values_entities�s	cCsGt|_|jddddddgfdddddddg
�dS(Ns3<a title="&ldquo;test&#x201d;">foo</a>&foobar;&#42;RR)tldquoRtx201dRRDttitles&ldquo;test&#x201d;R	tfooRtfoobart42R-i*(RR)Rg(RR)Rh(Ris&ldquo;test&#x201d;(R	Rj(RRD(RRk(RR)Rk(RRl(RR)Rl(R-R)i*(R(R4R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_convert_overridess		cCs)|jddddd	d
gfg�dS(Ns<a a.b='v' c:d=v e-f=v>RRDsa.bRTsc:dse-f(sa.bRT(sc:dRT(se-fRT(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_attr_funky_names s	cCs2|jddddgfdddgfg�dS(NsR<a href='http://[1080::8:800:200C:417A]/'><a href=http://[1080::8:800:200C:417A]/>RRDRIshttp://[1080::8:800:200C:417A]/(RIshttp://[1080::8:800:200C:417A]/(RIshttp://[1080::8:800:200C:417A]/(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_attr_value_ip6_url%s	cCsK|jdddgfddgfg�|jddddgfg�dS(Ns<a<a>RRDs</a<a>R(RRD(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_weird_starttags-s		cCs|jd�dS(Ns<!DOCTYPE foo $ >(R@(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_declaration_junk_chars7scCs,d}|j|dddd	gfg�dS(
Ns<foobar   
   one="1"	two=2   >RRktonet1ttwot2(RrRs(RtRu(R>(RR9((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_get_starttag_text:s	cCsud}t|_|j|ddgfd
dddgfddddg�d}|j|ddgfddg�dS(Nsb<cdata> <!-- not a comment --> &not-an-entity-ref; </cdata><notcdata> <!-- comment --> </notcdata>RR%R	s, <!-- not a comment --> &not-an-entity-ref; Rtnotcdatat Rs	 comment s$<cdata> <not a='start tag'> </cdata>s <not a='start tag'> (R	s, <!-- not a comment --> &not-an-entity-ref; (RR%(R	Rx(Rs	 comment (R	Rx(RRw(R	s <not a='start tag'> (RR%(R$R4R>(RR9((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_cdata_content@s 		
	cCs#d}|j|ddd	g�dS(
Ns(abc<!spacer type="block" height="25">defR	tabcsunknown declsspacer type="block" height="25"tdef(R	Rz(sunknown declsspacer type="block" height="25"(R	R{(R>(RR9((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_illegal_declarationsUs
	cCsd}|j|dg�dS(Ns-<!DOCTYPE doc [<!ATTLIST doc attr (a | b) >]>Rs*DOCTYPE doc [<!ATTLIST doc attr (a | b) >](Rs*DOCTYPE doc [<!ATTLIST doc attr (a | b) >](R>(RR9((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_enumerated_attr_type]s	cCsdd}ttjd��}tj�}x6|j|�}|j|�t|�|kr*Pq*q*WdS(Nissgml_input.html(topenRtfindfileRRtreadR5tlen(RtCHUNKRatfpR	((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_read_chunkscs
cCs/d}|j|ddd
ddgfg�dS(
Ns@<signs exclamation="&#33" copyright="&#169" quoteleft="&#8216;">Rtsignstexclamationt!t	copyrights&#169t	quotelefts&#8216;(R�R�(R�s&#169(R�s&#8216;(R>(RR9((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyttest_only_decode_asciips
	cCsB|jddddgfg�|jdddd	gfg�dS(
Ns	<a b='<'>RRDRPR`s	<a b='>'>t>(RPR`(RPR�(R>(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyt_test_starttag_end_boundary~scCs+ddd*gfg}|jdg|�|jddg|�|jdd	g|�|jd
dg|�|jdd
g|�|jddg|�ddd+gfg}|jdg|�|jddg|�|jddg|�|jd
dg|�|jdd
g|�|jddg|�d,g}|jddg|�|jddg|�|jddg|�|jddg|�|jdd g|�|jd!d"g|�|jd#d$g|�|jd%d&g|�|jd'd(g|�|jd)dg|�|jddg|�dS(-NRRDRPR`s	<a b='<'>s<a sb='<'>s<a bs='<'>s<a b=s'<'>s<a b='<s'>s<a b='<'R�s	<a b='>'>sb='>'>s='>'>s'>'>s<a b='>s<a b='>'RRzRZs
<!--abc-->s	!--abc-->s<!s--abc-->s<!-s-abc-->s<!--sabc-->s<!--asbc-->s<!--absc-->s<!--abcs-->s<!--abc-s->s	<!--abc--(RPR`(RPR�(RRz(R>(RRX((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyt_test_buffer_artefacts�s4	cCs�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd�|jd	�|jd
�|jd�|jd�|jd
�|jd�|jd�dS(NR`s<>s</$>s</s</as<$s<$>s<!s<a $>s<as<a foo='bar's<a foo='bars
<a foo='>'s	<a foo='>s<a foo=>(R@(R((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyt_test_starttag_junk_chars�s













("R"R#RR4RR>R@RBRCRGRHRJRNRORQRRRSRYR_RfRmRnRoRpRqRvRyR|R}R�R�R�R�R�(((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyR3cs>																						
						
			cCstjt�dS(N(Rtrun_unittestR3(((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyt	test_main�st__main__(R;R0tunittestttestRt
import_moduletTrueRRRR$R(tTestCaseR3R�R"(((s8/usr/local/python-2.7/lib/python2.7/test/test_sgmllib.pyt<module>s6�P	
© 2025 GrazzMean