import os
import unittest
from test.support import run_unittest
+import warnings
from distutils.command.bdist import bdist
from distutils.tests import support
names.append('bdist_msi')
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):
# command is not supported on this build
continue
import re
import socket
import threading
+import warnings
import unittest
TestCase = unittest.TestCase
self.assertIs(h._context, context)
self.assertFalse(h._context.post_handshake_auth)
- h = client.HTTPSConnection('localhost', 443, context=context,
- cert_file=CERT_localhost)
+ with warnings.catch_warnings():
+ warnings.filterwarnings('ignore', 'key_file, cert_file and check_hostname are deprecated',
+ DeprecationWarning)
+ h = client.HTTPSConnection('localhost', 443, context=context,
+ cert_file=CERT_localhost)
self.assertTrue(h._context.post_handshake_auth)