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
6934831e
Commit
6934831e
authored
Jan 23, 2018
by
Nathaniel J. Smith
Committed by
Andrew Svetlov
Jan 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-32633: Fix some warnings in test_asyncio.test_tasks (#5280)
parent
83c8675e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
Lib/test/test_asyncio/test_tasks.py
Lib/test/test_asyncio/test_tasks.py
+8
-2
No files found.
Lib/test/test_asyncio/test_tasks.py
View file @
6934831e
...
...
@@ -2342,7 +2342,8 @@ class SetMethodsTest:
await
asyncio
.
sleep
(
0.1
,
loop
=
self
.
loop
)
return
10
task
=
self
.
new_task
(
self
.
loop
,
foo
())
coro
=
foo
()
task
=
self
.
new_task
(
self
.
loop
,
coro
)
Future
.
set_result
(
task
,
'spam'
)
self
.
assertEqual
(
...
...
@@ -2355,6 +2356,8 @@ class SetMethodsTest:
r'step\
(
\): already done'
):
raise
exc
coro
.
close
()
def
test_set_exception_causes_invalid_state
(
self
):
class
MyExc
(
Exception
):
pass
...
...
@@ -2366,7 +2369,8 @@ class SetMethodsTest:
await
asyncio
.
sleep
(
0.1
,
loop
=
self
.
loop
)
return
10
task
=
self
.
new_task
(
self
.
loop
,
foo
())
coro
=
foo
()
task
=
self
.
new_task
(
self
.
loop
,
coro
)
Future
.
set_exception
(
task
,
MyExc
())
with
self
.
assertRaises
(
MyExc
):
...
...
@@ -2378,6 +2382,8 @@ class SetMethodsTest:
r'step\
(
\): already done'
):
raise
exc
coro
.
close
()
@
unittest
.
skipUnless
(
hasattr
(
futures
,
'_CFuture'
)
and
hasattr
(
tasks
,
'_CTask'
),
...
...
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