commit | e6390a15033b9a93d345338d06b220542687b3fd | [log] [tgz] |
---|---|---|
author | Gregory P. Smith <greg@mad-scientist.com> | Mon Mar 01 02:01:47 2010 +0000 |
committer | Gregory P. Smith <greg@mad-scientist.com> | Mon Mar 01 02:01:47 2010 +0000 |
tree | 6105ab6804da46cd2e3ea0534a60425dea1c1bcb | |
parent | 9e5d1327f8a6f3a266b76118e0c660c7bcb12ce9 [diff] [blame] |
Adds the hashlib.algorithms attribute. See issue7418.
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py index 6ef5557..8710dd6 100644 --- a/Lib/test/test_hashlib.py +++ b/Lib/test/test_hashlib.py
@@ -102,6 +102,11 @@ 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')