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

Method document_for

code3/bs4/testing.py:34–39  ·  view source on GitHub ↗

Turn an HTML fragment into a document. The details depend on the builder.

(self, markup)

Source from the content-addressed store, hash-verified

32 return BeautifulSoup(markup, builder=builder, **kwargs)
33
34 def document_for(self, markup):
35 """Turn an HTML fragment into a document.
36
37 The details depend on the builder.
38 """
39 return self.default_builder.test_fragment_to_document(markup)
40
41 def assertSoupEquals(self, to_parse, compare_parsed_to=None):
42 builder = self.default_builder

Calls 1

Tested by

no test coverage detected