mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	bpo-32710: test_asyncio: test_sendfile reset policy (GH-11461)
test_asyncio/test_sendfile.py now resets the event loop policy using tearDownModule() as done in other tests, to prevent a warning when running tests on Windows.
This commit is contained in:
		
							parent
							
								
									2d53bed79c
								
							
						
					
					
						commit
						df8e1fb4e3
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		|  | @ -18,6 +18,10 @@ | |||
|     ssl = None | ||||
| 
 | ||||
| 
 | ||||
| def tearDownModule(): | ||||
|     asyncio.set_event_loop_policy(None) | ||||
| 
 | ||||
| 
 | ||||
| class MySendfileProto(asyncio.Protocol): | ||||
| 
 | ||||
|     def __init__(self, loop=None, close_after=0): | ||||
|  |  | |||
|  | @ -0,0 +1,3 @@ | |||
| ``test_asyncio/test_sendfile.py`` now resets the event loop policy using | ||||
| :func:`tearDownModule` as done in other tests, to prevent a warning when | ||||
| running tests on Windows. | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner