]> granicus.if.org Git - python/commitdiff
Fix deprecation warning
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 11 Oct 2011 20:43:37 +0000 (22:43 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 11 Oct 2011 20:43:37 +0000 (22:43 +0200)
Lib/test/test_socket.py

index bda1c457c7e245ba1b61179ae1816f5ac90321ab..3d3dd0b65a3ed1f2eee9da1df1b5619fef1b7770 100644 (file)
@@ -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.')