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

Method test_multivalued_attribute_on_html

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

Source from the content-addressed store, hash-verified

266 self.assertEqual(["css"], soup.div.div['class'])
267
268 def test_multivalued_attribute_on_html(self):
269 # html5lib uses a different API to set the attributes ot the
270 # <html> tag. This has caused problems with multivalued
271 # attributes.
272 markup = '<html class="a b"></html>'
273 soup = self.soup(markup)
274 self.assertEqual(["a", "b"], soup.html['class'])
275
276 def test_angle_brackets_in_attribute_values_are_escaped(self):
277 self.assertSoupEquals('<a b="<a>"></a>', '<a b="&lt;a&gt;"></a>')

Callers

nothing calls this directly

Calls 1

soupMethod · 0.45

Tested by

no test coverage detected