Skip to content

Commit d70f1f8

Browse files
committed
Merge branch 'master' into dependabot-pip-requirements-cryptography-48.0.1
2 parents 4151929 + 797d4c9 commit d70f1f8

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

tests/general/test_html_parsing.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
"""Regression tests for HTML parsing."""
22

3-
import pytest
4-
5-
from inbox.util.html import HTMLParseError, strip_tags
3+
from inbox.util.html import strip_tags
64

75

86
def test_strip_tags() -> None:
@@ -14,14 +12,11 @@ def test_strip_tags() -> None:
1412

1513
# MS Word conditional marked section
1614
text = "<![if word]>content<![endif]>"
17-
1815
assert strip_tags(text).strip() == "content"
1916

20-
# Unknown marked section
21-
text = """<![FOR]>"""
22-
23-
with pytest.raises(HTMLParseError):
24-
strip_tags(text)
17+
# An unknown marked section is simply dropped.
18+
text = "before<![FOR]>after"
19+
assert strip_tags(text).strip() == "beforeafter"
2520

2621

2722
def test_preserve_refs() -> None:

0 commit comments

Comments
 (0)