From 542f7d0d7bd1a12e1884ba4a1508b40e2514d472 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 11 Mar 2024 14:06:26 +0100 Subject: [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION In the past, some files were tested with the standard profile, others with a profile in which most of the messages were switched off ... some files were not checked at all. - ``PYLINT_SEARXNG_DISABLE_OPTION`` has been abolished - the distinction ``# lint: pylint`` is no longer necessary - the pylint tasks have been reduced from three to two 1. ./searx/engines -> lint engines with additional builtins 2. ./searx ./searxng_extra ./tests -> lint all other python files Signed-off-by: Markus Heiser --- tests/unit/test_query.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tests/unit/test_query.py') diff --git a/tests/unit/test_query.py b/tests/unit/test_query.py index 59bbd6574..b4f5f8a0d 100644 --- a/tests/unit/test_query.py +++ b/tests/unit/test_query.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# pylint: disable=missing-module-docstring + from searx import settings from searx.engines import load_engines from searx.query import RawTextQuery @@ -16,7 +19,7 @@ TEST_ENGINES = [ ] -class TestQuery(SearxTestCase): +class TestQuery(SearxTestCase): # pylint:disable=missing-class-docstring def test_simple_query(self): query_text = 'the query' query = RawTextQuery(query_text, []) @@ -56,7 +59,7 @@ class TestQuery(SearxTestCase): self.assertEqual(query.getFullQuery(), '<8 another text') -class TestLanguageParser(SearxTestCase): +class TestLanguageParser(SearxTestCase): # pylint:disable=missing-class-docstring def test_language_code(self): language = 'es-ES' query_text = 'the query' @@ -144,7 +147,7 @@ class TestLanguageParser(SearxTestCase): self.assertEqual(query.autocomplete_list, [':zh-cn', ':zh-hk', ':zh-tw']) -class TestTimeoutParser(SearxTestCase): +class TestTimeoutParser(SearxTestCase): # pylint:disable=missing-class-docstring def test_timeout_below100(self): query_text = '<3 the query' query = RawTextQuery(query_text, []) @@ -196,7 +199,7 @@ class TestTimeoutParser(SearxTestCase): self.assertEqual(query.autocomplete_list, ['<3', '<850']) -class TestExternalBangParser(SearxTestCase): +class TestExternalBangParser(SearxTestCase): # pylint:disable=missing-class-docstring def test_external_bang(self): query_text = '!!ddg the query' query = RawTextQuery(query_text, []) @@ -226,7 +229,7 @@ class TestExternalBangParser(SearxTestCase): self.assertEqual(query.get_autocomplete_full_query(a), a + ' the query') -class TestBang(SearxTestCase): +class TestBang(SearxTestCase): # pylint:disable=missing-class-docstring SPECIFIC_BANGS = ['!dummy_engine', '!du', '!general'] THE_QUERY = 'the query' -- cgit v1.2.3