From edcac8f416ebe4561bbc0e91c46a3bfc5457f73c Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 3 Aug 2004 18:53:07 +0000 Subject: make sure distutils logging is shut off in tests to avoid spurious output --- Lib/distutils/tests/support.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Lib/distutils/tests/support.py') diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py index cef985d79a..475ceee598 100644 --- a/Lib/distutils/tests/support.py +++ b/Lib/distutils/tests/support.py @@ -3,6 +3,19 @@ import shutil import tempfile +from distutils import log + + +class LoggingSilencer(object): + + def setUp(self): + super(LoggingSilencer, self).setUp() + self.threshold = log.set_threshold(log.FATAL) + + def tearDown(self): + log.set_threshold(self.threshold) + super(LoggingSilencer, self).tearDown() + class TempdirManager(object): """Mix-in class that handles temporary directories for test cases. -- cgit v1.2.1