MCPcopy
hub / github.com/csev/py4e / test_double_head

Method test_double_head

code3/bs4/testing.py:185–200  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

183 self.assertSoupEquals("<em><em></em></em>")
184
185 def test_double_head(self):
186 html = ''&#x27;<!DOCTYPE html>
187<html>
188<head>
189<title>Ordinary HEAD element test</title>
190</head>
191<script type="text/javascript">
192alert("Help!");
193</script>
194<body>
195Hello, world!
196</body>
197</html>
198''&#x27;
199 soup = self.soup(html)
200 self.assertEqual("text/javascript", soup.find('script')['type'])
201
202 def test_comment(self):
203 # Comments are represented as Comment objects.

Callers

nothing calls this directly

Calls 2

soupMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected