mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Issue #12650: fix failures on some buildbots, when a subprocess takes a long
time to spawn.
This commit is contained in:
		
							parent
							
								
									acaeff8f15
								
							
						
					
					
						commit
						72d161af51
					
				
					 1 changed files with 0 additions and 12 deletions
				
			
		| 
						 | 
					@ -1410,18 +1410,6 @@ def test_zombie_fast_process_del(self):
 | 
				
			||||||
        # check that p is in the active processes list
 | 
					        # check that p is in the active processes list
 | 
				
			||||||
        self.assertIn(ident, [id(o) for o in subprocess._active])
 | 
					        self.assertIn(ident, [id(o) for o in subprocess._active])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # sleep a little to let the process exit, and create a new Popen: this
 | 
					 | 
				
			||||||
        # should trigger the wait() of p
 | 
					 | 
				
			||||||
        time.sleep(1)
 | 
					 | 
				
			||||||
        with self.assertRaises(EnvironmentError) as c:
 | 
					 | 
				
			||||||
            with subprocess.Popen(['nonexisting_i_hope'],
 | 
					 | 
				
			||||||
                                  stdout=subprocess.PIPE,
 | 
					 | 
				
			||||||
                                  stderr=subprocess.PIPE) as proc:
 | 
					 | 
				
			||||||
                pass
 | 
					 | 
				
			||||||
        # p should have been wait()ed on, and removed from the _active list
 | 
					 | 
				
			||||||
        self.assertRaises(OSError, os.waitpid, pid, 0)
 | 
					 | 
				
			||||||
        self.assertNotIn(ident, [id(o) for o in subprocess._active])
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def test_leak_fast_process_del_killed(self):
 | 
					    def test_leak_fast_process_del_killed(self):
 | 
				
			||||||
        # Issue #12650: on Unix, if Popen.__del__() was called before the
 | 
					        # Issue #12650: on Unix, if Popen.__del__() was called before the
 | 
				
			||||||
        # process exited, and the process got killed by a signal, it would never
 | 
					        # process exited, and the process got killed by a signal, it would never
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue