diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2018-09-12 17:54:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 17:54:06 (GMT) |
commit | 9dfa0fe587eae3626ffc973680c6a17f35de3864 (patch) | |
tree | b9bcea3d12dd609b45aafd333d72a8c05f5d053b /Lib/test/test_builtin.py | |
parent | 0fb9fadd3b3e9e3698647e0b92d49b0b7aacd979 (diff) | |
download | cpython-9dfa0fe587eae3626ffc973680c6a17f35de3864.zip cpython-9dfa0fe587eae3626ffc973680c6a17f35de3864.tar.gz cpython-9dfa0fe587eae3626ffc973680c6a17f35de3864.tar.bz2 |
bpo-34637: Make the *start* argument for *sum()* visible as a keyword argument. (GH-9208)
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r-- | Lib/test/test_builtin.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 233c579..46cf2d3 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -1297,6 +1297,9 @@ class BuiltinTest(unittest.TestCase): self.assertEqual(sum(iter(Squares(10))), 285) self.assertEqual(sum([[1], [2], [3]], []), [1, 2, 3]) + self.assertEqual(sum(range(10), 1000), 1045) + self.assertEqual(sum(range(10), start=1000), 1045) + self.assertRaises(TypeError, sum) self.assertRaises(TypeError, sum, 42) self.assertRaises(TypeError, sum, ['a', 'b', 'c']) |