From 20c5bd7b57a4e5fa3b1f606e531b9c78acb9670b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 3 Apr 2022 22:46:18 +0300 Subject: [PATCH 1/2] Fix PytestDeprecationWarning: The --strict option is deprecated, use --strict-markers instead --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 8824977a..1f620d98 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,6 @@ [pytest] # Output fails, errors, xpass, and warnings; ignore doctest; make warnings errors -addopts = -rfEXw -p no:doctest --strict +addopts = -rfEXw -p no:doctest --strict-markers # Make xpass results be considered fail xfail_strict = true From 3bb84c8335533de4bd3a63c28ce17431adfbf37e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 3 Apr 2022 22:57:21 +0300 Subject: [PATCH 2/2] Don't show own DeprecationWarning when testing own code --- html5lib/tests/test_sanitizer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/html5lib/tests/test_sanitizer.py b/html5lib/tests/test_sanitizer.py index f3faeb80..6ad43a3a 100644 --- a/html5lib/tests/test_sanitizer.py +++ b/html5lib/tests/test_sanitizer.py @@ -1,9 +1,14 @@ from __future__ import absolute_import, division, unicode_literals +import warnings + import pytest from html5lib import constants, parseFragment, serialize -from html5lib.filters import sanitizer + +with warnings.catch_warnings(): + warnings.simplefilter("ignore", DeprecationWarning) + from html5lib.filters import sanitizer def sanitize_html(stream): 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