mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
make sure distutils logging is shut off in tests to avoid spurious output
This commit is contained in:
parent
1fa649f2d5
commit
edcac8f416
5 changed files with 25 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue