summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r--Lib/distutils/tests/support.py13
-rw-r--r--Lib/distutils/tests/test_build_py.py4
-rw-r--r--Lib/distutils/tests/test_build_scripts.py4
-rw-r--r--Lib/distutils/tests/test_install_scripts.py4
4 files changed, 22 insertions, 3 deletions
diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py
index cef985d..475ceee 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.
diff --git a/Lib/distutils/tests/test_build_py.py b/Lib/distutils/tests/test_build_py.py
index 6f72768..78e4c55 100644
--- a/Lib/distutils/tests/test_build_py.py
+++ b/Lib/distutils/tests/test_build_py.py
@@ -9,7 +9,9 @@ from distutils.core import Distribution
from distutils.tests import support
-class BuildPyTestCase(support.TempdirManager, unittest.TestCase):
+class BuildPyTestCase(support.TempdirManager,
+ support.LoggingSilencer,
+ unittest.TestCase):
def test_package_data(self):
sources = self.mkdtemp()
diff --git a/Lib/distutils/tests/test_build_scripts.py b/Lib/distutils/tests/test_build_scripts.py
index 7ef71cc..bf25b38 100644
--- a/Lib/distutils/tests/test_build_scripts.py
+++ b/Lib/distutils/tests/test_build_scripts.py
@@ -9,7 +9,9 @@ from distutils.core import Distribution
from distutils.tests import support
-class BuildScriptsTestCase(support.TempdirManager, unittest.TestCase):
+class BuildScriptsTestCase(support.TempdirManager,
+ support.LoggingSilencer,
+ unittest.TestCase):
def test_default_settings(self):
cmd = self.get_build_scripts_cmd("/foo/bar", [])
diff --git a/Lib/distutils/tests/test_install_scripts.py b/Lib/distutils/tests/test_install_scripts.py
index 2e86dcd..fffa6ef 100644
--- a/Lib/distutils/tests/test_install_scripts.py
+++ b/Lib/distutils/tests/test_install_scripts.py
@@ -9,7 +9,9 @@ from distutils.core import Distribution
from distutils.tests import support
-class InstallScriptsTestCase(support.TempdirManager, unittest.TestCase):
+class InstallScriptsTestCase(support.TempdirManager,
+ support.LoggingSilencer,
+ unittest.TestCase):
def test_default_settings(self):
dist = Distribution()