diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-01-10 20:16:42 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-01-10 20:16:42 (GMT) |
commit | f86b3c394ce8edab17eac7d2d4ed107679ef6058 (patch) | |
tree | a00e13bbb963e6b831ca24631b7a60096a0630cc /Lib/test/test_ssl.py | |
parent | 96983afd0cedf7347965d1fc6af388cf3dc88976 (diff) | |
parent | 36f7b97787f3428037ffa007bf93dadb738eef03 (diff) | |
download | cpython-f86b3c394ce8edab17eac7d2d4ed107679ef6058.zip cpython-f86b3c394ce8edab17eac7d2d4ed107679ef6058.tar.gz cpython-f86b3c394ce8edab17eac7d2d4ed107679ef6058.tar.bz2 |
merge 3.3 (#16900)
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 2e559b1..7b72209 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -383,6 +383,14 @@ class BasicSocketTests(unittest.TestCase): ss = ssl.wrap_socket(s, server_side=True, certfile=CERTFILE) self.assertIsNone(ss.get_channel_binding("tls-unique")) + def test_dealloc_warn(self): + ss = ssl.wrap_socket(socket.socket(socket.AF_INET)) + r = repr(ss) + with self.assertWarns(ResourceWarning) as cm: + ss = None + support.gc_collect() + self.assertIn(r, str(cm.warning.args[0])) + class ContextTests(unittest.TestCase): @skip_if_broken_ubuntu_ssl |