summaryrefslogtreecommitdiffstats
path: root/Lib/test/leakers/test_gestalt.py
blob: f947fc516f10a93dfe2a39be95104129590289de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

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