PageRenderTime 624ms CodeModel.GetById 342ms app.highlight 1ms RepoModel.GetById 280ms app.codeStats 1ms

/Lib/test/leakers/test_gestalt.py

http://unladen-swallow.googlecode.com/
Python | 14 lines | 10 code | 3 blank | 1 comment | 1 complexity | b4286f208efc1647dd826c025ceaf0ae MD5 | raw file
 1import sys
 2
 3if sys.platform != 'darwin':
 4    raise ValueError, "This test only leaks on Mac OS X"
 5
 6def leak():
 7    # taken from platform._mac_ver_lookup()
 8    from gestalt import gestalt
 9    import MacOS
10
11    try:
12        gestalt('sysu')
13    except MacOS.Error:
14        pass