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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
3d4f1abd
Commit
3d4f1abd
authored
May 17, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extended test cases
parent
967f8db2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
tests/run/all.pyx
tests/run/all.pyx
+19
-0
tests/run/any.pyx
tests/run/any.pyx
+19
-0
No files found.
tests/run/all.pyx
View file @
3d4f1abd
...
...
@@ -114,6 +114,25 @@ def all_in_conditional_gen(seq):
"""
return
all
(
x
%
3
for
x
in
seq
if
x
%
2
==
1
)
mixed_ustring
=
u'AbcDefGhIjKlmnoP'
lower_ustring
=
mixed_ustring
.
lower
()
upper_ustring
=
mixed_ustring
.
upper
()
@
cython
.
test_assert_path_exists
(
'//PythonCapiCallNode'
,
'//ForFromStatNode'
)
@
cython
.
test_fail_if_path_exists
(
'//SimpleCallNode'
,
'//ForInStatNode'
)
def
all_lower_case_characters
(
unicode
ustring
):
"""
>>> all_lower_case_characters(mixed_ustring)
False
>>> all_lower_case_characters(upper_ustring)
False
>>> all_lower_case_characters(lower_ustring)
True
"""
return
all
(
uchar
.
islower
()
for
uchar
in
ustring
)
@
cython
.
test_assert_path_exists
(
"//ForInStatNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
,
"//YieldExprNode"
,
...
...
tests/run/any.pyx
View file @
3d4f1abd
...
...
@@ -108,6 +108,25 @@ def any_in_conditional_gen(seq):
"""
return
any
(
x
%
3
for
x
in
seq
if
x
%
2
==
1
)
mixed_ustring
=
u'AbcDefGhIjKlmnoP'
lower_ustring
=
mixed_ustring
.
lower
()
upper_ustring
=
mixed_ustring
.
upper
()
@
cython
.
test_assert_path_exists
(
'//PythonCapiCallNode'
,
'//ForFromStatNode'
)
@
cython
.
test_fail_if_path_exists
(
'//SimpleCallNode'
,
'//ForInStatNode'
)
def
any_lower_case_characters
(
unicode
ustring
):
"""
>>> any_lower_case_characters(upper_ustring)
False
>>> any_lower_case_characters(mixed_ustring)
True
>>> any_lower_case_characters(lower_ustring)
True
"""
return
any
(
uchar
.
islower
()
for
uchar
in
ustring
)
@
cython
.
test_assert_path_exists
(
"//ForInStatNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
,
"//YieldExprNode"
,
...
...
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