diff options
author | Alexandre Flament <alex@al-f.net> | 2020-11-14 13:45:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-14 13:45:32 +0100 |
commit | e1bd617669a3964b0faefa4e75faf4ed29eb319d (patch) | |
tree | 80cfb7e81a0134526427be9fd7df342097feb2e5 /tests | |
parent | c3d9b17c2ad93ddf8b958e0a9f54fbfe62dc679f (diff) | |
parent | 4d4b6750bceb2ebc4266c4cd1c5ff3667e1764d5 (diff) | |
download | searxng-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.py | 3 |
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.""" |