From: Antoine Pitrou Date: Tue, 11 Oct 2011 20:43:37 +0000 (+0200) Subject: Fix deprecation warning X-Git-Tag: v3.3.0a1~1217 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ffa547e139e4c314a07988ba66d70096affbc09c;p=thirdparty%2FPython%2Fcpython.git Fix deprecation warning --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index bda1c457c7e2..3d3dd0b65a3e 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1152,8 +1152,8 @@ class BasicCANTest(unittest.TestCase): def testTooLongInterfaceName(self): # most systems limit IFNAMSIZ to 16, take 1024 to be sure with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s: - self.assertRaisesRegexp(socket.error, 'interface name too long', - s.bind, ('x' * 1024,)) + self.assertRaisesRegex(socket.error, 'interface name too long', + s.bind, ('x' * 1024,)) @unittest.skipUnless(hasattr(socket, "CAN_RAW_LOOPBACK"), 'socket.CAN_RAW_LOOPBACK required for this test.')