Commit a85a6384 authored by Pablo Galindo's avatar Pablo Galindo Committed by GitHub

bpo-37795: Capture DeprecationWarnings in the test suite (GH-15184)

parent cab8dd1a
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import os import os
import unittest import unittest
from test.support import run_unittest from test.support import run_unittest
import warnings
from distutils.command.bdist import bdist from distutils.command.bdist import bdist
from distutils.tests import support from distutils.tests import support
...@@ -38,7 +39,10 @@ class BuildTestCase(support.TempdirManager, ...@@ -38,7 +39,10 @@ class BuildTestCase(support.TempdirManager,
names.append('bdist_msi') names.append('bdist_msi')
for name in names: for name in names:
subcmd = cmd.get_finalized_command(name) with warnings.catch_warnings():
warnings.filterwarnings('ignore', 'bdist_wininst command is deprecated',
DeprecationWarning)
subcmd = cmd.get_finalized_command(name)
if getattr(subcmd, '_unsupported', False): if getattr(subcmd, '_unsupported', False):
# command is not supported on this build # command is not supported on this build
continue continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment