summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-11-12 17:47:14 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-11-12 17:47:14 (GMT)
commit2f85555531c79184767d4954f20e310beda99421 (patch)
tree6a7dee718722e9e00358c95ad94a7298ec18918f /Lib/distutils
parentef2462ea3f736c9920c03750d2ea08d4835ffc2d (diff)
parent84023247b432afba7075e87090986bca72a0e8b0 (diff)
downloadcpython-2f85555531c79184767d4954f20e310beda99421.zip
cpython-2f85555531c79184767d4954f20e310beda99421.tar.gz
cpython-2f85555531c79184767d4954f20e310beda99421.tar.bz2
Issue #25607: Restore old distutils logging threshold after running tests that
parse command line arguments.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/tests/test_core.py2
-rw-r--r--Lib/distutils/tests/test_dist.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_core.py b/Lib/distutils/tests/test_core.py
index 41321f7..654227c 100644
--- a/Lib/distutils/tests/test_core.py
+++ b/Lib/distutils/tests/test_core.py
@@ -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__ = """\
@@ -36,6 +37,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
diff --git a/Lib/distutils/tests/test_dist.py b/Lib/distutils/tests/test_dist.py
index b7fd3fb..1f104ce 100644
--- a/Lib/distutils/tests/test_dist.py
+++ b/Lib/distutils/tests/test_dist.py
@@ -13,6 +13,7 @@ from distutils.cmd import Command
from test.support import TESTFN, captured_stdout, run_unittest
from distutils.tests import support
+from distutils import log
class test_dist(Command):
@@ -405,6 +406,7 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
def test_show_help(self):
# smoke test, just makes sure some help is displayed
+ self.addCleanup(log.set_threshold, log._global_log.threshold)
dist = Distribution()
sys.argv = []
dist.help = 1