From e6c7a7ce68c9bfd5e0f4cf21b63ca70224094c2e Mon Sep 17 00:00:00 2001 From: Sylvain Brunato Date: Tue, 18 Apr 2023 16:28:19 +0200 Subject: [PATCH] test: skip test_http_server if AF_UNIX socket is not supported --- tests/units/test_http_server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/units/test_http_server.py b/tests/units/test_http_server.py index 4b462f776..07fa26024 100644 --- a/tests/units/test_http_server.py +++ b/tests/units/test_http_server.py @@ -19,6 +19,7 @@ import importlib import json import os +import socket import unittest from tempfile import TemporaryDirectory @@ -30,6 +31,10 @@ from tests.context import DEFAULT_ITEMS_PER_PAGE, SearchResult +# AF_UNIX socket not supported on windows yet, see https://github.com/python/cpython/issues/77589 +@unittest.skipIf( + not hasattr(socket, "AF_UNIX"), "AF_UNIX socket not supported on this OS (windows)" +) class RequestTestCase(unittest.TestCase): @classmethod def setUpClass(cls):