diff options
author | Jean-Paul Calderone <exarkun@twistedmatrix.com> | 2014-01-11 08:21:46 -0500 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@twistedmatrix.com> | 2014-01-11 08:21:46 -0500 |
commit | d4033eb5b39a7e1cf59a0aaa0cdc380d4b725a99 (patch) | |
tree | 37b44f1f71876c4574fca81d5147e229e2027c5b | |
parent | 7de395630e45c5a9e5c48315af1ac3a3c5c50344 (diff) | |
download | pyopenssl-d4033eb5b39a7e1cf59a0aaa0cdc380d4b725a99.tar.gz |
Add a second `collect()` call which hopefully will make the test pass on PyPy.
-rw-r--r-- | OpenSSL/test/test_ssl.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py index 228d9c5..ea4fceb 100644 --- a/OpenSSL/test/test_ssl.py +++ b/OpenSSL/test/test_ssl.py @@ -1158,6 +1158,12 @@ class ServerNameCallbackTests(TestCase, _LoopbackMixin): del callback context.set_tlsext_servername_callback(replacement) + + # One run of the garbage collector happens to work on CPython. PyPy + # doesn't collect the underlying object until a second run for whatever + # reason. That's fine, it still demonstrates our code has properly + # dropped the reference. + collect() collect() callback = tracker() |