]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44781: make distutils test suppress deprecation warning from import distutils...
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Mon, 2 Aug 2021 09:34:55 +0000 (10:34 +0100)
committerGitHub <noreply@github.com>
Mon, 2 Aug 2021 09:34:55 +0000 (11:34 +0200)
Lib/distutils/tests/test_bdist.py

index 09ad076799b42091b2459641ae9c672c5dc0ec88..55fa3930dd92f20f5d142a8a594dfc0238ccd698 100644 (file)
@@ -3,8 +3,11 @@ import os
 import unittest
 from test.support import run_unittest
 
-from distutils.command.bdist import bdist
-from distutils.tests import support
+import warnings
+with warnings.catch_warnings():
+    warnings.simplefilter('ignore', DeprecationWarning)
+    from distutils.command.bdist import bdist
+    from distutils.tests import support
 
 
 class BuildTestCase(support.TempdirManager,