summaryrefslogtreecommitdiff
path: root/bs4/testing.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2021-05-31 15:49:41 -0400
committerLeonard Richardson <leonardr@segfault.org>2021-05-31 15:49:41 -0400
commita00624d7fc2e29b41b286f46844cb75f4d96ff63 (patch)
tree339396570eeaef7e51454dd5de9c432df29cce36 /bs4/testing.py
parent8d73b97105bf6534057ee93af6795a2a0aceb993 (diff)
The html.parser tree builder can now handles named entities
found in the HTML5 spec in much the same way that the html5lib tree builder does. Note that the lxml tree builder still handles named entities differently. [bug=1924908]
Diffstat (limited to 'bs4/testing.py')
-rw-r--r--bs4/testing.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/bs4/testing.py b/bs4/testing.py
index 87cd13f..5b0eb7c 100644
--- a/bs4/testing.py
+++ b/bs4/testing.py
@@ -234,13 +234,13 @@ class TreeBuilderSmokeTest(object):
def test_fuzzed_input(self):
# This test centralizes in one place the various fuzz tests
- # for Beautiful Soup created by the oss-fuzz.
+ # for Beautiful Soup created by the oss-fuzz project.
# These strings superficially resemble markup, but they
# generally can't be parsed into anything. The best we can
# hope for is that parsing these strings won't crash the
# parser.
-
+ #
# n.b. This markup is commented out because these fuzz tests
# _do_ crash the parser. However the crashes are due to bugs
# in html.parser, not Beautiful Soup -- otherwise I'd fix the
@@ -261,7 +261,6 @@ class TreeBuilderSmokeTest(object):
for markup in bad_markup:
with warnings.catch_warnings(record=False):
soup = self.soup(markup)
- pass
class HTMLTreeBuilderSmokeTest(TreeBuilderSmokeTest):
@@ -625,7 +624,7 @@ Hello, world!
self.assertSoupEquals("&#10000000000000;", expect)
self.assertSoupEquals("&#x10000000000000;", expect)
self.assertSoupEquals("&#1000000000;", expect)
-
+
def test_multipart_strings(self):
"Mostly to prevent a recurrence of a bug in the html5lib treebuilder."
soup = self.soup("<html><h2>\nfoo</h2><p></p></html>")