diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-02-19 11:53:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-19 11:53:07 (GMT) |
commit | f522a57ec77921ee2e60bd4ccda3c8daa5a43e95 (patch) | |
tree | 79bec82b533174a48a232cd198f83ea5b4457086 /Lib/test/list_tests.py | |
parent | 8d01eb49fc7ff914feeb2e2090d1d6ef15c932ab (diff) | |
download | cpython-f522a57ec77921ee2e60bd4ccda3c8daa5a43e95.zip cpython-f522a57ec77921ee2e60bd4ccda3c8daa5a43e95.tar.gz cpython-f522a57ec77921ee2e60bd4ccda3c8daa5a43e95.tar.bz2 |
Fix a misnamed test for lists. (GH-11933)
Diffstat (limited to 'Lib/test/list_tests.py')
-rw-r--r-- | Lib/test/list_tests.py | 8 |
1 files changed, 7 insertions, 1 deletions
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 @@ 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): |