We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d01eb4 commit f522a57Copy full SHA for f522a57
Lib/test/list_tests.py
@@ -31,9 +31,15 @@ def test_init(self):
31
self.assertEqual(a, b)
32
33
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
41
msg = "list indices must be integers or slices"
42
with self.assertRaisesRegex(TypeError, msg):
- a = []
43
a['a'] = "python"
44
45
def test_repr(self):
0 commit comments