aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_sslproto.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-09-07 01:58:03 +0200
committerGitHub <noreply@github.com>2023-09-07 01:58:03 +0200
commita52a3509770f29f940cda9307704908949912276 (patch)
treeafa301d81a96413dea950cc75ca2f3275ca9073c /Lib/test/test_asyncio/test_sslproto.py
parent60a9eea3f56c002356998f5532b3ad870a1ffa8e (diff)
downloadcpython-a52a3509770f29f940cda9307704908949912276.tar.gz
cpython-a52a3509770f29f940cda9307704908949912276.zip
gh-109015: Add test.support.socket_helper.tcp_blackhole() (#109016)
Skip test_asyncio, test_imaplib and test_socket tests if FreeBSD TCP blackhole is enabled (net.inet.tcp.blackhole=2).
Diffstat (limited to 'Lib/test/test_asyncio/test_sslproto.py')
-rw-r--r--Lib/test/test_asyncio/test_sslproto.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py
index 52a45f1c7c6..37d01533976 100644
--- a/Lib/test/test_asyncio/test_sslproto.py
+++ b/Lib/test/test_asyncio/test_sslproto.py
@@ -5,6 +5,7 @@ import socket
import unittest
import weakref
from test import support
+from test.support import socket_helper
from unittest import mock
try:
import ssl
@@ -350,6 +351,7 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
support.gc_collect()
self.assertIsNone(client_context())
+ @socket_helper.skip_if_tcp_blackhole
def test_start_tls_client_buf_proto_1(self):
HELLO_MSG = b'1' * self.PAYLOAD_SIZE
@@ -502,6 +504,7 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
asyncio.wait_for(client(srv.addr),
timeout=support.SHORT_TIMEOUT))
+ @socket_helper.skip_if_tcp_blackhole
def test_start_tls_server_1(self):
HELLO_MSG = b'1' * self.PAYLOAD_SIZE
ANSWER = b'answer'