diff options
Diffstat (limited to 'Lib/test/leakers/test_gestalt.py')
-rw-r--r-- | Lib/test/leakers/test_gestalt.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/leakers/test_gestalt.py b/Lib/test/leakers/test_gestalt.py new file mode 100644 index 0000000..f947fc5 --- /dev/null +++ b/Lib/test/leakers/test_gestalt.py @@ -0,0 +1,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 |