Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gh-154726: Match socket bind error handling in shutil tests
  • Loading branch information
lkk7 committed Jul 27, 2026
commit 2fb2134bf7ce429c2eaf9389b9064cf12c8ce71a
7 changes: 1 addition & 6 deletions Lib/test/test_shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,12 +1606,7 @@ def test_copyfile_symlink_to_socket(self):
try:
socket_helper.bind_unix_socket(sock, sock_path)
except OSError as e:
if str(e) == "AF_UNIX path too long":
self.skipTest(
"Pathname {0!a} is too long to serve as an AF_UNIX path"
.format(sock_path))
else:
raise
self.skipTest(f'cannot bind AF_UNIX socket: {e}')
self.addCleanup(os_helper.unlink, sock_path)
self._check_copyfile_symlink_to_special_file(sock_path)

Expand Down