diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-10-17 21:48:16 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-10-17 21:48:16 (GMT) |
commit | 3a22b476a39f648b845111699c4724963f5379a9 (patch) | |
tree | bfd8b9640c2bf36b6203a37bc759072aa7f493ed /Lib | |
parent | d412ab5260b9fda3c840c87f9e277b7f680ebf73 (diff) | |
download | cpython-3a22b476a39f648b845111699c4724963f5379a9.zip cpython-3a22b476a39f648b845111699c4724963f5379a9.tar.gz cpython-3a22b476a39f648b845111699c4724963f5379a9.tar.bz2 |
Merged revisions 75470 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75470 | mark.dickinson | 2009-10-17 22:46:32 +0100 (Sat, 17 Oct 2009) | 1 line
Protect against attempts to replace PyNumber_Add with PyNumber_InPlaceAdd in builtin sum
........
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_builtin.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index cac4555..b3ae319 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -1151,6 +1151,10 @@ class BuiltinTest(unittest.TestCase): raise ValueError self.assertRaises(ValueError, sum, BadSeq()) + empty = [] + sum(([x] for x in range(10)), empty) + self.assertEqual(empty, []) + def test_type(self): self.assertEqual(type(''), type('123')) self.assertNotEqual(type(''), type(())) |