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
e1e15520
Commit
e1e15520
authored
May 01, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix syntax in test for old Py3 versions
parent
0a56879d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
tests/run/constant_folding.py
tests/run/constant_folding.py
+0
-21
tests/run/constant_folding_cy.pyx
tests/run/constant_folding_cy.pyx
+21
-0
No files found.
tests/run/constant_folding.py
View file @
e1e15520
...
...
@@ -109,27 +109,6 @@ def binop_bool():
return
plus1
,
pmix1
,
minus1
,
and1
,
or1
,
ormix1
,
xor1
,
plus3
,
pmix3
,
minus3
,
and3
,
or3
,
ormix3
,
xor3
@
cython
.
test_fail_if_path_exists
(
"//ReturnStatNode//AddNode"
,
)
@
cython
.
test_assert_path_exists
(
"//ListNode//AddNode"
,
)
def
add_strings
():
"""
>>> u, b, rest = add_strings()
>>> u == 'abcdef' or u
True
>>> b == b'abcdef' or b
True
>>> rest
1
"""
a
=
[
"abc"
+
"def"
]
# not currently optimised
# FIXME: test encodings and unicode escapes
return
u"abc"
+
u"def"
,
b"abc"
+
b"def"
,
a
[
0
]
and
1
@
cython
.
test_fail_if_path_exists
(
"//SliceIndexNode"
,
)
...
...
tests/run/constant_folding_cy.pyx
View file @
e1e15520
...
...
@@ -98,3 +98,24 @@ def for_in_empty_setcomp():
0
"""
return
{
i
for
i
in
[]}
@
cython
.
test_fail_if_path_exists
(
"//ReturnStatNode//AddNode"
,
)
@
cython
.
test_assert_path_exists
(
"//ListNode//AddNode"
,
)
def
add_strings
():
"""
>>> u, b, rest = add_strings()
>>> u == 'abcdef' or u
True
>>> b == b'abcdef' or b
True
>>> rest
1
"""
a
=
[
"abc"
+
"def"
]
# not currently optimised
# FIXME: test encodings and unicode escapes
return
u"abc"
+
u"def"
,
b"abc"
+
b"def"
,
a
[
0
]
and
1
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