Skip to content

Commit 2fb2134

Browse files
committed
gh-154726: Match socket bind error handling in shutil tests
1 parent 88fa4c7 commit 2fb2134

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

Lib/test/test_shutil.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,12 +1606,7 @@ def test_copyfile_symlink_to_socket(self):
16061606
try:
16071607
socket_helper.bind_unix_socket(sock, sock_path)
16081608
except OSError as e:
1609-
if str(e) == "AF_UNIX path too long":
1610-
self.skipTest(
1611-
"Pathname {0!a} is too long to serve as an AF_UNIX path"
1612-
.format(sock_path))
1613-
else:
1614-
raise
1609+
self.skipTest(f'cannot bind AF_UNIX socket: {e}')
16151610
self.addCleanup(os_helper.unlink, sock_path)
16161611
self._check_copyfile_symlink_to_special_file(sock_path)
16171612

0 commit comments

Comments
 (0)