[Python-checkins] Fix a misnamed test for lists. (GH-11933)
Miss Islington (bot)
webhook-mailer at python.org
Tue Feb 19 07:12:20 EST 2019
https://github.com/python/cpython/commit/35de9bbbabf0ffaed8d9b44d7e3950655c43245e
commit: 35de9bbbabf0ffaed8d9b44d7e3950655c43245e
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-02-19T04:12:16-08:00
summary:
Fix a misnamed test for lists. (GH-11933)
(cherry picked from commit f522a57ec77921ee2e60bd4ccda3c8daa5a43e95)
Co-authored-by: Serhiy Storchaka <storchaka at gmail.com>
files:
M Lib/test/list_tests.py
diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py
index ed63fda20c1b..40316de220fa 100644
--- a/Lib/test/list_tests.py
+++ b/Lib/test/list_tests.py
@@ -31,9 +31,15 @@ def test_init(self):
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):
More information about the Python-checkins
mailing list