make sure distutils logging is shut off in tests to avoid spurious output

This commit is contained in:
Fred Drake 2004-08-03 18:53:07 +00:00
parent 1fa649f2d5
commit edcac8f416
5 changed files with 25 additions and 3 deletions

View file

@ -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.