mirror of
https://github.com/searxng/searxng.git
synced 2024-11-17 18:00:12 +01:00
Merge pull request #2296 from rachmadaniHaryono/feature/suppress-output
suppress test output
This commit is contained in:
commit
e1bd617669
@ -2,6 +2,7 @@
|
|||||||
"""Test utils/standalone_searx.py"""
|
"""Test utils/standalone_searx.py"""
|
||||||
import datetime
|
import datetime
|
||||||
import importlib.util
|
import importlib.util
|
||||||
|
import io
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from mock import Mock, patch
|
from mock import Mock, patch
|
||||||
@ -29,7 +30,9 @@ class StandaloneSearx(SearxTestCase):
|
|||||||
sas = get_standalone_searx_module()
|
sas = get_standalone_searx_module()
|
||||||
with patch.object(sys, 'argv', ['standalone_searx']), \
|
with patch.object(sys, 'argv', ['standalone_searx']), \
|
||||||
self.assertRaises(SystemExit):
|
self.assertRaises(SystemExit):
|
||||||
|
sys.stderr = io.StringIO()
|
||||||
sas.parse_argument()
|
sas.parse_argument()
|
||||||
|
sys.stdout = sys.__stderr__
|
||||||
|
|
||||||
def test_parse_argument_basic_args(self):
|
def test_parse_argument_basic_args(self):
|
||||||
"""Test parse argument with basic args."""
|
"""Test parse argument with basic args."""
|
||||||
|
Loading…
Reference in New Issue
Block a user