Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
aa542c2c
Commit
aa542c2c
authored
Aug 08, 2019
by
Pablo Galindo
Committed by
GitHub
Aug 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-37795: Capture DeprecationWarnings in the test suite (GH-15184)
parent
10a0a093
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
Lib/distutils/tests/test_bdist.py
Lib/distutils/tests/test_bdist.py
+5
-1
Lib/test/test_httplib.py
Lib/test/test_httplib.py
+6
-2
No files found.
Lib/distutils/tests/test_bdist.py
View file @
aa542c2c
...
...
@@ -2,6 +2,7 @@
import
os
import
unittest
from
test.support
import
run_unittest
import
warnings
from
distutils.command.bdist
import
bdist
from
distutils.tests
import
support
...
...
@@ -38,7 +39,10 @@ class BuildTestCase(support.TempdirManager,
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
...
...
Lib/test/test_httplib.py
View file @
aa542c2c
...
...
@@ -7,6 +7,7 @@ import array
import
re
import
socket
import
threading
import
warnings
import
unittest
TestCase
=
unittest
.
TestCase
...
...
@@ -1759,8 +1760,11 @@ class HTTPSTest(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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment