summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2020-11-14 13:45:32 +0100
committerGitHub <noreply@github.com>2020-11-14 13:45:32 +0100
commite1bd617669a3964b0faefa4e75faf4ed29eb319d (patch)
tree80cfb7e81a0134526427be9fd7df342097feb2e5 /tests
parentc3d9b17c2ad93ddf8b958e0a9f54fbfe62dc679f (diff)
parent4d4b6750bceb2ebc4266c4cd1c5ff3667e1764d5 (diff)
downloadsearxng-e1bd617669a3964b0faefa4e75faf4ed29eb319d.tar.gz
searxng-e1bd617669a3964b0faefa4e75faf4ed29eb319d.zip
Merge pull request #2296 from rachmadaniHaryono/feature/suppress-output
suppress test output
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_standalone_searx.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit/test_standalone_searx.py b/tests/unit/test_standalone_searx.py
index c00f033b6..ddf140799 100644
--- a/tests/unit/test_standalone_searx.py
+++ b/tests/unit/test_standalone_searx.py
@@ -2,6 +2,7 @@
"""Test utils/standalone_searx.py"""
import datetime
import importlib.util
+import io
import sys
from mock import Mock, patch
@@ -29,7 +30,9 @@ class StandaloneSearx(SearxTestCase):
sas = get_standalone_searx_module()
with patch.object(sys, 'argv', ['standalone_searx']), \
self.assertRaises(SystemExit):
+ sys.stderr = io.StringIO()
sas.parse_argument()
+ sys.stdout = sys.__stderr__
def test_parse_argument_basic_args(self):
"""Test parse argument with basic args."""