diff options
Diffstat (limited to 'Lib/test/test_tuple.py')
-rw-r--r-- | Lib/test/test_tuple.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_tuple.py b/Lib/test/test_tuple.py index 14c6430869..0b19ea4f79 100644 --- a/Lib/test/test_tuple.py +++ b/Lib/test/test_tuple.py @@ -6,6 +6,11 @@ import pickle class TupleTest(seq_tests.CommonTest): type2test = tuple + def test_getitem_error(self): + msg = "tuple indices must be integers or slices" + with self.assertRaisesRegex(TypeError, msg): + ()['a'] + def test_constructors(self): super().test_constructors() # calling built-in types without argument must return empty |