From 6b9e12e4c1b3c5012d8a4149093b84cff6fa4887 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 29 Jul 2025 16:31:28 +0200 Subject: [PATCH] [test] calculator plugin: report the DeprecationWarning once (#5070) Reporting the DeprecationWarning once should be sufficient when running tests. --- tests/unit/test_plugin_calculator.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit/test_plugin_calculator.py b/tests/unit/test_plugin_calculator.py index 505812e19..ca5c5d6c8 100644 --- a/tests/unit/test_plugin_calculator.py +++ b/tests/unit/test_plugin_calculator.py @@ -1,6 +1,8 @@ # SPDX-License-Identifier: AGPL-3.0-or-later # pylint: disable=missing-module-docstring,disable=missing-class-docstring,invalid-name +import warnings + from parameterized.parameterized import parameterized import searx.plugins @@ -14,6 +16,10 @@ from .test_utils import random_string from .test_plugins import do_post_search +# Reporting the DeprecationWarning once should be sufficient when running tests +warnings.filterwarnings("once", category=DeprecationWarning) + + class PluginCalculator(SearxTestCase): def setUp(self):