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
ddb87ab1
Commit
ddb87ab1
authored
Dec 28, 2012
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Plain Diff
Forward port new test for SSLSocket.connect_ex()
parents
0b386d52
40f12ab0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
Lib/test/test_ssl.py
Lib/test/test_ssl.py
+11
-0
No files found.
Lib/test/test_ssl.py
View file @
ddb87ab1
...
@@ -558,6 +558,17 @@ class NetworkedTests(unittest.TestCase):
...
@@ -558,6 +558,17 @@ class NetworkedTests(unittest.TestCase):
finally
:
finally
:
s
.
close
()
s
.
close
()
def
test_connect_ex_error
(
self
):
with
support
.
transient_internet
(
"svn.python.org"
):
s
=
ssl
.
wrap_socket
(
socket
.
socket
(
socket
.
AF_INET
),
cert_reqs
=
ssl
.
CERT_REQUIRED
,
ca_certs
=
SVN_PYTHON_ORG_ROOT_CERT
)
try
:
self
.
assertEqual
(
errno
.
ECONNREFUSED
,
s
.
connect_ex
((
"svn.python.org"
,
444
)))
finally
:
s
.
close
()
def
test_connect_with_context
(
self
):
def
test_connect_with_context
(
self
):
with
support
.
transient_internet
(
"svn.python.org"
):
with
support
.
transient_internet
(
"svn.python.org"
):
# Same as test_connect, but with a separately created context
# Same as test_connect, but with a separately created context
...
...
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