mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue #25607: Restore old distutils logging threshold after running tests that
parse command line arguments.
This commit is contained in:
commit
d5c075143b
3 changed files with 5 additions and 1 deletions
|
@ -9,6 +9,7 @@ import test.support
|
|||
from test.support import captured_stdout, run_unittest
|
||||
import unittest
|
||||
from distutils.tests import support
|
||||
from distutils import log
|
||||
|
||||
# setup script that uses __file__
|
||||
setup_using___file__ = """\
|
||||
|
@ -51,6 +52,7 @@ class CoreTestCase(support.EnvironGuard, unittest.TestCase):
|
|||
self.old_stdout = sys.stdout
|
||||
self.cleanup_testfn()
|
||||
self.old_argv = sys.argv, sys.argv[:]
|
||||
self.addCleanup(log.set_threshold, log._global_log.threshold)
|
||||
|
||||
def tearDown(self):
|
||||
sys.stdout = self.old_stdout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue