mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	asyncio: Clean up formatting.
This commit is contained in:
		
							parent
							
								
									4c3c699e62
								
							
						
					
					
						commit
						9ba75db3c5
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		|  | @ -302,9 +302,7 @@ def set_exception(self, exception): | |||
|         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 | ||||
|  |  | |||
|  | @ -1115,6 +1115,7 @@ def coro(): | |||
| 
 | ||||
|     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 @@ def coro2(loop): | |||
|         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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum