Kaydet (Commit) 3a3dc17f authored tarafından Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

Port tests from Issue #15219, and verify we don't have a reference leak.

üst c92448be
......@@ -113,12 +113,8 @@ class HashLibTestCase(unittest.TestCase):
issubset(hashlib.algorithms_available))
def test_unknown_hash(self):
try:
hashlib.new('spam spam spam spam spam')
except ValueError:
pass
else:
self.assertTrue(0 == "hashlib didn't reject bogus hash name")
self.assertRaises(ValueError, hashlib.new, 'spam spam spam spam spam')
self.assertRaises(TypeError, hashlib.new, 1)
def test_get_builtin_constructor(self):
get_builtin_constructor = hashlib.__dict__[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment