summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_distutils.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-04-16 09:26:40 (GMT)
committerGitHub <noreply@github.com>2021-04-16 09:26:40 (GMT)
commit69ca32e0d34fe17dd242592b6f8754cda7bae684 (patch)
tree3b0fa21b63e80f33d7dc4cf5da84b9861a9591fc /Lib/test/test_distutils.py
parenta6a5c91b1ee56fa5ba7ab8c5aeca70c31cc85fd3 (diff)
downloadcpython-69ca32e0d34fe17dd242592b6f8754cda7bae684.zip
cpython-69ca32e0d34fe17dd242592b6f8754cda7bae684.tar.gz
cpython-69ca32e0d34fe17dd242592b6f8754cda7bae684.tar.bz2
bpo-41282: Fix distutils.utils.byte_compile() DeprecationWarning (GH-25406)
* byte_compile() of distutils.utils no longer logs a DeprecationWarning * test_distutils no longer logs a DeprecationWarning
Diffstat (limited to 'Lib/test/test_distutils.py')
-rw-r--r--Lib/test/test_distutils.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/test/test_distutils.py b/Lib/test/test_distutils.py
index a37f117..de94da5 100644
--- a/Lib/test/test_distutils.py
+++ b/Lib/test/test_distutils.py
@@ -5,14 +5,20 @@ the test_suite() function there returns a test suite that's ready to
be run.
"""
-import distutils.tests
-import test.support
+import warnings
+from test import support
+from test.support import warnings_helper
+
+with warnings_helper.check_warnings(
+ ("The distutils package is deprecated", DeprecationWarning)):
+
+ import distutils.tests
def test_main():
# used by regrtest
- test.support.run_unittest(distutils.tests.test_suite())
- test.support.reap_children()
+ support.run_unittest(distutils.tests.test_suite())
+ support.reap_children()
def load_tests(*_):