Skip to content

Commit 3bb84c8

Browse files
committed
Don't show own DeprecationWarning when testing own code
1 parent 20c5bd7 commit 3bb84c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

html5lib/tests/test_sanitizer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
from __future__ import absolute_import, division, unicode_literals
22

3+
import warnings
4+
35
import pytest
46

57
from html5lib import constants, parseFragment, serialize
6-
from html5lib.filters import sanitizer
8+
9+
with warnings.catch_warnings():
10+
warnings.simplefilter("ignore", DeprecationWarning)
11+
from html5lib.filters import sanitizer
712

813

914
def sanitize_html(stream):

0 commit comments

Comments
 (0)