Home | History | Annotate | Download | only in test

Lines Matching refs:new

63         # of hashlib.new given the algorithm name.
68 return hashlib.new(_alg)
69 return hashlib.new(_alg, data)
85 self.constructors_to_test['md5'].add(_md5.new)
88 self.constructors_to_test['sha1'].add(_sha.new)
122 self.assertRaises(ValueError, hashlib.new, 'spam spam spam spam spam')
123 self.assertRaises(TypeError, hashlib.new, 1)
146 h = hashlib.new(name)
156 m1 = hashlib.new(name)
161 m2 = hashlib.new(name)
165 m3 = hashlib.new(name, abcs)
166 self.assertEqual(m1.digest(), m3.digest(), name+' new problem.')
170 # 2 is for hashlib.name(...) and hashlib.new(name, ...)
183 # 2 is for hashlib.name(...) and hashlib.new(name, ...)
198 expected = hashlib.new(algorithm_name, str(u'spam')).hexdigest()