summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncore.py
diff options
context:
space:
mode:
authorXavier de Gaye <xdegaye@users.sourceforge.net>2016-12-14 10:52:28 (GMT)
committerXavier de Gaye <xdegaye@users.sourceforge.net>2016-12-14 10:52:28 (GMT)
commite88ed05006d4eef73e550149efa5ec11c6336dcc (patch)
treefcc6a625175d8475fb86f7852da849d88070c3a1 /Lib/test/test_asyncore.py
parent1351c31aa9651b278d7ef8ec79af3b646a520235 (diff)
downloadcpython-e88ed05006d4eef73e550149efa5ec11c6336dcc.zip
cpython-e88ed05006d4eef73e550149efa5ec11c6336dcc.tar.gz
cpython-e88ed05006d4eef73e550149efa5ec11c6336dcc.tar.bz2
Issue #28683: Fix the tests that bind() a unix socket and raise PermissionError
on Android for a non-root user.
Diffstat (limited to 'Lib/test/test_asyncore.py')
-rw-r--r--Lib/test/test_asyncore.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
index dbee593..51c6573 100644
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -95,7 +95,9 @@ def bind_af_aware(sock, addr):
if HAS_UNIX_SOCKETS and sock.family == socket.AF_UNIX:
# Make sure the path doesn't exist.
support.unlink(addr)
- sock.bind(addr)
+ support.bind_unix_socket(sock, addr)
+ else:
+ sock.bind(addr)
class HelperFunctionTests(unittest.TestCase):