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
64a214ab
Commit
64a214ab
authored
Jul 17, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test in Py<=2.5
parent
07567777
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
tests/run/contains_T455.pyx
tests/run/contains_T455.pyx
+10
-14
No files found.
tests/run/contains_T455.pyx
View file @
64a214ab
...
...
@@ -13,15 +13,13 @@ def in_sequence(x, seq):
>>> in_sequence(1, {1:None})
True
>>> in_sequence(1, None)
>>> in_sequence(1, None)
# doctest: +ELLIPSIS
Traceback (most recent call last):
...
TypeError: argument of type 'NoneType' is not iterable
TypeError: ...iterable...
>>> in_sequence(1, 1)
>>> in_sequence(1, 1)
# doctest: +ELLIPSIS
Traceback (most recent call last):
...
TypeError: argument of type 'int' is not iterable
TypeError: ...iterable...
"""
return
x
in
seq
...
...
@@ -40,15 +38,13 @@ def not_in_sequence(x, seq):
>>> not_in_sequence(1, {1:None})
False
>>> not_in_sequence(1, None)
>>> not_in_sequence(1, None)
# doctest: +ELLIPSIS
Traceback (most recent call last):
...
TypeError: argument of type 'NoneType' is not iterable
TypeError: ...iterable...
>>> not_in_sequence(1, 1)
>>> not_in_sequence(1, 1)
# doctest: +ELLIPSIS
Traceback (most recent call last):
...
TypeError: argument of type 'int' is not iterable
TypeError: ...iterable...
"""
return
x
not
in
seq
...
...
@@ -83,10 +79,10 @@ def not_in_dict(k, dict dct):
def
cascaded
(
a
,
b
,
c
):
"""
>>> cascaded(1, 2, 3)
>>> cascaded(1, 2, 3)
# doctest: +ELLIPSIS
Traceback (most recent call last):
...
TypeError:
argument of type 'int' is not iterable
TypeError:
...iterable...
>>> cascaded(-1, (1,2), (1,3))
True
>>> cascaded(1, (1,2), (1,3))
...
...
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