mirror of
https://github.com/python/cpython.git
synced 2025-08-25 11:15:02 +00:00
Fix deprecation warning
This commit is contained in:
parent
2c5d3cbfb8
commit
ffa547e139
1 changed files with 2 additions and 2 deletions
|
@ -1152,7 +1152,7 @@ class BasicCANTest(unittest.TestCase):
|
||||||
def testTooLongInterfaceName(self):
|
def testTooLongInterfaceName(self):
|
||||||
# most systems limit IFNAMSIZ to 16, take 1024 to be sure
|
# 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:
|
with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s:
|
||||||
self.assertRaisesRegexp(socket.error, 'interface name too long',
|
self.assertRaisesRegex(socket.error, 'interface name too long',
|
||||||
s.bind, ('x' * 1024,))
|
s.bind, ('x' * 1024,))
|
||||||
|
|
||||||
@unittest.skipUnless(hasattr(socket, "CAN_RAW_LOOPBACK"),
|
@unittest.skipUnless(hasattr(socket, "CAN_RAW_LOOPBACK"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue