Skip to content

Commit 6815a54

Browse files
authored
Fix pytest warnings (#544)
1 parent d1dfa20 commit 6815a54

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
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):

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[pytest]
22
# Output fails, errors, xpass, and warnings; ignore doctest; make warnings errors
3-
addopts = -rfEXw -p no:doctest --strict
3+
addopts = -rfEXw -p no:doctest --strict-markers
44

55
# Make xpass results be considered fail
66
xfail_strict = true

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy