diff options
author | Christopher Papke <chris.papke@imperva.com> | 2022-04-05 14:54:42 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2022-04-25 08:07:40 -0400 |
commit | f8036d69ff425b81b7070ce91e31252c72bfe632 (patch) | |
tree | 34bba6bc8f7e3e2910786a628567ad663362e66f /tests/test_pkey.py | |
parent | 094a5e10982c7d7ef9f17fdf755d755fec9fe19b (diff) |
don't throw exception when comparing PKey to non-PKey
Diffstat (limited to 'tests/test_pkey.py')
-rw-r--r-- | tests/test_pkey.py | 5 |
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 |