Move test that checks for curve descriptions to a separate test
This also ninja-fixes the typo that was in the previous comment.
diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py
index 0fc8f29..b07514f 100644
--- a/OpenSSL/test/test_ssl.py
+++ b/OpenSSL/test/test_ssl.py
@@ -1183,12 +1183,18 @@
for curve in ELLIPTIC_CURVE_DESCRIPTIONS.keys():
context.set_tmp_ecdh_curve(curve) # Must not throw.
+
+ def test_has_curve_descriptions(self):
+ """
+ If the underlying cryptography bindings claim to have elliptic
+ curve support, there should be at least one curve.
+
+ (In theory there could be an OpenSSL that violates this
+ assumption. If so, this test will fail and we'll find out.)
+
+ """
if _Cryptography_HAS_EC:
- # If EC is compiled in, there must be at least one curve
- # Tn theory there could be an OpenSSL that violates this
- # assumption. If so, this test will fail and we'll find
- # out.
- self.assertTrue(ELLIPTIC_CURVE_DESCRIPTIONS)
+ self.assertNotEqual(len(ELLIPTIC_CURVE_DESCRIPTIONS), 0)
def test_set_cipher_list_bytes(self):