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
Boxiang Sun
cython
Commits
99a724e1
Commit
99a724e1
authored
May 16, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
trunk merge
parents
7b52bdf6
bbfbddbc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+5
-4
runtests.py
runtests.py
+8
-5
No files found.
Cython/Compiler/Nodes.py
View file @
99a724e1
...
...
@@ -2986,15 +2986,16 @@ class ForInStatNode(LoopNode, StatNode):
else
:
step
=
args
[
2
]
if
isinstance
(
step
,
ExprNodes
.
UnaryMinusNode
)
and
isinstance
(
step
.
operand
,
ExprNodes
.
IntNode
):
step
=
ExprNodes
.
IntNode
(
pos
=
step
.
pos
,
value
=
-
int
(
step
.
operand
.
value
))
step
=
ExprNodes
.
IntNode
(
pos
=
step
.
pos
,
value
=
str
(
-
int
(
step
.
operand
.
value
,
0
)
))
if
isinstance
(
step
,
ExprNodes
.
IntNode
):
if
step
.
value
>
0
:
step_value
=
int
(
step
.
value
,
0
)
if
step_value
>
0
:
self
.
step
=
step
self
.
relation1
=
'<='
self
.
relation2
=
'<'
return
True
elif
step
.
value
<
0
:
self
.
step
=
ExprNodes
.
IntNode
(
pos
=
step
.
pos
,
value
=
-
int
(
step
.
value
))
elif
step
_
value
<
0
:
self
.
step
=
ExprNodes
.
IntNode
(
pos
=
step
.
pos
,
value
=
str
(
-
step_
value
))
self
.
relation1
=
'>='
self
.
relation2
=
'>'
return
True
...
...
runtests.py
View file @
99a724e1
...
...
@@ -55,6 +55,12 @@ class TestBuilder(object):
return
suite
def
handle_directory
(
self
,
path
,
context
):
workdir
=
os
.
path
.
join
(
self
.
workdir
,
context
)
if
not
os
.
path
.
exists
(
workdir
):
os
.
makedirs
(
workdir
)
if
workdir
not
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
workdir
)
expect_errors
=
(
context
==
'errors'
)
suite
=
unittest
.
TestSuite
()
filenames
=
os
.
listdir
(
path
)
...
...
@@ -69,10 +75,10 @@ class TestBuilder(object):
continue
if
context
in
TEST_RUN_DIRS
:
test
=
CythonRunTestCase
(
path
,
self
.
workdir
,
module
,
self
.
annotate
)
path
,
workdir
,
module
,
self
.
annotate
)
else
:
test
=
CythonCompileTestCase
(
path
,
self
.
workdir
,
module
,
expect_errors
,
self
.
annotate
)
path
,
workdir
,
module
,
expect_errors
,
self
.
annotate
)
suite
.
addTest
(
test
)
return
suite
...
...
@@ -242,9 +248,6 @@ if __name__ == '__main__':
if
not
os
.
path
.
exists
(
WORKDIR
):
os
.
makedirs
(
WORKDIR
)
if
not
sys
.
path
or
sys
.
path
[
0
]
!=
WORKDIR
:
sys
.
path
.
insert
(
0
,
WORKDIR
)
if
WITH_CYTHON
:
from
Cython.Compiler.Version
import
version
from
Cython.Compiler.Main
import
\
...
...
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