From e6390a15033b9a93d345338d06b220542687b3fd Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Mon, 1 Mar 2010 02:01:47 +0000 Subject: Adds the hashlib.algorithms attribute. See issue7418. --- Lib/test/test_hashlib.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lib/test/test_hashlib.py') diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py index 6ef55577f7..8710dd6121 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') -- cgit v1.2.1