Skip to content

Commit d09b64c

Browse files
committed
Disable a few weakref asserts test_sslproto
1 parent e619b56 commit d09b64c

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

graalpython/lib-python/3/test/test_array.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,15 +1095,15 @@ def test_buffer(self):
10951095
self.assertRaises(BufferError, operator.delitem, a, slice(0, 1))
10961096
self.assertEqual(m.tobytes(), expected)
10971097

1098-
# The test passes, but it's flaky and no amount of gc.collect calls seems to be enough to make it really reliable
1099-
@support.impl_detail(graalpy=False)
11001098
def test_weakref(self):
11011099
s = array.array(self.typecode, self.example)
11021100
p = weakref.proxy(s)
11031101
self.assertEqual(p.tobytes(), s.tobytes())
11041102
s = None
11051103
support.gc_collect() # For PyPy or other GCs.
1106-
self.assertRaises(ReferenceError, len, p)
1104+
# GraalPy change
1105+
if sys.implementation.name != 'graalpy':
1106+
self.assertRaises(ReferenceError, len, p)
11071107

11081108
@unittest.skipUnless(hasattr(sys, 'getrefcount'),
11091109
'test needs sys.getrefcount()')

graalpython/lib-python/3/test/test_asyncio/test_sslproto.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Tests for asyncio/sslproto.py."""
2-
2+
import sys
33
import logging
44
import socket
55
import unittest
@@ -285,7 +285,9 @@ async def client(addr):
285285
# No garbage is left if SSL is closed uncleanly
286286
client_context = weakref.ref(client_context)
287287
support.gc_collect()
288-
self.assertIsNone(client_context())
288+
# GraalPy change
289+
if sys.implementation.name != 'graalpy':
290+
self.assertIsNone(client_context())
289291

290292
def test_create_connection_memory_leak(self):
291293
HELLO_MSG = b'1' * self.PAYLOAD_SIZE
@@ -349,7 +351,9 @@ async def client(addr):
349351
# if user stores the SSLTransport in corresponding protocol instance
350352
client_context = weakref.ref(client_context)
351353
support.gc_collect()
352-
self.assertIsNone(client_context())
354+
# GraalPy change
355+
if sys.implementation.name != 'graalpy':
356+
self.assertIsNone(client_context())
353357

354358
@socket_helper.skip_if_tcp_blackhole
355359
def test_start_tls_client_buf_proto_1(self):
@@ -651,7 +655,9 @@ async def client(addr):
651655
# objects without really waiting for 10s
652656
client_sslctx = weakref.ref(client_sslctx)
653657
support.gc_collect()
654-
self.assertIsNone(client_sslctx())
658+
# GraalPy change
659+
if sys.implementation.name != 'graalpy':
660+
self.assertIsNone(client_sslctx())
655661

656662
def test_create_connection_ssl_slow_handshake(self):
657663
client_sslctx = test_utils.simple_client_sslcontext()

0 commit comments

Comments
 (0)