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
9ba75db3
Commit
9ba75db3
authored
Dec 19, 2013
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncio: Clean up formatting.
parent
4c3c699e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Lib/asyncio/futures.py
Lib/asyncio/futures.py
+1
-3
Lib/test/test_asyncio/test_tasks.py
Lib/test/test_asyncio/test_tasks.py
+3
-1
No files found.
Lib/asyncio/futures.py
View file @
9ba75db3
...
@@ -302,9 +302,7 @@ class Future:
...
@@ -302,9 +302,7 @@ class Future:
self
.
_schedule_callbacks
()
self
.
_schedule_callbacks
()
if
_PY34
:
if
_PY34
:
self
.
_traceback
=
traceback
.
format_exception
(
self
.
_traceback
=
traceback
.
format_exception
(
exception
.
__class__
,
exception
.
__class__
,
exception
,
exception
.
__traceback__
)
exception
,
exception
.
__traceback__
)
else
:
else
:
self
.
_tb_logger
=
_TracebackLogger
(
exception
)
self
.
_tb_logger
=
_TracebackLogger
(
exception
)
# Arrange for the logger to be activated after all callbacks
# Arrange for the logger to be activated after all callbacks
...
...
Lib/test/test_asyncio/test_tasks.py
View file @
9ba75db3
...
@@ -1115,6 +1115,7 @@ class TaskTests(unittest.TestCase):
...
@@ -1115,6 +1115,7 @@ class TaskTests(unittest.TestCase):
def
test_current_task
(
self
):
def
test_current_task
(
self
):
self
.
assertIsNone
(
tasks
.
Task
.
current_task
(
loop
=
self
.
loop
))
self
.
assertIsNone
(
tasks
.
Task
.
current_task
(
loop
=
self
.
loop
))
@
tasks
.
coroutine
@
tasks
.
coroutine
def
coro
(
loop
):
def
coro
(
loop
):
self
.
assertTrue
(
tasks
.
Task
.
current_task
(
loop
=
loop
)
is
task
)
self
.
assertTrue
(
tasks
.
Task
.
current_task
(
loop
=
loop
)
is
task
)
...
@@ -1146,7 +1147,8 @@ class TaskTests(unittest.TestCase):
...
@@ -1146,7 +1147,8 @@ class TaskTests(unittest.TestCase):
task1
=
tasks
.
Task
(
coro1
(
self
.
loop
),
loop
=
self
.
loop
)
task1
=
tasks
.
Task
(
coro1
(
self
.
loop
),
loop
=
self
.
loop
)
task2
=
tasks
.
Task
(
coro2
(
self
.
loop
),
loop
=
self
.
loop
)
task2
=
tasks
.
Task
(
coro2
(
self
.
loop
),
loop
=
self
.
loop
)
self
.
loop
.
run_until_complete
(
tasks
.
wait
((
task1
,
task2
),
loop
=
self
.
loop
))
self
.
loop
.
run_until_complete
(
tasks
.
wait
((
task1
,
task2
),
loop
=
self
.
loop
))
self
.
assertIsNone
(
tasks
.
Task
.
current_task
(
loop
=
self
.
loop
))
self
.
assertIsNone
(
tasks
.
Task
.
current_task
(
loop
=
self
.
loop
))
# Some thorough tests for cancellation propagation through
# Some thorough tests for cancellation propagation through
...
...
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