Exemplo n.º 1
0
 def testSameHashParams(self):
     """If the args are substituted after creation, the hash shouldn't change"""
     def a(arg1, arg2):
         return arg1+arg2
     
     fc = FunctionCall(a, {'arg1' : 1, 'arg2' : 2})
     hash1 = fc.__hash__()
     fc.funcArgs = {'arg1' : 2, 'arg2' : 'something else'}
     hash2 = fc.__hash__()
     
     self.assert_(hash1 == hash2)