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
e3d06a43
Commit
e3d06a43
authored
Nov 17, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for crash described in GH #1999.
Closes #1999.
parent
ccabba0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
tests/run/test_coroutines_pep492.pyx
tests/run/test_coroutines_pep492.pyx
+25
-0
No files found.
tests/run/test_coroutines_pep492.pyx
View file @
e3d06a43
...
...
@@ -2464,6 +2464,31 @@ class CoroAsyncIOCompatTest(unittest.TestCase):
self.assertEqual(buffer, [1, 2, 'MyException'])
def test_asyncio_cython_crash_gh1999(self):
async def await_future(loop):
fut = loop.create_future()
loop.call_later(1, lambda: fut.set_result(1))
await fut
async def delegate_to_await_future(loop):
await await_future(loop)
ns = {}
__builtins__.exec("""
async def call(loop, await_func): # requires Py3.5+
await await_func(loop)
""".strip(), ns, ns)
call = ns['call']
import asyncio
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
loop.run_until_complete(call(loop, delegate_to_await_future))
finally:
loop.close()
asyncio.set_event_loop(None)
class SysSetCoroWrapperTest(unittest.TestCase):
...
...
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