bpo-36341: Fix tests calling bind() on AF_UNIX sockets (GH-12399)

Those tests may fail with PermissionError.



https://bugs.python.org/issue36341
This commit is contained in:
xdegaye 2019-05-03 17:09:17 +02:00 committed by Miss Islington (bot)
parent a8a79cacca
commit 4461d704e2
4 changed files with 13 additions and 5 deletions

View file

@ -73,7 +73,7 @@ class SelectorStartServerTests(BaseStartServer, unittest.TestCase):
def new_loop(self):
return asyncio.SelectorEventLoop()
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'no Unix sockets')
@support.skip_unless_bind_unix_socket
def test_start_unix_server_1(self):
HELLO_MSG = b'1' * 1024 * 5 + b'\n'
started = threading.Event()