summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2012-07-21 21:20:44 -0700
committerGregory P. Smith <greg@krypto.org>2012-07-21 21:20:44 -0700
commit34fcafde168edf5ca0b8c76a732e8850d97ea00e (patch)
tree897829df22c4342c40782cd0ef1938278cfdb41d /Lib/test
parent45ccf032beb03aab5e35b1ae6b1c38252506fde0 (diff)
parent76c28f7ce27ea48254e152032d25ded3117973cb (diff)
downloadcpython-git-34fcafde168edf5ca0b8c76a732e8850d97ea00e.tar.gz
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')
-rw-r--r--Lib/test/test_hashlib.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py
index d2ef9d1f3f..32f85e9b48 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: