From 9202027e2666e43b86690c7c1afeb28d2d3adf27 Mon Sep 17 00:00:00 2001 From: AlexVonB Date: Sun, 24 Nov 2024 12:00:27 +0100 Subject: [PATCH] ignore bs4 warnings in tests --- tests/test_escaping.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_escaping.py b/tests/test_escaping.py index 6eb8e07..6b21f68 100644 --- a/tests/test_escaping.py +++ b/tests/test_escaping.py @@ -1,3 +1,5 @@ +import warnings +from bs4 import MarkupResemblesLocatorWarning from markdownify import markdownify as md @@ -29,6 +31,9 @@ def test_single_escaping_entities(): def test_misc(): + # ignore the bs4 warning that "1.2" or "*" looks like a filename + warnings.filterwarnings("ignore", category=MarkupResemblesLocatorWarning) + assert md('\\*') == r'\\\*' assert md('<foo>') == r'\' assert md('# foo') == r'\# foo'