[Python-checkins] cpython: Errors in "client" methods in test_socket were ignored because of a bogus

antoine.pitrou python-checkins at python.org
Sun Jun 24 01:37:48 CEST 2012


http://hg.python.org/cpython/rev/e2c749bafd6d
changeset:   77662:e2c749bafd6d
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sun Jun 24 01:34:13 2012 +0200
summary:
  Errors in "client" methods in test_socket were ignored because of a bogus except clause.
(this could reveal test failures!)

files:
  Lib/test/test_socket.py |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -2,6 +2,7 @@
 
 import unittest
 from test import support
+from unittest.case import _ExpectedFailure
 
 import errno
 import io
@@ -241,7 +242,7 @@
             raise TypeError("test_func must be a callable function")
         try:
             test_func()
-        except unittest._ExpectedFailure:
+        except _ExpectedFailure:
             # We deliberately ignore expected failures
             pass
         except BaseException as e:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list