Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e42cc386
Commit
e42cc386
authored
May 31, 2015
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue 24017: Add a test for CoroWrapper and 'async def' coroutines
parent
6a0fab92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
Lib/test/test_asyncio/test_pep492.py
Lib/test/test_asyncio/test_pep492.py
+14
-0
No files found.
Lib/test/test_asyncio/test_pep492.py
View file @
e42cc386
...
...
@@ -119,6 +119,20 @@ class CoroutineTests(BaseTest):
self
.
assertEqual
(
coro
.
send
(
None
),
'spam'
)
coro
.
close
()
def
test_async_ded_coroutines
(
self
):
async
def
bar
():
return
'spam'
async
def
foo
():
return
await
bar
()
# production mode
data
=
self
.
loop
.
run_until_complete
(
foo
())
self
.
assertEqual
(
data
,
'spam'
)
# debug mode
self
.
loop
.
set_debug
(
True
)
data
=
self
.
loop
.
run_until_complete
(
foo
())
self
.
assertEqual
(
data
,
'spam'
)
if
__name__
==
'__main__'
:
unittest
.
main
()
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