diff options
author | Gregory P. Smith <greg@krypto.org> | 2012-07-22 04:20:44 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2012-07-22 04:20:44 (GMT) |
commit | 34fcafde168edf5ca0b8c76a732e8850d97ea00e (patch) | |
tree | 897829df22c4342c40782cd0ef1938278cfdb41d /Lib/test/test_hashlib.py | |
parent | 45ccf032beb03aab5e35b1ae6b1c38252506fde0 (diff) | |
parent | 76c28f7ce27ea48254e152032d25ded3117973cb (diff) | |
download | cpython-34fcafde168edf5ca0b8c76a732e8850d97ea00e.zip cpython-34fcafde168edf5ca0b8c76a732e8850d97ea00e.tar.gz cpython-34fcafde168edf5ca0b8c76a732e8850d97ea00e.tar.bz2 |
Consistently raise a TypeError when a non str is passed to hashlib.new
regardless of which of the two implementations of new is used.
Diffstat (limited to 'Lib/test/test_hashlib.py')
-rw-r--r-- | Lib/test/test_hashlib.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py index d2ef9d1..32f85e9 100644 --- a/Lib/test/test_hashlib.py +++ b/Lib/test/test_hashlib.py @@ -133,6 +133,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: |