Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
bfd2dc74
Commit
bfd2dc74
authored
Oct 17, 2009
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Protect against attempts to replace PyNumber_Add with PyNumber_InPlaceAdd in builtin sum
parent
a0e0f9ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Lib/test/test_builtin.py
Lib/test/test_builtin.py
+4
-0
No files found.
Lib/test/test_builtin.py
View file @
bfd2dc74
...
...
@@ -1286,6 +1286,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
(()))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment