]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix test_ssl.test_refcycle()
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 21 Mar 2016 16:26:04 +0000 (17:26 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 21 Mar 2016 16:26:04 +0000 (17:26 +0100)
Issue #26590: support.check_warnings() stores warnins, but ResourceWarning now
comes with a reference to the socket object which indirectly keeps the socket
alive.

Lib/test/test_ssl.py

index 9a48483067868726f511928a5dfa8b3bc563bc41..e0c31a843e72eb95d39941834ada71354f3b8c52 100644 (file)
@@ -328,7 +328,7 @@ class BasicSocketTests(unittest.TestCase):
         wr = weakref.ref(ss)
         with support.check_warnings(("", ResourceWarning)):
             del ss
-            self.assertEqual(wr(), None)
+        self.assertEqual(wr(), None)
 
     def test_wrapped_unconnected(self):
         # Methods on an unconnected SSLSocket propagate the original