mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Fix a misnamed test for lists. (GH-11933)
This commit is contained in:
parent
8d01eb49fc
commit
f522a57ec7
1 changed files with 7 additions and 1 deletions
|
@ -31,9 +31,15 @@ class CommonTest(seq_tests.CommonTest):
|
||||||
self.assertEqual(a, b)
|
self.assertEqual(a, b)
|
||||||
|
|
||||||
def test_getitem_error(self):
|
def test_getitem_error(self):
|
||||||
|
a = []
|
||||||
msg = "list indices must be integers or slices"
|
msg = "list indices must be integers or slices"
|
||||||
with self.assertRaisesRegex(TypeError, msg):
|
with self.assertRaisesRegex(TypeError, msg):
|
||||||
|
a['a']
|
||||||
|
|
||||||
|
def test_setitem_error(self):
|
||||||
a = []
|
a = []
|
||||||
|
msg = "list indices must be integers or slices"
|
||||||
|
with self.assertRaisesRegex(TypeError, msg):
|
||||||
a['a'] = "python"
|
a['a'] = "python"
|
||||||
|
|
||||||
def test_repr(self):
|
def test_repr(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue