Fix a misnamed test for lists. (GH-11933)
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 @@
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['a']
+
+ def test_setitem_error(self):
+ a = []
+ msg = "list indices must be integers or slices"
+ with self.assertRaisesRegex(TypeError, msg):
a['a'] = "python"
def test_repr(self):