summaryrefslogtreecommitdiff
path: root/tests/unit/network
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2024-03-11 14:06:26 +0100
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-03-11 14:55:38 +0100
commit542f7d0d7bd1a12e1884ba4a1508b40e2514d472 (patch)
tree5256282b267e494200d02914593457854567fec4 /tests/unit/network
parent8205f170ff983e5240d32dc17d7fdb526ebe5fe7 (diff)
[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 <markus.heiser@darmarit.de>
Diffstat (limited to 'tests/unit/network')
-rw-r--r--tests/unit/network/__init__.py2
-rw-r--r--tests/unit/network/test_network.py15
2 files changed, 10 insertions, 7 deletions
diff --git a/tests/unit/network/__init__.py b/tests/unit/network/__init__.py
index e69de29bb..9ed59c825 100644
--- a/tests/unit/network/__init__.py
+++ b/tests/unit/network/__init__.py
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: AGPL-3.0-or-later
+# pylint: disable=missing-module-docstring
diff --git a/tests/unit/network/test_network.py b/tests/unit/network/test_network.py
index 905b981c1..eabb23082 100644
--- a/tests/unit/network/test_network.py
+++ b/tests/unit/network/test_network.py
@@ -1,4 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
+# pylint: disable=missing-module-docstring, protected-access
from mock import patch
@@ -8,7 +9,7 @@ from searx.network.network import Network, NETWORKS, initialize
from tests import SearxTestCase
-class TestNetwork(SearxTestCase):
+class TestNetwork(SearxTestCase): # pylint: disable=missing-class-docstring
def setUp(self):
initialize()
@@ -121,7 +122,7 @@ class TestNetwork(SearxTestCase):
await network.aclose()
-class TestNetworkRequestRetries(SearxTestCase):
+class TestNetworkRequestRetries(SearxTestCase): # pylint: disable=missing-class-docstring
TEXT = 'Lorem Ipsum'
@@ -129,7 +130,7 @@ class TestNetworkRequestRetries(SearxTestCase):
def get_response_404_then_200(cls):
first = True
- async def get_response(*args, **kwargs):
+ async def get_response(*args, **kwargs): # pylint: disable=unused-argument
nonlocal first
if first:
first = False
@@ -169,7 +170,7 @@ class TestNetworkRequestRetries(SearxTestCase):
async def test_retries_exception_then_200(self):
request_count = 0
- async def get_response(*args, **kwargs):
+ async def get_response(*args, **kwargs): # pylint: disable=unused-argument
nonlocal request_count
request_count += 1
if request_count < 3:
@@ -194,7 +195,7 @@ class TestNetworkRequestRetries(SearxTestCase):
await network.aclose()
-class TestNetworkStreamRetries(SearxTestCase):
+class TestNetworkStreamRetries(SearxTestCase): # pylint: disable=missing-class-docstring
TEXT = 'Lorem Ipsum'
@@ -202,7 +203,7 @@ class TestNetworkStreamRetries(SearxTestCase):
def get_response_exception_then_200(cls):
first = True
- def stream(*args, **kwargs):
+ def stream(*args, **kwargs): # pylint: disable=unused-argument
nonlocal first
if first:
first = False
@@ -228,7 +229,7 @@ class TestNetworkStreamRetries(SearxTestCase):
async def test_retries_exception(self):
first = True
- def stream(*args, **kwargs):
+ def stream(*args, **kwargs): # pylint: disable=unused-argument
nonlocal first
if first:
first = False