Merge pull request #2296 from rachmadaniHaryono/feature/suppress-output

suppress test output
This commit is contained in:
Alexandre Flament 2020-11-14 13:45:32 +01:00 committed by GitHub
commit e1bd617669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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