From f8036d69ff425b81b7070ce91e31252c72bfe632 Mon Sep 17 00:00:00 2001 From: Christopher Papke Date: Tue, 5 Apr 2022 14:54:42 -0700 Subject: don't throw exception when comparing PKey to non-PKey --- tests/test_pkey.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/test_pkey.py') 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 -- cgit v1.2.1