mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	gh-76785: Consolidate Some Interpreter-related Testing Helpers (gh-117485)
This eliminates the duplication of functionally identical helpers in the _testinternalcapi and _xxsubinterpreters modules.
This commit is contained in:
		
							parent
							
								
									f341d6017d
								
							
						
					
					
						commit
						857d3151c9
					
				
					 10 changed files with 527 additions and 313 deletions
				
			
		|  | @ -656,7 +656,7 @@ def test_magic_number(self): | |||
| class IncompatibleExtensionModuleRestrictionsTests(unittest.TestCase): | ||||
| 
 | ||||
|     def run_with_own_gil(self, script): | ||||
|         interpid = _interpreters.create(isolated=True) | ||||
|         interpid = _interpreters.create('isolated') | ||||
|         def ensure_destroyed(): | ||||
|             try: | ||||
|                 _interpreters.destroy(interpid) | ||||
|  | @ -669,7 +669,7 @@ def ensure_destroyed(): | |||
|                 raise ImportError(excsnap.msg) | ||||
| 
 | ||||
|     def run_with_shared_gil(self, script): | ||||
|         interpid = _interpreters.create(isolated=False) | ||||
|         interpid = _interpreters.create('legacy') | ||||
|         def ensure_destroyed(): | ||||
|             try: | ||||
|                 _interpreters.destroy(interpid) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Eric Snow
						Eric Snow