mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
bpo-45011: Fix test_asyncio without C module _asyncio (GH-27968)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7dc505b865
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
32c1caa87f
commit
9f814beadb
5 changed files with 13 additions and 7 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue