We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c20f23 commit c9827daCopy full SHA for c9827da
Lib/test/test_shutil.py
@@ -1563,7 +1563,11 @@ def test_copyfile_socket(self):
1563
sock_path = os.path.join(self.mkdtemp(), 'sock')
1564
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
1565
self.addCleanup(sock.close)
1566
- socket_helper.bind_unix_socket(sock, sock_path)
+ try:
1567
+ socket_helper.bind_unix_socket(sock, sock_path)
1568
+ except OSError as e:
1569
+ # AF_UNIX path too long (e.g. on iOS)
1570
+ self.skipTest(f'cannot bind AF_UNIX socket: {e}')
1571
self.addCleanup(os_helper.unlink, sock_path)
1572
self.assertRaisesRegex(shutil.SpecialFileError, 'is a socket',
1573
shutil.copyfile, sock_path, sock_path + '.copy')
0 commit comments