From: Guido van Rossum Date: Thu, 19 Dec 2013 21:49:32 +0000 (-0800) Subject: asyncio: Clean up formatting. X-Git-Tag: v3.4.0b2~164 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ba75db3c5d12c8d03bccc41f27dd9c6134cfe3b;p=thirdparty%2FPython%2Fcpython.git asyncio: Clean up formatting. --- diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py index 1be3117ebbe6..0188f52d2156 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 e303f505df2c..79a25d298fc8 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