MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_sni_callback_refcycle

Method test_sni_callback_refcycle

Lib/test/test_ssl.py:1414–1424  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1412
1413 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: <SSLContext(protocol=17)> is not None
1414 def test_sni_callback_refcycle(self):
1415 # Reference cycles through the servername callback are detected
1416 # and cleared.
1417 ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
1418 def dummycallback(sock, servername, ctx, cycle=ctx):
1419 pass
1420 ctx.set_servername_callback(dummycallback)
1421 wr = weakref.ref(ctx)
1422 del ctx, dummycallback
1423 gc.collect()
1424 self.assertIs(wr(), None)
1425
1426 def test_cert_store_stats(self):
1427 ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)

Callers

nothing calls this directly

Calls 3

collectMethod · 0.80
assertIsMethod · 0.45

Tested by

no test coverage detected