There was an error while loading. Please reload this page.
2 parents 4151929 + 797d4c9 commit d70f1f8Copy full SHA for d70f1f8
1 file changed
tests/general/test_html_parsing.py
@@ -1,8 +1,6 @@
1
"""Regression tests for HTML parsing."""
2
3
-import pytest
4
-
5
-from inbox.util.html import HTMLParseError, strip_tags
+from inbox.util.html import strip_tags
6
7
8
def test_strip_tags() -> None:
@@ -14,14 +12,11 @@ def test_strip_tags() -> None:
14
12
15
13
# MS Word conditional marked section
16
text = "<![if word]>content<![endif]>"
17
18
assert strip_tags(text).strip() == "content"
19
20
- # Unknown marked section
21
- text = """<![FOR]>"""
22
23
- with pytest.raises(HTMLParseError):
24
- strip_tags(text)
+ # An unknown marked section is simply dropped.
+ text = "before<![FOR]>after"
+ assert strip_tags(text).strip() == "beforeafter"
25
26
27
def test_preserve_refs() -> None:
0 commit comments