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
05d936d2
Commit
05d936d2
authored
Oct 13, 2010
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let test_ssl fail gracefully if ssl support is not available
parent
f26f87ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
Lib/test/test_ssl.py
Lib/test/test_ssl.py
+6
-14
No files found.
Lib/test/test_ssl.py
View file @
05d936d2
...
...
@@ -18,17 +18,12 @@ import weakref
import
platform
import
functools
# Optionally test SSL support, if we have it in the tested platform
skip_expected
=
False
try
:
import
ssl
except
ImportError
:
skip_expected
=
True
else
:
PROTOCOLS
=
[
ssl
.
PROTOCOL_SSLv2
,
ssl
.
PROTOCOL_SSLv3
,
ssl
.
PROTOCOL_SSLv23
,
ssl
.
PROTOCOL_TLSv1
]
ssl
=
support
.
import_module
(
"ssl"
)
PROTOCOLS
=
[
ssl
.
PROTOCOL_SSLv2
,
ssl
.
PROTOCOL_SSLv3
,
ssl
.
PROTOCOL_SSLv23
,
ssl
.
PROTOCOL_TLSv1
]
HOST
=
support
.
HOST
...
...
@@ -1489,9 +1484,6 @@ else:
def
test_main
(
verbose
=
False
):
if
skip_expected
:
raise
unittest
.
SkipTest
(
"No SSL support"
)
if
support
.
verbose
:
plats
=
{
'Linux'
:
platform
.
linux_distribution
,
...
...
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