Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
b48cf655
Commit
b48cf655
authored
6 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests in Py2.
parent
2c823b74
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
tests/run/addop.pyx
tests/run/addop.pyx
+5
-2
tests/run/subop.pyx
tests/run/subop.pyx
+10
-4
No files found.
tests/run/addop.pyx
View file @
b48cf655
...
@@ -176,7 +176,10 @@ def add0(x):
...
@@ -176,7 +176,10 @@ def add0(x):
(1, 1)
(1, 1)
>>> add0(-1)
>>> add0(-1)
(-1, -1)
(-1, -1)
>>> add0(2**32)
>>> a, b = add0(2**32)
(4294967296, 4294967296)
>>> bigint(a)
4294967296
>>> bigint(b)
4294967296
"""
"""
return
x
+
0
,
0
+
x
return
x
+
0
,
0
+
x
This diff is collapsed.
Click to expand it.
tests/run/subop.pyx
View file @
b48cf655
...
@@ -203,9 +203,15 @@ def sub0(x):
...
@@ -203,9 +203,15 @@ def sub0(x):
(-1, 1)
(-1, 1)
>>> sub0(99)
>>> sub0(99)
(99, -99)
(99, -99)
>>> sub0(2**32)
>>> a, b = sub0(2**32)
(4294967296, -4294967296)
>>> bigint(a)
>>> sub0(-2**32)
4294967296
(-4294967296, 4294967296)
>>> bigint(b)
-4294967296
>>> a, b = sub0(-2**32)
>>> bigint(a)
-4294967296
>>> bigint(b)
4294967296
"""
"""
return
x
-
0
,
0
-
x
return
x
-
0
,
0
-
x
This diff is collapsed.
Click to expand it.
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