From 4098c0623b5f55bfb2d735cd79f70602204c2c39 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Thu, 5 Jul 2018 10:33:41 +0100 Subject: [PATCH] tests: quieten signal logger Set signal logger level to CRITICAL to prevent it from spewing out log message on the console for expected errors during tests. --- tests/test_signal.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_signal.py b/tests/test_signal.py index ed4597b6..48a14b15 100644 --- a/tests/test_signal.py +++ b/tests/test_signal.py @@ -13,6 +13,7 @@ # limitations under the License. # +import logging import unittest from nose.tools import assert_equal, assert_true, assert_false @@ -31,6 +32,11 @@ class Callable(object): class TestPriorityDispatcher(unittest.TestCase): + def setUp(self): + # Stop logger output interfering with nose output in the console. + logger = logging.getLogger('signal') + logger.setLevel(logging.CRITICAL) + def test_ConnectNotify(self): one = Callable(1) two = Callable(2)