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
Gwenaël Samain
cython
Commits
8f47d370
Commit
8f47d370
authored
May 04, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests broken by removal of unreachable code
parent
f28f9a93
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
90 deletions
+96
-90
tests/errors/break_outside_loop.pyx
tests/errors/break_outside_loop.pyx
+8
-7
tests/errors/continue_outside_loop.pyx
tests/errors/continue_outside_loop.pyx
+8
-7
tests/errors/e_return.pyx
tests/errors/e_return.pyx
+4
-3
tests/errors/e_while.pyx
tests/errors/e_while.pyx
+3
-2
tests/errors/nogil.pyx
tests/errors/nogil.pyx
+63
-62
tests/errors/return_outside_function_T135.pyx
tests/errors/return_outside_function_T135.pyx
+10
-9
No files found.
tests/errors/break_outside_loop.pyx
View file @
8f47d370
# cython: remove_unreachable=False
# mode: error
break
...
...
@@ -27,11 +28,11 @@ def bool_result():
_ERRORS
=
u'''
3
:0: break statement not inside loop
6
:4: break statement not inside loop
9
:4: break statement not inside loop
1
2
:4: break statement not inside loop
1
7
:5: break statement not inside loop
2
1
:4: break statement not inside loop
2
3
:4: break statement not inside loop
4
:0: break statement not inside loop
7
:4: break statement not inside loop
10
:4: break statement not inside loop
1
3
:4: break statement not inside loop
1
8
:5: break statement not inside loop
2
2
:4: break statement not inside loop
2
4
:4: break statement not inside loop
'''
tests/errors/continue_outside_loop.pyx
View file @
8f47d370
# cython: remove_unreachable=False
# mode: error
continue
...
...
@@ -26,11 +27,11 @@ def bool_result():
return
True
_ERRORS
=
u'''
3
:0: continue statement not inside loop
6
:4: continue statement not inside loop
9
:4: continue statement not inside loop
1
2
:4: continue statement not inside loop
1
7
:5: continue statement not inside loop
2
1
:4: continue statement not inside loop
2
3
:4: continue statement not inside loop
4
:0: continue statement not inside loop
7
:4: continue statement not inside loop
10
:4: continue statement not inside loop
1
3
:4: continue statement not inside loop
1
8
:5: continue statement not inside loop
2
2
:4: continue statement not inside loop
2
4
:4: continue statement not inside loop
'''
tests/errors/e_return.pyx
View file @
8f47d370
# cython: remove_unreachable=False
# mode: error
cdef
void
g
():
...
...
@@ -9,7 +10,7 @@ cdef int h():
return
# error
return
p
# error
_ERRORS
=
u"""
5
:17: Return with value in void function
9
:1: Return value required
1
0
:17: Cannot assign type 'int *' to 'int'
6
:17: Return with value in void function
10
:1: Return value required
1
1
:17: Cannot assign type 'int *' to 'int'
"""
tests/errors/e_while.pyx
View file @
8f47d370
# cython: remove_unreachable=False
# mode: error
def
f
(
a
,
b
):
...
...
@@ -5,6 +6,6 @@ def f(a, b):
break
# error
continue
# error
_ERRORS
=
u"""
5
:1: break statement not inside loop
6
:1: continue statement not inside loop
6
:1: break statement not inside loop
7
:1: continue statement not inside loop
"""
tests/errors/nogil.pyx
View file @
8f47d370
# cython: remove_unreachable=False
# mode: error
cdef
object
f
(
object
x
)
nogil
:
...
...
@@ -92,71 +93,71 @@ def bare_pyvar_name(object x):
# except these: 29, 34, 44, 56, 58, 60, 62-64
_ERRORS
=
u"""
3:5: Function with Python return type cannot be declared nogil
6:5: Function declared nogil has Python locals or temporaries
8:6: Assignment of Python object not allowed without gil
11:5: Discarding owned Python object not allowed without gil
13:5: Function with Python return type cannot be declared nogil
17:5: Calling gil-requiring function not allowed without gil
26:9: Calling gil-requiring function not allowed without gil
28:12: Assignment of Python object not allowed without gil
30:8: Discarding owned Python object not allowed without gil
30:16: Constructing complex number not allowed without gil
32:8: Backquote expression not allowed without gil
32:8: Discarding owned Python object not allowed without gil
32:9: Operation not allowed without gil
33:15: Assignment of Python object not allowed without gil
33:15: Operation not allowed without gil
33:15: Python import not allowed without gil
34:8: Operation not allowed without gil
34:13: Python import not allowed without gil
34:25: Constructing Python list not allowed without gil
34:25: Operation not allowed without gil
35:17: Iterating over Python object not allowed without gil
37:11: Discarding owned Python object not allowed without gil
37:11: Indexing Python object not allowed without gil
4:5: Function with Python return type cannot be declared nogil
7:5: Function declared nogil has Python locals or temporaries
9:6: Assignment of Python object not allowed without gil
12:5: Discarding owned Python object not allowed without gil
14:5: Function with Python return type cannot be declared nogil
18:5: Calling gil-requiring function not allowed without gil
27:9: Calling gil-requiring function not allowed without gil
29:12: Assignment of Python object not allowed without gil
31:8: Discarding owned Python object not allowed without gil
31:16: Constructing complex number not allowed without gil
33:8: Backquote expression not allowed without gil
33:8: Discarding owned Python object not allowed without gil
33:9: Operation not allowed without gil
34:15: Assignment of Python object not allowed without gil
34:15: Operation not allowed without gil
34:15: Python import not allowed without gil
35:8: Operation not allowed without gil
35:13: Python import not allowed without gil
35:25: Constructing Python list not allowed without gil
35:25: Operation not allowed without gil
36:17: Iterating over Python object not allowed without gil
38:11: Discarding owned Python object not allowed without gil
38:11: Slicing Python object not allowed without gil
39:11: Constructing Python slice object not allowed without gil
38:11: Indexing Python object not allowed without gil
39:11: Discarding owned Python object not allowed without gil
39:11: Indexing Python object not allowed without gil
39:13: Converting to Python object not allowed without gil
39:15: Converting to Python object not allowed without gil
39:17: Converting to Python object not allowed without gil
40:11: Accessing Python attribute not allowed without gil
39:11: Slicing Python object not allowed without gil
40:11: Constructing Python slice object not allowed without gil
40:11: Discarding owned Python object not allowed without gil
41:9: Constructing Python tuple not allowed without gil
41:9: Discarding owned Python object not allowed without gil
42:8: Constructing Python list not allowed without gil
42:8: Discarding owned Python object not allowed without gil
43:8: Constructing Python dict not allowed without gil
40:11: Indexing Python object not allowed without gil
40:13: Converting to Python object not allowed without gil
40:15: Converting to Python object not allowed without gil
40:17: Converting to Python object not allowed without gil
41:11: Accessing Python attribute not allowed without gil
41:11: Discarding owned Python object not allowed without gil
42:9: Constructing Python tuple not allowed without gil
42:9: Discarding owned Python object not allowed without gil
43:8: Constructing Python list not allowed without gil
43:8: Discarding owned Python object not allowed without gil
44:12: Discarding owned Python object not allowed without gil
44:12: Truth-testing Python object not allowed without gil
45:13: Python type test not allowed without gil
47:10: Discarding owned Python object not allowed without gil
47:10: Operation not allowed without gil
48:8: Discarding owned Python object not allowed without gil
48:8: Operation not allowed without gil
49:10: Assignment of Python object not allowed without gil
49:14: Assignment of Python object not allowed without gil
50:9: Assignment of Python object not allowed without gil
50:13: Assignment of Python object not allowed without gil
50:16: Creating temporary Python reference not allowed without gil
50:19: Creating temporary Python reference not allowed without gil
51:11: Assignment of Python object not allowed without gil
51:11: Indexing Python object not allowed without gil
52:11: Accessing Python attribute not allowed without gil
44:8: Constructing Python dict not allowed without gil
44:8: Discarding owned Python object not allowed without gil
45:12: Discarding owned Python object not allowed without gil
45:12: Truth-testing Python object not allowed without gil
46:13: Python type test not allowed without gil
48:10: Discarding owned Python object not allowed without gil
48:10: Operation not allowed without gil
49:8: Discarding owned Python object not allowed without gil
49:8: Operation not allowed without gil
50:10: Assignment of Python object not allowed without gil
50:14: Assignment of Python object not allowed without gil
51:9: Assignment of Python object not allowed without gil
51:13: Assignment of Python object not allowed without gil
51:16: Creating temporary Python reference not allowed without gil
51:19: Creating temporary Python reference not allowed without gil
52:11: Assignment of Python object not allowed without gil
53:8: Constructing Python tuple not allowed without gil
53:8: Python print statement not allowed without gil
54:8: Deleting Python object not allowed without gil
55:8: Returning Python object not allowed without gil
56:8: Raising exception not allowed without gil
57:14: Truth-testing Python object not allowed without gil
59:17: Truth-testing Python object not allowed without gil
61:8: For-loop using object bounds or target not allowed without gil
63:8: Try-except statement not allowed without gil
67:8: Try-finally statement not allowed without gil
84:8: For-loop using object bounds or target not allowed without gil
52:11: Indexing Python object not allowed without gil
53:11: Accessing Python attribute not allowed without gil
53:11: Assignment of Python object not allowed without gil
54:8: Constructing Python tuple not allowed without gil
54:8: Python print statement not allowed without gil
55:8: Deleting Python object not allowed without gil
56:8: Returning Python object not allowed without gil
57:8: Raising exception not allowed without gil
58:14: Truth-testing Python object not allowed without gil
60:17: Truth-testing Python object not allowed without gil
62:8: For-loop using object bounds or target not allowed without gil
64:8: Try-except statement not allowed without gil
68:8: Try-finally statement not allowed without gil
85:8: For-loop using object bounds or target not allowed without gil
"""
tests/errors/return_outside_function_T135.pyx
View file @
8f47d370
# cython: remove_unreachable=False
# ticket: 135
# mode: error
...
...
@@ -31,13 +32,13 @@ else:
_ERRORS
=
u'''
7
:0: Return not inside a function body
1
0
:4: Return not inside a function body
1
3
:4: Return not inside a function body
1
5
:5: Return not inside a function body
1
8
:5: Return not inside a function body
2
2
:4: Return not inside a function body
2
5
:4: Return not inside a function body
2
8
:4: Return not inside a function body
3
0
:4: Return not inside a function body
8
:0: Return not inside a function body
1
1
:4: Return not inside a function body
1
4
:4: Return not inside a function body
1
6
:5: Return not inside a function body
1
9
:5: Return not inside a function body
2
3
:4: Return not inside a function body
2
6
:4: Return not inside a function body
2
9
:4: Return not inside a function body
3
1
:4: Return not inside a function body
'''
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