From 84005936bc02bc928fc7901e08b7866bf808da6b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Sep 2014 10:03:56 +0100 Subject: Adjusted formatting and added EC check Due to the code failing the PEP-8 test, the test code has been reformatted so that there are two blank lines between the function and the next class, and the overlong line has been adjusted. Also added a check to the private key loading function to check for the Cryptography_HAS_EC field. This has been tested on Windows only. --- tests/hazmat/primitives/test_serialization.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/hazmat/primitives/test_serialization.py b/tests/hazmat/primitives/test_serialization.py index 4d32fba2..77d748b3 100644 --- a/tests/hazmat/primitives/test_serialization.py +++ b/tests/hazmat/primitives/test_serialization.py @@ -61,7 +61,8 @@ class TestPEMSerialization(object): def test_load_pem_ec_private_key_encrypted(self, backend): key = load_vectors_from_file( os.path.join( - "asymmetric", "PEM_Serialization", "ec_private_key_encrypted.pem"), + "asymmetric", "PEM_Serialization", + "ec_private_key_encrypted.pem"), lambda pemfile: load_pem_private_key( pemfile.read().encode(), b"123456", backend ) @@ -70,6 +71,7 @@ class TestPEMSerialization(object): assert key assert isinstance(key, interfaces.EllipticCurvePrivateKey) + @pytest.mark.traditional_openssl_serialization class TestTraditionalOpenSSLSerialization(object): @pytest.mark.parametrize( -- cgit v1.2.3