aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_sslproto.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-08-26 15:48:24 +0300
committerGitHub <noreply@github.com>2021-08-26 14:48:24 +0200
commit7dc505b8655b3e48b93a4274dfd26e5856d9c64f (patch)
tree37b7b69b36ba9ee715ecdbc2ea1926927d2eee33 /Lib/test/test_asyncio/test_sslproto.py
parent8868d48712aee2b490efaf60bed8dfe9fb14d6b7 (diff)
downloadcpython-7dc505b8655b3e48b93a4274dfd26e5856d9c64f.tar.gz
cpython-7dc505b8655b3e48b93a4274dfd26e5856d9c64f.zip
bpo-45011: Fix test_asyncio without C module _asyncio (GH-27968)
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
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 e87863eb712..a47e43dd4ca 100644
--- a/Lib/test/test_asyncio/test_sslproto.py
+++ b/Lib/test/test_asyncio/test_sslproto.py
@@ -278,6 +278,7 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
# No garbage is left if SSL is closed uncleanly
client_context = weakref.ref(client_context)
+ support.gc_collect()
self.assertIsNone(client_context())
def test_create_connection_memory_leak(self):
@@ -341,6 +342,7 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
# No garbage is left for SSL client from loop.create_connection, even
# if user stores the SSLTransport in corresponding protocol instance
client_context = weakref.ref(client_context)
+ support.gc_collect()
self.assertIsNone(client_context())
def test_start_tls_client_buf_proto_1(self):
@@ -640,6 +642,7 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
# The 10s handshake timeout should be cancelled to free related
# objects without really waiting for 10s
client_sslctx = weakref.ref(client_sslctx)
+ support.gc_collect()
self.assertIsNone(client_sslctx())
def test_create_connection_ssl_slow_handshake(self):