mirror of
https://github.com/python/cpython.git
synced 2025-12-20 23:51:24 +00:00
gh-136787: improve exception messages for invalid hash algorithms (#136802)
This commit is contained in:
parent
800d37feca
commit
6be49ee517
8 changed files with 198 additions and 48 deletions
|
|
@ -960,7 +960,7 @@ class PyModuleConstructorTestCase(ThroughModuleAPIMixin, PyConstructorBaseMixin,
|
|||
with self.assertRaisesRegex(RuntimeError, "custom exception"):
|
||||
func(b'key', b'msg', raiser)
|
||||
|
||||
with self.assertRaisesRegex(ValueError, 'hash type'):
|
||||
with self.assertRaisesRegex(ValueError, 'unsupported hash algorithm'):
|
||||
func(b'key', b'msg', 'unknown')
|
||||
|
||||
with self.assertRaisesRegex(AttributeError, 'new'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue