Kaydet (Commit) e0b75b7e authored tarafından Victor Stinner's avatar Victor Stinner

Fix test_ssl.test_refcycle()

Issue #26590: support.check_warnings() stores warnins, but ResourceWarning now
comes with a reference to the socket object which indirectly keeps the socket
alive.
üst 19a8e844
...@@ -328,7 +328,7 @@ class BasicSocketTests(unittest.TestCase): ...@@ -328,7 +328,7 @@ class BasicSocketTests(unittest.TestCase):
wr = weakref.ref(ss) wr = weakref.ref(ss)
with support.check_warnings(("", ResourceWarning)): with support.check_warnings(("", ResourceWarning)):
del ss del ss
self.assertEqual(wr(), None) self.assertEqual(wr(), None)
def test_wrapped_unconnected(self): def test_wrapped_unconnected(self):
# Methods on an unconnected SSLSocket propagate the original # Methods on an unconnected SSLSocket propagate the original
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment