; Fc@sdZdkZdkTdeifdYZdefdYZdefdYZd efd YZd efd YZd efdYZ defdYZ defdYZ defdYZ defdYZ defdYZdefdYZdefdYZdefdYZdefd YZed!joeindS("sUnit tests for Beautiful Soup. These tests make sure the Beautiful Soup works as it should. If you find a bug in Beautiful Soup, the best way to express it is as a test case like this that fails.N(s*sSoupTestcBstZeedZRS(NcCs7|tjo |}n|it|||dS(sRParse the given text and make sure its string rep is the other given text.N(srepsNonestoParsesselfs assertEqualsstrsc(sselfstoParsesrepsc((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pysassertSoupEquals s  (s__name__s __module__sNones BeautifulSoupsassertSoupEquals(((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pysSoupTest ss FollowThatTagcBstZdZdZdZdZdZdZdZdZ dZ d Z d Z e d Zd Zd Ze dZdZdZdZRS(s4Tests the various ways of fetching tags from a soup.cCsd}t||_dS(Ns 1 2 3 4 4(smlsBeautifulStoneSoupsselfssoup(sselfsml((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pyssetUpscCs~|id}|it|d|i|did|i||iid|i||iitddS(Nsaii(sselfssoupsmatchings assertEqualslensnamesfindAlls SoupStrainer(sselfsmatching((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pystestFindAllByName!s cCs|iidd}|it|d|i|did|i|did|iidhdd<}|i||tdhdd<}|i||ii||it|iidt d|it|iid d d|it|iid t d |it|iid dt gd |it|iid t i d d|it|iid t d|it|iid t d|it|iidt ddS(Nsidsxiisaisbsattrsswidthidsjunkis.*shref(sselfssoupsfindAllsmatchings assertEqualslensnames matching2s SoupStrainersstrainersNonesrescompilesTrue(sselfs matching2sstrainersmatching((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pystestFindAllByAttribute(s %%%+.%%cCs/td}|i|iddiddS(NsFooBarsas1sBar(s BeautifulSoupssoupsselfs assertEqualsfindsstring(sselfssoup((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pystestFindallByClass@s cCs/|iddg}|it|ddS(Nsasaci(sselfssoupsmatchings assertEqualslen(sselfsmatching((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pystestFindAllByListDscCs;|ihdt<dt<}|it|ddS(Nsasbi(sselfssoupsTruesmatchings assertEqualslen(sselfsmatching((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pystestFindAllByHashHs!cCs8td}|i|idtiddgdS(Nsstexts.*u»(s BeautifulSoupssoupsselfs assertEqualsfindAllsrescompile(sselfssoup((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pystestFindAllTextLs cCs;dk}|id}|it|i|ddS(Nsa.*i(srescompilesrsselfs assertEqualslenssoup(sselfsresr((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pystestFindAllByREQs cCsLd}|ii|}|it|d|i|diddS(NcCs|i|idjSdS(Nsid(stagsnamesget(stag((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pysmatchTagWhereIDMatchesNameWsiisa(smatchTagWhereIDMatchesNamesselfssoupsfindAllsmatchings assertEqualslensname(sselfsmatchTagWhereIDMatchesNamesmatching((sV/mnt/gmirror/ports/www/py-beautifulsoup/work/BeautifulSoup-3.0.4/BeautifulSoupTests.pystestFindAllByMethodVs cCsatd}|i}|it|idhdd<d|i|iddddS(Ns=