From edacea30e457e151611a9fe560120cedb3bdc527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Fri, 29 Jan 2010 11:41:03 +0000 Subject: Merged revisions 77704,77752 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77704 | tarek.ziade | 2010-01-23 10:23:15 +0100 (Sat, 23 Jan 2010) | 1 line taking sysconfig out of distutils ........ r77752 | tarek.ziade | 2010-01-26 00:19:56 +0100 (Tue, 26 Jan 2010) | 1 line switched the call order so this call works without suffering from issue #7774 ........ --- Lib/distutils/tests/support.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Lib/distutils/tests/support.py') diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py index e258d2e58d..d60da854be 100644 --- a/Lib/distutils/tests/support.py +++ b/Lib/distutils/tests/support.py @@ -3,11 +3,19 @@ import os import shutil import tempfile from copy import deepcopy +import warnings from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL from distutils.core import Distribution +def capture_warnings(func): + def _capture_warnings(*args, **kw): + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + return func(*args, **kw) + return _capture_warnings + class LoggingSilencer(object): def setUp(self): -- cgit v1.2.1