From 1508c4b8cde2cb53c9b04a6b7b1185ea25c0ec01 Mon Sep 17 00:00:00 2001 From: julianz- Date: Fri, 26 Jan 2024 10:42:55 -0800 Subject: [PATCH] fix for E721 errors raised by flake8 (#1289) --- tests/test_crypto.py | 8 ++++---- tests/test_ssl.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_crypto.py b/tests/test_crypto.py index 3d1bf82f..b9bb0de6 100644 --- a/tests/test_crypto.py +++ b/tests/test_crypto.py @@ -1740,7 +1740,7 @@ def test_construction(self): certificate = X509() assert isinstance(certificate, X509) assert type(certificate).__name__ == "X509" - assert type(certificate) == X509 + assert type(certificate) is X509 def test_set_version_wrong_args(self): """ @@ -3148,7 +3148,7 @@ def test_construction(self): """ revoked = Revoked() assert isinstance(revoked, Revoked) - assert type(revoked) == Revoked + assert type(revoked) is Revoked assert revoked.get_serial() == b"00" assert revoked.get_rev_date() is None assert revoked.get_reason() is None @@ -3443,8 +3443,8 @@ def test_get_revoked(self): revs = crl.get_revoked() assert len(revs) == 2 - assert type(revs[0]) == Revoked - assert type(revs[1]) == Revoked + assert type(revs[0]) is Revoked + assert type(revs[1]) is Revoked assert revs[0].get_serial() == b"03AB" assert revs[1].get_serial() == b"0100" assert revs[0].get_rev_date() == now diff --git a/tests/test_ssl.py b/tests/test_ssl.py index ca5bf836..5ea068a4 100644 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -190,7 +190,7 @@ def join_bytes_or_unicode(prefix, suffix): The return type is the same as the type of ``prefix``. """ # If the types are the same, nothing special is necessary. - if type(prefix) == type(suffix): + if type(prefix) is type(suffix): return join(prefix, suffix) # Otherwise, coerce suffix to the type of prefix.