[Patches] [ python-Patches-1509404 ] skip tests in test_socket__ssl when connection refused

SourceForge.net noreply at sourceforge.net
Tue Jun 20 19:31:22 CEST 2006


Patches item #1509404, was opened at 2006-06-20 08:57
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1509404&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tests
Group: Python 2.5
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Brett Cannon (bcannon)
Assigned to: Nobody/Anonymous (nobody)
Summary: skip tests in test_socket__ssl when connection refused

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Brett Cannon (bcannon)
Date: 2006-06-20 10:31

Message:
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.

----------------------------------------------------------------------

Comment By: Georg Brandl (gbrandl)
Date: 2006-06-20 09:13

Message:
Logged In: YES 
user_id=849994

I'd say this is the right thing to do.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1509404&group_id=5470


More information about the Patches mailing list