Skip to content

Commit f522a57

Browse files
Fix a misnamed test for lists. (pythonGH-11933)
1 parent 8d01eb4 commit f522a57

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Lib/test/list_tests.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@ def test_init(self):
3131
self.assertEqual(a, b)
3232

3333
def test_getitem_error(self):
34+
a = []
35+
msg = "list indices must be integers or slices"
36+
with self.assertRaisesRegex(TypeError, msg):
37+
a['a']
38+
39+
def test_setitem_error(self):
40+
a = []
3441
msg = "list indices must be integers or slices"
3542
with self.assertRaisesRegex(TypeError, msg):
36-
a = []
3743
a['a'] = "python"
3844

3945
def test_repr(self):

0 commit comments

Comments
 (0)