diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2010-03-01 02:05:26 +0000 |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2010-03-01 02:05:26 +0000 |
commit | 246c9a0aef921d043ef63a246591618d92257601 (patch) | |
tree | 29915b63df0206aca60715b6f472609d70d222f4 /Lib/test/test_hashlib.py | |
parent | 7a1c9744967e947b4d8049bcb53b220ea0424fd6 (diff) | |
download | cpython-246c9a0aef921d043ef63a246591618d92257601.tar.gz |
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.
........
Diffstat (limited to 'Lib/test/test_hashlib.py')
-rw-r--r-- | Lib/test/test_hashlib.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py index 7d58da9f84..e1a1bd30bd 100644 --- a/Lib/test/test_hashlib.py +++ b/Lib/test/test_hashlib.py @@ -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') |