diff --git a/src/trio/_tests/test_dtls.py b/src/trio/_tests/test_dtls.py index 99cb68f11..307463988 100644 --- a/src/trio/_tests/test_dtls.py +++ b/src/trio/_tests/test_dtls.py @@ -1,6 +1,8 @@ from __future__ import annotations import random +import struct +import sys from contextlib import asynccontextmanager from itertools import count from typing import TYPE_CHECKING, NoReturn @@ -24,6 +26,11 @@ from .._core._tests.tutil import binds_ipv6, gc_collect_harder, slow +pytestmark = pytest.mark.skipif( + sys.platform == "win32" and struct.calcsize("P") == 4, + reason="SSL tests are not supported on 32-bit Windows", +) + if TYPE_CHECKING: from collections.abc import AsyncGenerator diff --git a/src/trio/_tests/test_highlevel_ssl_helpers.py b/src/trio/_tests/test_highlevel_ssl_helpers.py index 2d7f39372..cf86686da 100644 --- a/src/trio/_tests/test_highlevel_ssl_helpers.py +++ b/src/trio/_tests/test_highlevel_ssl_helpers.py @@ -1,5 +1,7 @@ from __future__ import annotations +import struct +import sys from functools import partial from typing import TYPE_CHECKING, NoReturn, cast @@ -18,6 +20,11 @@ # using noqa because linters don't understand how pytest fixtures work. from .test_ssl import SERVER_CTX, client_ctx # noqa: F401 +pytestmark = pytest.mark.skipif( + sys.platform == "win32" and struct.calcsize("P") == 4, + reason="SSL tests are not supported on 32-bit Windows", +) + if TYPE_CHECKING: from socket import AddressFamily, SocketKind from ssl import SSLContext diff --git a/src/trio/_tests/test_ssl.py b/src/trio/_tests/test_ssl.py index 8eb065927..f78a0fe1f 100644 --- a/src/trio/_tests/test_ssl.py +++ b/src/trio/_tests/test_ssl.py @@ -3,6 +3,7 @@ import os import socket as stdlib_socket import ssl +import struct import sys import threading from contextlib import asynccontextmanager, contextmanager, suppress @@ -42,6 +43,11 @@ memory_stream_pair, ) +pytestmark = pytest.mark.skipif( + sys.platform == "win32" and struct.calcsize("P") == 4, + reason="SSL tests are not supported on 32-bit Windows", +) + if TYPE_CHECKING: from collections.abc import AsyncIterator, Awaitable, Callable, Iterator