Consistently raise a TypeError when a non str is passed to hashlib.new

regardless of which of the two implementations of new is used.
This commit is contained in:
Gregory P. Smith 2012-07-21 21:22:16 -07:00
parent e4220a5ec6
commit b9e9e0d5a8
2 changed files with 2 additions and 1 deletions

View file

@ -128,6 +128,7 @@ class HashLibTestCase(unittest.TestCase):
sys.modules['_md5'] = _md5
else:
del sys.modules['_md5']
self.assertRaises(TypeError, get_builtin_constructor, 3)
def test_hexdigest(self):
for name in self.supported_hash_names: