diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2017-01-29 11:03:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-29 11:03:07 +0000 |
commit | 1a403797f07cfa425b52926b60336ae1301650e2 (patch) | |
tree | 31e246197ddf8f0442c9da76674f8b8665a92f84 /tests | |
parent | c564aea04c434620876d370c77ba25e742c47c10 (diff) | |
parent | 2fd8088735e326db2ead663d196ce83354a8c9ec (diff) |
Merge pull request #1014 from lucc/tests/silence
Silence argparse validator test
Diffstat (limited to 'tests')
-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 |