diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-21 11:50:17 +0000 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-21 11:50:17 +0000 |
commit | 3f5d146323fe306de7ddccb2506a7161554cc330 (patch) | |
tree | 6fc42ed8a610fcdea9a8155ba24b62286ad8c9ad | |
parent | af61719ec354015566028250a2912efa30f4cda4 (diff) | |
download | cpython-git-3f5d146323fe306de7ddccb2506a7161554cc330.tar.gz |
No more deprecation warnings for distutils.sysconfig, following r78666.
But when the "dl" module is available, it gives a py3k deprecation warning.
-rw-r--r-- | Lib/distutils/tests/test_build_ext.py | 3 | ||||
-rw-r--r-- | Lib/test/test_distutils.py | 11 |
2 files changed, 6 insertions, 8 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 4860c9bf24..f97ae1a7be 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -358,6 +358,9 @@ class BuildExtTestCase(support.TempdirManager, import distutils.core, distutils.extension, distutils.command.build_ext saved_ext = distutils.extension.Extension try: + # on some platforms, it loads the deprecated "dl" module + test_support.import_module('setuptools_build_ext', deprecated=True) + # theses import patch Distutils' Extension class from setuptools_build_ext import build_ext as setuptools_build_ext from setuptools_extension import Extension diff --git a/Lib/test/test_distutils.py b/Lib/test/test_distutils.py index 0a54c57095..a9cbbb46a0 100644 --- a/Lib/test/test_distutils.py +++ b/Lib/test/test_distutils.py @@ -5,18 +5,13 @@ the test_suite() function there returns a test suite that's ready to be run. """ +from test import test_support import distutils.tests -import test.test_support -import warnings def test_main(): - with warnings.catch_warnings(): - warnings.filterwarnings("ignore", - "distutils.sysconfig.\w+ is deprecated", - DeprecationWarning) - test.test_support.run_unittest(distutils.tests.test_suite()) - test.test_support.reap_children() + test_support.run_unittest(distutils.tests.test_suite()) + test_support.reap_children() if __name__ == "__main__": |