aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-23 19:30:35 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-23 19:30:35 -0600
commit7e75b620f1c63fcc6168fe611eafa97fd709121b (patch)
tree2a7222914a933ab887815a4995ec50ccf89bb510
parent1f943ab1a6ed391ef9474152e3f5ccb666cce4c9 (diff)
downloadcryptography-7e75b620f1c63fcc6168fe611eafa97fd709121b.tar.gz
cryptography-7e75b620f1c63fcc6168fe611eafa97fd709121b.tar.bz2
cryptography-7e75b620f1c63fcc6168fe611eafa97fd709121b.zip
address review comments
-rw-r--r--tests/test_x509.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 034e5601..ab4d6660 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -6,7 +6,6 @@ from __future__ import absolute_import, division, print_function
import binascii
import datetime
-import gc
import ipaddress
import os
@@ -178,17 +177,13 @@ class TestCertificateRevocationList(object):
"""
This test attempts to trigger the crash condition described in
https://github.com/pyca/cryptography/issues/2557
+ PyPy does gc at its own pace, so it will only be reliable on CPython.
"""
- crl = _load_cert(
+ revoked = _load_cert(
os.path.join("x509", "custom", "crl_all_reasons.pem"),
x509.load_pem_x509_crl,
backend
- )
- revoked = crl[11]
- crl = "overwritten"
- # force a gc collection to potentially X509_CRL_free if there are
- # no references to the X509_CRL left.
- gc.collect()
+ )[11]
assert revoked.revocation_date == datetime.datetime(2015, 1, 1, 0, 0)
assert revoked.serial_number == 11