Skip to content

Commit dde57c1

Browse files
author
Maximilian Schmidt
committed
Add test for exclusion of all keys from a dictionary
1 parent 319dc8f commit dde57c1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

dicthash/test/test_dicthash.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,17 @@ def test_blacklist():
224224
assert(hash0 != hash1)
225225

226226

227+
def test_blacklist_all_keys():
228+
d0 = {'a': 1,
229+
'b': 2}
230+
d1 = {}
231+
232+
hash0 = dicthash.generate_hash_from_dict(d0, blacklist=['a', 'b'])
233+
hash1 = dicthash.generate_hash_from_dict(d1)
234+
235+
assert(hash0 == hash1)
236+
237+
227238
def test_whitelist():
228239
d0 = {
229240
'a': [1, 2, 3],

0 commit comments

Comments
 (0)