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
bb93f4bb
Commit
bb93f4bb
authored
Jun 20, 2006
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Raise TestSkipped when the test socket connection is refused.
parent
1fb8d83a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Lib/test/test_socket_ssl.py
Lib/test/test_socket_ssl.py
+7
-0
No files found.
Lib/test/test_socket_ssl.py
View file @
bb93f4bb
...
...
@@ -3,6 +3,7 @@
import
sys
from
test
import
test_support
import
socket
import
errno
# Optionally test SSL support. This requires the 'network' resource as given
# on the regrtest command line.
...
...
@@ -54,6 +55,12 @@ def test_timeout():
for. If this message is seen often, test_timeout should be changed to
use a more reliable address."""
%
(
ADDR
,)
return
except
socket
.
err
,
exc
:
# In case connection is refused.
if
(
isinstance
(
exc
.
message
,
tuple
)
and
exc
.
message
[
0
]
==
errno
.
ECONNREFUSED
):
raise
test_support
.
TestSkipped
(
"test socket connection refused"
)
else
:
raise
exc
ss
=
socket
.
ssl
(
s
)
# Read part of return welcome banner twice.
...
...
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