1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-04 20:30:11 +01:00

chg: test: suppress output

This commit is contained in:
rachmadaniHaryono 2020-11-05 07:15:29 +08:00
parent c03e4c86bc
commit 4d4b6750bc

View File

@ -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."""