diff options
author | rachmadaniHaryono <foreturiga@gmail.com> | 2020-11-05 07:15:29 +0800 |
---|---|---|
committer | rachmadaniHaryono <foreturiga@gmail.com> | 2020-11-05 07:15:29 +0800 |
commit | 4d4b6750bceb2ebc4266c4cd1c5ff3667e1764d5 (patch) | |
tree | 50664cdff8edee145944b0c0c52ecbebd9206f2a /tests | |
parent | c03e4c86bc49d6ef4664c038066d9f1c16e7dafc (diff) | |
download | searxng-4d4b6750bceb2ebc4266c4cd1c5ff3667e1764d5.tar.gz searxng-4d4b6750bceb2ebc4266c4cd1c5ff3667e1764d5.zip |
chg: test: suppress 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 cd1a14f46..6b8bdac2d 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 @@ -28,7 +29,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.""" |