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

SourceForge.net noreply at sourceforge.net
Wed Jun 21 21:32:26 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-21 12:32

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

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

Comment By: Brett Cannon (bcannon)
Date: 2006-06-20 15:00

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

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

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