diff options
| author | Barry Warsaw | 2014-04-28 11:23:35 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2014-04-28 11:23:35 -0400 |
| commit | d4d71f71f08d6d440b17482eecc5472dcfe6cbae (patch) | |
| tree | 71f08b3d60f698883294eaa6d1bf366a095da011 /src/mailman/config/tests/test_configuration.py | |
| parent | 7536530dcd8d6303c0a869e8c9c2cb2517b9b018 (diff) | |
| download | mailman-d4d71f71f08d6d440b17482eecc5472dcfe6cbae.tar.gz mailman-d4d71f71f08d6d440b17482eecc5472dcfe6cbae.tar.zst mailman-d4d71f71f08d6d440b17482eecc5472dcfe6cbae.zip | |
Diffstat (limited to 'src/mailman/config/tests/test_configuration.py')
| -rw-r--r-- | src/mailman/config/tests/test_configuration.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mailman/config/tests/test_configuration.py b/src/mailman/config/tests/test_configuration.py index 3c623c005..ee4827041 100644 --- a/src/mailman/config/tests/test_configuration.py +++ b/src/mailman/config/tests/test_configuration.py @@ -28,6 +28,7 @@ __all__ = [ import os +import mock import tempfile import unittest @@ -121,7 +122,8 @@ layout: nonesuch # Use a fake sys.exit() function that records that it was called, and # that prevents further processing. config = Configuration() - with self.assertRaises(SystemExit) as cm: + # Suppress warning messages in the test output. + with self.assertRaises(SystemExit) as cm, mock.patch('sys.stderr'): config.load(filename) self.assertEqual(cm.exception.args, (1,)) @@ -137,6 +139,7 @@ layout: nonesuch log_dir: $nopath/log_dir """, file=fp) config = Configuration() - with self.assertRaises(SystemExit) as cm: + # Suppress warning messages in the test output. + with self.assertRaises(SystemExit) as cm, mock.patch('sys.stderr'): config.load(filename) self.assertEqual(cm.exception.args, (1,)) |
