From 35de9bbbabf0ffaed8d9b44d7e3950655c43245e Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 19 Feb 2019 04:12:16 -0800 Subject: [PATCH] Fix a misnamed test for lists. (GH-11933) (cherry picked from commit f522a57ec77921ee2e60bd4ccda3c8daa5a43e95) Co-authored-by: Serhiy Storchaka --- 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 ed63fda20c1b..40316de220fa 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): -- 2.47.3