Skip to content

Commit 9202027

Browse files
committed
ignore bs4 warnings in tests
1 parent 9bf4ff1 commit 9202027

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_escaping.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import warnings
2+
from bs4 import MarkupResemblesLocatorWarning
13
from markdownify import markdownify as md
24

35

@@ -29,6 +31,9 @@ def test_single_escaping_entities():
2931

3032

3133
def test_misc():
34+
# ignore the bs4 warning that "1.2" or "*" looks like a filename
35+
warnings.filterwarnings("ignore", category=MarkupResemblesLocatorWarning)
36+
3237
assert md('\\*') == r'\\\*'
3338
assert md('&lt;foo>') == r'\<foo\>'
3439
assert md('# foo') == r'\# foo'

0 commit comments

Comments
 (0)