mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Adds the hashlib.algorithms attribute. See issue7418.
This commit is contained in:
parent
9e5d1327f8
commit
e6390a1503
3 changed files with 17 additions and 1 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue