From 9ba75db3c5d12c8d03bccc41f27dd9c6134cfe3b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 19 Dec 2013 13:49:32 -0800 Subject: asyncio: Clean up formatting. --- Lib/asyncio/futures.py | 4 +--- Lib/test/test_asyncio/test_tasks.py | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py index 1be3117..0188f52 100644 --- a/Lib/asyncio/futures.py +++ b/Lib/asyncio/futures.py @@ -302,9 +302,7 @@ class Future: self._schedule_callbacks() if _PY34: self._traceback = traceback.format_exception( - exception.__class__, - exception, - exception.__traceback__) + exception.__class__, exception, exception.__traceback__) else: self._tb_logger = _TracebackLogger(exception) # Arrange for the logger to be activated after all callbacks diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py index e303f50..79a25d2 100644 --- a/Lib/test/test_asyncio/test_tasks.py +++ b/Lib/test/test_asyncio/test_tasks.py @@ -1115,6 +1115,7 @@ class TaskTests(unittest.TestCase): def test_current_task(self): self.assertIsNone(tasks.Task.current_task(loop=self.loop)) + @tasks.coroutine def coro(loop): self.assertTrue(tasks.Task.current_task(loop=loop) is task) @@ -1146,7 +1147,8 @@ class TaskTests(unittest.TestCase): task1 = tasks.Task(coro1(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)) # Some thorough tests for cancellation propagation through -- cgit v0.12