import unittest from tudelft.utilities.tools.safehash import safehash class SafeHashTest(unittest.TestCase): def tests(self): lst=[1,2,3] safehash(lst) safehash({'a':1}) safehash( set(lst)) safehash({'a':set(lst)}) # you can a set in a set... #safehash(set([set(lst)]))