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
779eb749
Commit
779eb749
authored
May 23, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bad syntax tests for PEP 492
parent
5430b81e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
0 deletions
+86
-0
tests/errors/pep492_badsyntax_async1.pyx
tests/errors/pep492_badsyntax_async1.pyx
+10
-0
tests/errors/pep492_badsyntax_async2.pyx
tests/errors/pep492_badsyntax_async2.pyx
+11
-0
tests/errors/pep492_badsyntax_async3.pyx
tests/errors/pep492_badsyntax_async3.pyx
+9
-0
tests/errors/pep492_badsyntax_async4.pyx
tests/errors/pep492_badsyntax_async4.pyx
+9
-0
tests/errors/pep492_badsyntax_async5.pyx
tests/errors/pep492_badsyntax_async5.pyx
+9
-0
tests/errors/pep492_badsyntax_async6.pyx
tests/errors/pep492_badsyntax_async6.pyx
+10
-0
tests/errors/pep492_badsyntax_async7.pyx
tests/errors/pep492_badsyntax_async7.pyx
+10
-0
tests/errors/pep492_badsyntax_async8.pyx
tests/errors/pep492_badsyntax_async8.pyx
+9
-0
tests/errors/pep492_badsyntax_async9.pyx
tests/errors/pep492_badsyntax_async9.pyx
+9
-0
No files found.
tests/errors/pep492_badsyntax_async1.pyx
0 → 100644
View file @
779eb749
# mode: error
# tag: pep492, async
async
def
foo
():
def
foo
(
a
=
await
list
()):
pass
_ERRORS
=
"""
5:14: 'await' not supported here
"""
tests/errors/pep492_badsyntax_async2.pyx
0 → 100644
View file @
779eb749
# mode: error
# tag: pep492, async
async
def
foo
():
def
foo
(
a
:
await
list
()):
pass
_ERRORS
=
"""
5:14: 'await' not supported here
5:14: 'await' not supported here
"""
tests/errors/pep492_badsyntax_async3.pyx
0 → 100644
View file @
779eb749
# mode: error
# tag: pep492, async
async
def
foo
():
[
i
async
for
i
in
els
]
_ERRORS
=
"""
5:7: Expected ']', found 'async'
"""
tests/errors/pep492_badsyntax_async4.pyx
0 → 100644
View file @
779eb749
# mode: error
# tag: pep492, async
async
def
foo
():
async
def
foo
():
await
list
()
_ERRORS
=
"""
# ??? - this fails in CPython, not sure why ...
"""
tests/errors/pep492_badsyntax_async5.pyx
0 → 100644
View file @
779eb749
# mode: error
# tag: pep492, async
def
foo
():
await
list
()
_ERRORS
=
"""
5:10: Syntax error in simple statement list
"""
tests/errors/pep492_badsyntax_async6.pyx
0 → 100644
View file @
779eb749
# mode: error
# tag: pep492, async
async
def
foo
():
yield
_ERRORS
=
"""
5:4: 'yield' not allowed in async coroutines (use 'await')
5:4: 'yield' not supported here
"""
tests/errors/pep492_badsyntax_async7.pyx
0 → 100644
View file @
779eb749
# mode: error
# tag: pep492, async
async
def
foo
():
yield
from
[]
_ERRORS
=
"""
5:4: 'yield from' not supported here
5:4: 'yield' not allowed in async coroutines (use 'await')
"""
tests/errors/pep492_badsyntax_async8.pyx
0 → 100644
View file @
779eb749
# mode: error
# tag: pep492, async
async
def
foo
():
await
await
fut
_ERRORS
=
"""
5:10: Expected an identifier or literal
"""
tests/errors/pep492_badsyntax_async9.pyx
0 → 100644
View file @
779eb749
# mode: error
# tag: pep492, async
async
def
foo
():
await
_ERRORS
=
"""
5:9: Expected an identifier or literal
"""
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