mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-46927: Include the type's name in the error message for subscripting non-generic types (GH-31694)
This commit is contained in:
parent
2031149b9a
commit
ab9301a28f
4 changed files with 8 additions and 3 deletions
|
@ -11,7 +11,7 @@ class TestExceptionGroupTypeHierarchy(unittest.TestCase):
|
|||
self.assertTrue(issubclass(BaseExceptionGroup, BaseException))
|
||||
|
||||
def test_exception_is_not_generic_type(self):
|
||||
with self.assertRaises(TypeError):
|
||||
with self.assertRaisesRegex(TypeError, 'Exception'):
|
||||
Exception[OSError]
|
||||
|
||||
def test_exception_group_is_generic_type(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue