From f522a57ec77921ee2e60bd4ccda3c8daa5a43e95 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 19 Feb 2019 13:53:07 +0200 Subject: Fix a misnamed test for lists. (GH-11933) --- Lib/test/list_tests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py index ed63fda..40316de 100644 --- a/Lib/test/list_tests.py +++ b/Lib/test/list_tests.py @@ -31,9 +31,15 @@ class CommonTest(seq_tests.CommonTest): self.assertEqual(a, b) def test_getitem_error(self): + a = [] + msg = "list indices must be integers or slices" + with self.assertRaisesRegex(TypeError, msg): + a['a'] + + def test_setitem_error(self): + a = [] msg = "list indices must be integers or slices" with self.assertRaisesRegex(TypeError, msg): - a = [] a['a'] = "python" def test_repr(self): -- cgit v0.12