diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2017-01-27 18:47:07 +0100 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2017-01-28 15:55:42 +0100 |
commit | 2fd8088735e326db2ead663d196ce83354a8c9ec (patch) | |
tree | 0b63763eea09b95bf47edee22063c1924fdefc9a /tests/utils | |
parent | 58a641e43944a424c92175e2dd3b4e86adbb93d1 (diff) |
Silence argparse validator test
Diffstat (limited to 'tests/utils')
-rw-r--r-- | tests/utils/argparse_test.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/utils/argparse_test.py b/tests/utils/argparse_test.py index b76e96ec..b208da8c 100644 --- a/tests/utils/argparse_test.py +++ b/tests/utils/argparse_test.py @@ -25,6 +25,8 @@ import shutil import tempfile import unittest +import mock + from alot.utils import argparse as cargparse @@ -43,7 +45,8 @@ class TestValidatedStore(unittest.TestCase): 'foo', action=cargparse.ValidatedStoreAction, validator=validator) - return parser.parse_args(args) + with mock.patch('sys.stderr', mock.Mock()): + return parser.parse_args(args) def test_validates(self): # Arparse will raise a SystemExit (calls sys.exit) rather than letting |