diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-04-23 23:10:32 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-04-23 23:10:32 (GMT) |
commit | 9d5436621fb968a59350745cd3b7cb117a87c2a9 (patch) | |
tree | c0dbc315e41cb56404e8d6265eb3ec28db6048dd /Lib | |
parent | ce2d24d54987a73fd584ae299d3349f534943c65 (diff) | |
download | cpython-9d5436621fb968a59350745cd3b7cb117a87c2a9.zip cpython-9d5436621fb968a59350745cd3b7cb117a87c2a9.tar.gz cpython-9d5436621fb968a59350745cd3b7cb117a87c2a9.tar.bz2 |
Only the test is merged in.
Merged revisions 80423 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80423 | antoine.pitrou | 2010-04-24 00:54:59 +0200 (sam., 24 avril 2010) | 4 lines
Issue #7943: Fix circular reference created when instantiating an SSL
socket. Initial patch by Péter Szabó.
........
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_ssl.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 2aa265a..f00478c 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -11,6 +11,7 @@ import pprint import urllib.parse, urllib.request import traceback import asyncore +import weakref from http.server import HTTPServer, SimpleHTTPRequestHandler @@ -138,6 +139,16 @@ class BasicTests(unittest.TestCase): with self.assertRaisesRegexp(ssl.SSLError, "No cipher can be selected"): s.connect(remote) + @support.cpython_only + def test_refcycle(self): + # Issue #7943: an SSL object doesn't create reference cycles with + # itself. + s = socket.socket(socket.AF_INET) + ss = ssl.wrap_socket(s) + wr = weakref.ref(ss) + del ss + self.assertEqual(wr(), None) + class NetworkedTests(unittest.TestCase): |