Merged revisions 78528 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78528 | gregory.p.smith | 2010-02-28 18:01:47 -0800 (Sun, 28 Feb 2010) | 2 lines

  Adds the hashlib.algorithms attribute.  See issue7418.
........
This commit is contained in:
Gregory P. Smith 2010-03-01 02:05:26 +00:00
parent a59c59f946
commit 86508cc88b
3 changed files with 17 additions and 1 deletions

View file

@ -102,6 +102,11 @@ class HashLibTestCase(unittest.TestCase):
c = cons(a)
c.hexdigest()
def test_algorithms_attribute(self):
self.assertEqual(hashlib.algorithms,
tuple(_algo for _algo in self.supported_hash_names
if _algo.islower()))
def test_unknown_hash(self):
try:
hashlib.new('spam spam spam spam spam')