summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristopher Papke <chris.papke@imperva.com>2022-04-05 14:54:42 -0700
committerJeff Forcier <jeff@bitprophet.org>2022-04-25 08:07:40 -0400
commitf8036d69ff425b81b7070ce91e31252c72bfe632 (patch)
tree34bba6bc8f7e3e2910786a628567ad663362e66f /tests
parent094a5e10982c7d7ef9f17fdf755d755fec9fe19b (diff)
downloadparamiko-f8036d69ff425b81b7070ce91e31252c72bfe632.tar.gz
don't throw exception when comparing PKey to non-PKey
Diffstat (limited to 'tests')
-rw-r--r--tests/test_pkey.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_pkey.py b/tests/test_pkey.py
index e652740c..687e776b 100644
--- a/tests/test_pkey.py
+++ b/tests/test_pkey.py
@@ -622,6 +622,11 @@ class KeyTest(unittest.TestCase):
for key1, key2 in self.keys():
assert key1 == key2
+ def test_keys_are_not_equal_to_other(self):
+ for value in [None, True, ""]:
+ for key1, _ in self.keys():
+ assert key1 != value
+
def test_keys_are_hashable(self):
# NOTE: this isn't a great test due to hashseed randomization under
# Python 3 preventing use of static values, but it does still prove