mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Clean up ResourceWarnings. Explictly close stdout from the subprocess.
This commit is contained in:
		
							parent
							
								
									21ebbb7d39
								
							
						
					
					
						commit
						b68928bea7
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -445,6 +445,7 @@ def joiningfunc(mainthread): | |||
|         p = subprocess.Popen([sys.executable, "-c", script], stdout=subprocess.PIPE) | ||||
|         rc = p.wait() | ||||
|         data = p.stdout.read().decode().replace('\r', '') | ||||
|         p.stdout.close() | ||||
|         self.assertEqual(data, "end of main\nend of thread\n") | ||||
|         self.assertFalse(rc == 2, "interpreter was blocked") | ||||
|         self.assertTrue(rc == 0, "Unexpected error") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brian Curtin
						Brian Curtin