summaryrefslogtreecommitdiffstats
path: root/Lib/test/leakers/test_gestalt.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-02-28 19:02:05 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-02-28 19:02:05 (GMT)
commitedc8f1366af2d32882649647a7a79873a6cb9503 (patch)
treeaa51d64976c2f4f987fe7b631e1cc1a47e1fce70 /Lib/test/leakers/test_gestalt.py
parent99b4ee637322a9e3705a316008f9fc68eefceb02 (diff)
downloadcpython-edc8f1366af2d32882649647a7a79873a6cb9503.zip
cpython-edc8f1366af2d32882649647a7a79873a6cb9503.tar.gz
cpython-edc8f1366af2d32882649647a7a79873a6cb9503.tar.bz2
Add directory which contains known ref leaks. Some of these are likely to be system dependent (like test_gestalt).
Diffstat (limited to 'Lib/test/leakers/test_gestalt.py')
-rw-r--r--Lib/test/leakers/test_gestalt.py15
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