MCPcopy Index your code
hub / github.com/clips/pattern / assertSoupEquals

Method assertSoupEquals

pattern/web/soup/BeautifulSoupTests.py:13–18  ·  view source on GitHub ↗

Parse the given text and make sure its string rep is the other given text.

(self, toParse, rep=None, c=BeautifulSoup)

Source from the content-addressed store, hash-verified

11class SoupTest(unittest.TestCase):
12
13 def assertSoupEquals(self, toParse, rep=None, c=BeautifulSoup):
14 """Parse the given text and make sure its string rep is the other
15 given text."""
16 if rep == None:
17 rep = toParse
18 self.assertEqual(str(c(toParse)), rep)
19
20
21class FollowThatTag(SoupTest):

Callers 15

testSelfClosingtagMethod · 0.80
testCDataMethod · 0.80
testCommentsMethod · 0.80
testDeclarationMethod · 0.80
testEntityConversionsMethod · 0.80
testJunkInDeclarationMethod · 0.80
testEntityReplacementMethod · 0.80

Calls 1

strFunction · 0.85

Tested by

no test coverage detected