[Python-checkins] r47047 - python/trunk/Lib/test/test_socket_ssl.py

Brett Cannon brett at python.org
Tue Jun 20 21:31:19 CEST 2006


On 6/20/06, Neal Norwitz <nnorwitz at gmail.com> wrote:
>
> I thought you could only use TestSkipped for whole files.  What is
> done in other places is print a msg that the test is begin skipped.


I went off the docs that just say it is for "a test"; doesn't specify
individual test or test file.  It can obviously be changed (and this time I
will wait for an all-clear on the code freeze).

(Not to mention Martin's point. :-)


Oops.  Noticed all of Andrew's checkins for What's New and it just slipped
my mind.  Really sorry about that, Anthony.  I can back out the change if
you want me to.

-Brett

n
> --
>
> On 6/20/06, brett.cannon <python-checkins at python.org> wrote:
> > Author: brett.cannon
> > Date: Tue Jun 20 19:30:26 2006
> > New Revision: 47047
> >
> > Modified:
> >    python/trunk/Lib/test/test_socket_ssl.py
> > Log:
> > Raise TestSkipped when the test socket connection is refused.
> >
> >
> > Modified: python/trunk/Lib/test/test_socket_ssl.py
> >
> ==============================================================================
> > --- python/trunk/Lib/test/test_socket_ssl.py    (original)
> > +++ python/trunk/Lib/test/test_socket_ssl.py    Tue Jun 20 19:30:26 2006
> > @@ -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 @@
> >      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.
> > _______________________________________________
> > Python-checkins mailing list
> > Python-checkins at python.org
> > http://mail.python.org/mailman/listinfo/python-checkins
> >
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-checkins/attachments/20060620/86a55058/attachment.html 


More information about the Python-checkins mailing list