�ɲɾ�����ӯ�����һ��ˣ��������С���˴��ͣ�������P���ҹ��ñ˽��ά�Բ��������˸߸ԣ�������ơ��ҹ��ñ�����ά�Բ���ˡ���˳^�ӣ������ӡ� ���ͯj�ӣ��ƺ���ӣ� ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n! AXXc@sdZddlZyddlmZeZWnek rGZeZnXddl m Z ddl m Z m Z mZee dde e fdYZdS( sDTests to ensure that the html5lib tree builder generates good trees.iN(tHTML5TreeBuilder(t SoupStrainer(tHTML5TreeBuilderSmokeTesttSoupTesttskipIfs?html5lib seems not to be present, not testing its tree builder.tHTML5LibBuilderSmokeTestcBsweZdZedZdZdZdZdZdZ dZ dZ d Z d Z d ZRS( s"See ``HTML5TreeBuilderSmokeTest``.cCstS(N(R(tself((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pytdefault_builderscCstd}d}tjdt}|j|d|}WdQX|j|j|j||jdt |dj kdS(Ntbs

A bold statement.

trecordt parse_onlys4the html5lib tree builder doesn't support parse_onlyi( Rtwarningstcatch_warningstTruetsoupt assertEqualtdecodet document_fort assertTruetstrtmessage(RtstrainertmarkuptwR((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyttest_soupstrainers cCs'd}|j|d|jddS(s8html5lib inserts tags where other parsers don't.s[s
Here's another table:
foo
Here's another table:
foo
s{
Foo
Bar
Baz
N(tassertSoupEquals(RR((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyttest_correctly_nested_tables(s cCs2d}|j|}|jd|jjdS(Nsy

foo

s

foo

(RRtptencode(RRR((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyt(test_xml_declaration_followed_by_doctype<s cCsQd}|j|}|jd|jj|jdt|jddS(Ns%

foo

bar

uD

foo

bar

iR(RRtbodyRtlentfind_all(RRR((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyttest_reparented_markupJscCsQd}|j|}|jd|jj|jdt|jddS(Ns&

foo

bar

uE

foo

bar

iR(RRRRRR (RRR((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyt+test_reparented_markup_ends_with_whitespaceQscCspd}|j|}|jdd\}}|jd\}}|j|ksWt|j|ksltdS(sVerify that we keep the two whitespace nodes in this document distinct when reparenting the adjacent tags. s,
tstringt ttbodyN(RR t next_elementtAssertionError(RRRtspace1tspace2ttbody1ttbody2((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyt<test_reparented_markup_containing_identical_whitespace_nodesWs cCsd}|j|}|j}|jd|j|jdd}|jddd}|j||j|j||jdS(NsF
aftermath

aftermath

ttargetR#t aftermathi(RtnoscriptRR&tfindR tprevious_element(RRRR/R-tfinal_aftermath((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyt*test_reparented_markup_containing_childrenbs cCs4d}|j|}t|jds0tdS(s(Processing instructions become comments.ssN(RRt startswithR'(RRR((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyttest_processing_instructionrscCsPd}|j|}|jd\}}|j||||k sLtdS(Ns

ta(RR RR'(RRRta1ta2((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyttest_cloned_multivalue_nodexs cCs2d}|j|}|jd|jjdS(NsAu>A
(RRRR(RRR((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyttest_foster_parentings(t__name__t __module__t__doc__tpropertyRRRRR!R"R,R3R5R9R:(((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyRs       (R=R t bs4.builderRR tHTML5LIB_PRESENTt ImportErrortetFalset bs4.elementRt bs4.testingRRRR(((s;/usr/lib/python2.7/site-packages/bs4/tests/test_html5lib.pyts