def test_hashing(self): # Rule should be hashable (have a callable __hash__ attribute) params = dict( chain(self.rule_params.items(), self.grpsrc_param.items())) rule = Rule(params) self.assertTrue(hasattr(getattr(rule, '__hash__', None), '__call__')) self.assertEqual(rule.__hash__(), Rule(params).__hash__())
def test_hashing(self): # Rule should be hashable (have a callable __hash__ attribute) params = dict(chain(self.rule_params.items(), self.grpsrc_param.items())) rule = Rule(params) self.assertTrue(hasattr(getattr(rule, '__hash__', None), '__call__')) self.assertEqual(rule.__hash__(), Rule(params).__hash__())