From: Serhiy Storchaka Date: Tue, 19 Feb 2019 11:53:07 +0000 (+0200) Subject: Fix a misnamed test for lists. (GH-11933) X-Git-Tag: v3.8.0a2~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f522a57ec77921ee2e60bd4ccda3c8daa5a43e95;p=python Fix a misnamed test for lists. (GH-11933) --- diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py index ed63fda20c..40316de220 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):