Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
ó Uñ*Wc@sídZddlmZddlZddlZddlZyddlmZWn!e k rqddl mZnXddddd d d gZ y e Z Wnek r¶eefZ nXejd d kZejdƒZejdƒZejdƒZejZd„Zd„ZejdedeƒZd„ZejdƒZ ejdƒZ!defd„ƒYZ"d e"fd„ƒYZ#ed„Z$ee%d„Z&de'fd„ƒYZ(d„Z)idd6Z*e+dkréddlZej,ƒndS(sÑ lxml-based doctest output comparison. Note: normally, you should just import the `lxml.usedoctest` and `lxml.html.usedoctest` modules from within a doctest, instead of this one:: >>> import lxml.usedoctest # for XML output >>> import lxml.html.usedoctest # for HTML output To use this module directly, you must call ``lxmldoctest.install()``, which will cause doctest to use this in all subsequent calls. This changes the way output is checked and comparisons are made for XML or HTML-like content. XML or HTML content is noticed because the example starts with ``<`` (it's HTML if it starts with ```` or include an ``any`` attribute in the tag. An ``any`` tag matches any tag, while the attribute matches any and all attributes. When a match fails, the reformatted example and gotten text is displayed (indented), and a rough diff-like output is given. Anything marked with ``+`` is in the output but wasn't supposed to be, and similarly ``-`` means its in the example but wasn't in the output. You can disable parsing on one line with ``# doctest:+NOPARSE_MARKUP`` iÿÿÿÿ(tetreeN(tescapet PARSE_HTMLt PARSE_XMLtNOPARSE_MARKUPtLXMLOutputCheckertLHTMLOutputCheckertinstallt temp_installiicCs|dkrdS|jƒSdS(N(tNonetstrip(tv((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyR ?s cCstjd|ƒS(Nt (t_norm_whitespace_retsub(R ((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pytnorm_whitespaceEstrecovertremove_blank_textcCstj|tƒS(N(Rt fromstringt _html_parser(thtml((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pythtml_fromstringJss^<[^>]+ (at|object) s[ \t\n][ \t\n]+c Bs³eZdZd „Zd „Zd „Zd „Zd„Zd„Zd„Z d„Z e d„Z dd„Z e d„Zd„Zd„Zd„Zd„Zd„Ze d„ZRS(tparamtimgtareatbrtbasefonttinputtbasetmetatlinktcolcCstjS(N(RtXML(tself((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pytget_default_parserWsc CsÇt|ddƒ}|dk r0|j}|}n tj}|j|||ƒ}|sg|||||ƒSy||ƒ}Wntjk rŽtSXy||ƒ}Wntjk r¶tSX|j ||ƒS(Nt_temp_override_self( tgetattrR t_temp_call_super_check_outputt OutputCheckert check_outputt get_parserRtXMLSyntaxErrortFalset compare_docs( R!twanttgott optionflagstalt_selft super_methodtparsertwant_doctgot_doc((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyR'Zs$    cCs§d}t|@rdSt|@r't}n|t|@r=tj}nf|jƒjƒj dƒrv|jƒj dƒrvt}n-|j |ƒr£|j |ƒr£|j ƒ}n|S(Ns¡s  cCs“|dkrtSt|tƒ s0t|tƒ r:||kS|pCd}|pOd}|jdƒr…|jdƒd|jdƒdkS||kSdS(NR;ROs{...}t}iÿÿÿÿ(R@t isinstancet _basestringR5tsplit(R!R,R-((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyR<®s    $c Cs±|j}|j|||ƒ}g}|dk rÃy||ƒ}Wn5tjk rwtjƒd}|jd|ƒnXy||ƒ} WqÃtjk r¿tjƒd}|jd|ƒqÃXn|dksÕ|rtj ||||ƒ} |r |j| ƒdj |ƒS| Sn|t k} g} | jdƒ| j|j || dƒƒ| jdƒ| j|j | | dƒƒ| jdƒ| j|j || | dƒƒdj | ƒS( NisIn example: %ssIn actual output: %ss s Expected:isGot:sDiff:(R,R(R RR)tsystexc_infotappendR&toutput_differencetjoinRt format_doct collect_diff( R!texampleR-R.R,R1terrorsR2teR3tvalueRt diff_parts((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRY¼s<        cCs=|s tS|j|jkr tS|js5t|ƒr9tStS(N(R*R=t empty_tagsR?RER@(R!telR((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pythtml_empty_tagÝsROcCs;g}t|ƒsá|jd|ƒ|j|ƒ|j|j|ƒƒ|j||ƒsœt|jƒrƒ|j|j|jƒƒn|j|j|ƒƒnt|jƒrÇ|j|j|jƒƒn|jdƒdj |ƒS|jd|ƒ|j|ƒ|j|j|ƒƒ|j||ƒså|jdƒt|jƒr}|jd|ƒ|j|j|jƒƒ|jdƒnx.|D]&}|j|j |||dƒƒq„W|jd|ƒ|j|j|ƒƒ|jdƒnt|jƒr.|jd|ƒ|j|j|jƒƒ|jdƒndj |ƒS(NR s ROi( RERXt format_tagRdR R?t format_texttformat_end_tagRARZR[(R!tdocRtindenttprefixtpartsRc((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyR[çs@       $cCs2|dkrdS|r%|jƒ}nt|dƒS(NROi(R R t html_escape(R!R?R ((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRf s  cCs�g}t|tjƒrdSxFt|jjƒƒD]/\}}|jd||j|tƒfƒq2W|svd|j Sd|j dj |ƒfS(Nss(RSRRmR=(R!Rc((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRgscCs×g}t|ƒ rÐt|ƒ rÐ|jd|ƒ|j|j||ƒƒ|j||ƒs—|j|j|j|jƒƒ|j|j||ƒƒn|j|j|j|jƒƒ|jdƒdj|ƒS|jd|ƒ|j|j||ƒƒ|jdƒt |jƒs%t |jƒre|jd|ƒ|j|j|j|jƒƒ|jdƒnt |ƒ}t |ƒ}xµ|sŒ|r4|sÄ|j|j |j dƒ||ddƒƒq€n|sü|j|j |j dƒ||ddƒƒq€n|j|j |j dƒ|j dƒ||dƒƒq€W|jd|ƒ|j|j||ƒƒ|jdƒt |jƒsŠt |jƒrÊ|jd|ƒ|j|j|j|jƒƒ|jdƒndj|ƒS(NR s ROiit+t-(RERXtcollect_diff_tagRdtcollect_diff_textR?tcollect_diff_end_tagRARZR RFR[RGR\(R!R,R-RRiRkRKRL((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyR\"sH     ,, - c Cs®|j|j|jƒs1d|j|jf}n |j}g}|jdkp[d|jk}x¶t|jjƒƒD]Ÿ\}}||jkr¼| r¼|jd||j|tƒfƒqt||jkrê|j|j||tƒ}n|j|tƒ}|jd||fƒqtW|s~x^t|jjƒƒD]D\}}||jkrTq3n|jd||j|tƒfƒq3Wn|r d|dj |ƒf}n d|}|S( Ns %s (got: %s)R;s+%s="%s"s%s="%s"s-%s="%s"s<%s %s>R s<%s>( R<R=RBRCRnRXRfR*RtRZ( R!R,R-R=RoR;RpR`R?((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRsHs* "&"* cCs<|j|jkr+d|j|jf}n |j}d|S(Ns %s (got: %s)s(R=(R!R,R-R=((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRucs cCsO|j|||ƒr/|sdS|j||ƒSd||f}|j||ƒS(NROs %s (got: %s)(R>Rf(R!R,R-R R?((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRtjs ( RRRRRRRRRR(t__name__t __module__RbR"R'R(R6R+R>R<RYR@RdR[RfReRgR\RsRuRt(((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRQs&       ! #   &  cBseZd„ZRS(cCstS(N(R(R!((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyR"ss(RvRwR"(((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRrscCs|rtt_n tt_dS(s£ Install doctestcompare for all future doctests. If html is true, then by default the HTML parser will be used; otherwise the XML parser is used. N(RtdoctestR&R(R((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRvs c Cs­|rt}nt}tƒ}|jd}|ƒ}|j}||_trk|jdj}|jj}n|jdj}|jj}t t _ t ||||||ƒdS(sÁ Use this *inside* a doctest to enable this checker for this doctest only. If html is true, then by default the HTML parser will be used; otherwise the XML parser is used. R!tcheckN( RRt_find_doctest_frametf_localst_checkert _IS_PYTHON_3t__func__R'tim_funcRRxt_RestoreChecker( Rt del_moduletCheckertframetdt_selftcheckert old_checkert check_functchecker_check_func((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyR‚s"         R€cBsPeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(cCs`||_||_|j|j_||j_||_||_||_|jƒ|j ƒdS(N( R„R…t call_superR%R#R‡t clone_funcR�t install_clonetinstall_dt_self(R!R„R†t new_checkerR‡RŠR�((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyt__init__ªs       cCsmtr9|jj|_|jj|_|jj|j_n0|jj|_|jj|_|jj|j_dS(N(R}R‡t__code__t func_codet __globals__t func_globalsRŠ(R!((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyR‹µscCs+tr|j|j_n|j|j_dS(N(R}R�R‡R�(R!((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pytuninstall_clone¾scCs|jj|_||j_dS(N(R„t_DocTestRunner__record_outcomet prev_func(R!((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRŒÃscCs|j|j_dS(N(R•R„R”(R!((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pytuninstall_dt_selfÆscCsp|jrlddl}|j|j=d|jkrl|jjddƒ\}}|j|}t||ƒqlndS(Niÿÿÿÿt.i(R�RVtmodulestrsplittdelattr(R!RVtpackagetmodulet package_mod((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pytuninstall_moduleÈs    cOsF|jƒ|jƒ|j`|j`|j||Ž}|jƒ|S(N(R“R–R…R#R%R•Rž(R!targstkwtresult((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyt__call__Ðs     cOs0|jƒz|j||ŽSWd|jƒXdS(N(R“R‡R‹(R!RŸR ((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyR‰Øs ( RvRwRŽR‹R“RŒR–RžR¢R‰(((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyR€©s     cCsZddl}|jdƒ}x,|rI|j}d|kr=|S|j}qWtdƒ‚dS(NiÿÿÿÿitBOOMsBCould not find doctest (only use this function *inside* a doctest)(RVt _getframeR{tf_backt LookupError(RVRƒtl((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyRzßs     si >>> temp_install() >>> print """stuff""" ... >>> print """""" >>> print """blahblahblah""" # doctest: +NOPARSE_MARKUP, +ELLIPSIS ...foo /> tbasict__main__(-t__doc__tlxmlRRVRPRxRRRlt ImportErrortcgit__all__t basestringRTt NameErrortstrtbytest version_infoR}tregister_optionflagRRRR&R Rt HTMLParserR*R@RRtcompileR8R RRRR RtobjectR€Rzt__test__Rvttestmod(((s9/usr/lib64/python2.7/site-packages/lxml/doctestcompare.pyt$sJ           ÿ" '6