summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_hashlib.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2010-03-01 02:05:26 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2010-03-01 02:05:26 (GMT)
commit86508cc88bc00e3891d8efe4fbb79cacd40c9b69 (patch)
tree7d043cca2d8d5e67b693d51808dcd37f3db369a0 /Lib/test/test_hashlib.py
parenta59c59f9460ddc9c9a54965414c60be50ee5873b (diff)
downloadcpython-86508cc88bc00e3891d8efe4fbb79cacd40c9b69.zip
cpython-86508cc88bc00e3891d8efe4fbb79cacd40c9b69.tar.gz
cpython-86508cc88bc00e3891d8efe4fbb79cacd40c9b69.tar.bz2
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.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py
index 7d58da9..e1a1bd3 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')