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
208a9bf8
Commit
208a9bf8
authored
Oct 17, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py2.4 test fixes
parent
03ea3932
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
tests/run/consts.pyx
tests/run/consts.pyx
+12
-12
No files found.
tests/run/consts.pyx
View file @
208a9bf8
...
@@ -133,18 +133,18 @@ def multiplied_lists_nonconst(x):
...
@@ -133,18 +133,18 @@ def multiplied_lists_nonconst(x):
>>> multiplied_lists_nonconst(0) == [1,2,3] * 0
>>> multiplied_lists_nonconst(0) == [1,2,3] * 0
True
True
>>> [1,2,3] * 'abc'
>>> [1,2,3] * 'abc'
# doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
TypeError: can't multiply sequence by non-int
of type 'str'
TypeError: can't multiply sequence by non-int
...
>>> multiplied_nonconst_tuple_arg('abc') # doctest: +ELLIPSIS
>>> multiplied_nonconst_tuple_arg('abc') # doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
TypeError: can't multiply sequence by non-int
of type 'str'
TypeError: can't multiply sequence by non-int
...
>>> [1,2,3] * 1.0
>>> [1,2,3] * 1.0
# doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
TypeError: can't multiply sequence by non-int
of type 'float'
TypeError: can't multiply sequence by non-int
...
>>> multiplied_nonconst_tuple_arg(1.0) # doctest: +ELLIPSIS
>>> multiplied_nonconst_tuple_arg(1.0) # doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
TypeError: can't multiply sequence by non-int
of type 'float'
TypeError: can't multiply sequence by non-int
...
"""
"""
return
[
1
,
2
,
3
]
*
x
return
[
1
,
2
,
3
]
*
x
...
@@ -209,18 +209,18 @@ def multiplied_nonconst_tuple_arg(x):
...
@@ -209,18 +209,18 @@ def multiplied_nonconst_tuple_arg(x):
>>> multiplied_nonconst_tuple_arg(0) == (1,2) * 0
>>> multiplied_nonconst_tuple_arg(0) == (1,2) * 0
True
True
>>> (1,2) * 'abc'
>>> (1,2) * 'abc'
# doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
TypeError: can't multiply sequence by non-int
of type 'str'
TypeError: can't multiply sequence by non-int
...
>>> multiplied_nonconst_tuple_arg('abc') # doctest: +ELLIPSIS
>>> multiplied_nonconst_tuple_arg('abc') # doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
TypeError: can't multiply sequence by non-int
of type 'str'
TypeError: can't multiply sequence by non-int
...
>>> (1,2) * 1.0
>>> (1,2) * 1.0
# doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
TypeError: can't multiply sequence by non-int
of type 'float'
TypeError: can't multiply sequence by non-int
...
>>> multiplied_nonconst_tuple_arg(1.0) # doctest: +ELLIPSIS
>>> multiplied_nonconst_tuple_arg(1.0) # doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
TypeError: can't multiply sequence by non-int
of type 'float'
TypeError: can't multiply sequence by non-int
...
"""
"""
return
(
1
,
2
)
*
x
return
(
1
,
2
)
*
x
...
...
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