mirror of
				https://github.com/python/cpython.git
				synced 2025-10-27 03:34:32 +00:00 
			
		
		
		
	merge 1579808ef25b
This commit is contained in:
		
						commit
						58e317ba92
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -11,6 +11,7 @@ | |||
| import sysconfig | ||||
| import warnings | ||||
| import select | ||||
| import shutil | ||||
| try: | ||||
|     import gc | ||||
| except ImportError: | ||||
|  | @ -546,11 +547,12 @@ def test_no_leaking(self): | |||
|         else: | ||||
|             max_handles = 2050 # too much for (at least some) Windows setups | ||||
|         handles = [] | ||||
|         tmpdir = tempfile.mkdtemp() | ||||
|         try: | ||||
|             for i in range(max_handles): | ||||
|                 try: | ||||
|                     handles.append(os.open(support.TESTFN, | ||||
|                                            os.O_WRONLY | os.O_CREAT)) | ||||
|                     tmpfile = os.path.join(tmpdir, support.TESTFN) | ||||
|                     handles.append(os.open(tmpfile, os.O_WRONLY|os.O_CREAT)) | ||||
|                 except OSError as e: | ||||
|                     if e.errno != errno.EMFILE: | ||||
|                         raise | ||||
|  | @ -575,6 +577,7 @@ def test_no_leaking(self): | |||
|         finally: | ||||
|             for h in handles: | ||||
|                 os.close(h) | ||||
|             shutil.rmtree(tmpdir) | ||||
| 
 | ||||
|     def test_list2cmdline(self): | ||||
|         self.assertEqual(subprocess.list2cmdline(['a b c', 'd', 'e']), | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Gregory P. Smith
						Gregory P. Smith