mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
Issue #28683: Fix the tests that bind() a unix socket and raise PermissionError
on Android for a non-root user.
This commit is contained in:
parent
1351c31aa9
commit
e88ed05006
5 changed files with 33 additions and 8 deletions
|
@ -1888,7 +1888,8 @@ class _BasePathTest(object):
|
|||
try:
|
||||
sock.bind(str(P))
|
||||
except OSError as e:
|
||||
if "AF_UNIX path too long" in str(e):
|
||||
if (isinstance(e, PermissionError) or
|
||||
"AF_UNIX path too long" in str(e)):
|
||||
self.skipTest("cannot bind Unix socket: " + str(e))
|
||||
self.assertTrue(P.is_socket())
|
||||
self.assertFalse(P.is_fifo())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue