mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
	
		
			275 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
	
		
			275 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import sys
 | 
						|
 | 
						|
if sys.platform != 'darwin':
 | 
						|
    raise ValueError("This test only leaks on Mac OS X")
 | 
						|
 | 
						|
def leak():
 | 
						|
    # taken from platform._mac_ver_lookup()
 | 
						|
    from gestalt import gestalt
 | 
						|
    import MacOS
 | 
						|
 | 
						|
    try:
 | 
						|
        gestalt('sysu')
 | 
						|
    except MacOS.Error:
 | 
						|
        pass
 |