Skip to content

Commit b7eb563

Browse files
committed
Errors in "client" methods in test_socket were ignored because of a bogus except clause.
(this could reveal test failures!)
1 parent cbfb9a5 commit b7eb563

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_socket.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import unittest
44
from test import support
5+
from unittest.case import _ExpectedFailure
56

67
import errno
78
import io
@@ -241,7 +242,7 @@ def clientRun(self, test_func):
241242
raise TypeError("test_func must be a callable function")
242243
try:
243244
test_func()
244-
except unittest._ExpectedFailure:
245+
except _ExpectedFailure:
245246
# We deliberately ignore expected failures
246247
pass
247248
except BaseException as e:

0 commit comments

Comments
 (0)