This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: skip tests in test_socket__ssl when connection refused
Type: Stage:
Components: Tests Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, georg.brandl
Priority: normal Keywords: patch

Created on 2006-06-20 15:57 by brett.cannon, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_socket_ssl.diff brett.cannon, 2006-06-20 15:57 prevent socket connection refusal from causing test failure
Messages (5)
msg50513 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2006-06-20 15:57
When a socket connection is refused, it isn't a failure
of the test, it could just be network issues or the
site that we are trying to connect to (we really need
to point all tests to python.org but I don't know if we
has SSL set up).

The attached patch catches socket.error and checks if
it is because of a connection refusal (based on its
errno).  If that is the case, the test to returns,
otherwise the exception is re-raised.
msg50514 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-06-20 16:13
Logged In: YES 
user_id=849994

I'd say this is the right thing to do.
msg50515 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2006-06-20 17:31
Logged In: YES 
user_id=357491

One vote of confidence is enough for me!

Modified to raise TestSkipped instead of a bare return. 
Committed in rev. 47047.
msg50516 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2006-06-20 22:00
Logged In: YES 
user_id=357491

Well, even after a change for a typo (left off the 'or'
suffix on "error"), it still didn't work; see
http://www.python.org/dev/buildbot/trunk/S-390%20Debian%20trunk/builds/181/step-test/0
.  I think that unfortunately, as it stands, when at the C
level something is raised using PyErr_SetObject() the value
argument is assigned to args, using *args, not to message.
msg50517 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2006-06-21 19:32
Logged In: YES 
user_id=357491

rev. 47053 has the change to get the errno out of
exc.argx[0].  Also changed back to a bare return but also
prints out why the test was skipped.
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43531
2006-06-20 15:57:39brett.cannoncreate