[Python-checkins] r55698 - python/branches/bcannon-objcap/tests/fail/builtin_SystemExit.py

brett.cannon python-checkins at python.org
Thu May 31 00:26:31 CEST 2007


Author: brett.cannon
Date: Thu May 31 00:26:30 2007
New Revision: 55698

Added:
   python/branches/bcannon-objcap/tests/fail/builtin_SystemExit.py   (contents, props changed)
Log:
Add an explicit test to make sure that SytemExit is missing.


Added: python/branches/bcannon-objcap/tests/fail/builtin_SystemExit.py
==============================================================================
--- (empty file)
+++ python/branches/bcannon-objcap/tests/fail/builtin_SystemExit.py	Thu May 31 00:26:30 2007
@@ -0,0 +1,23 @@
+"""SystemExit should not be exposed as it will trigger Py_Finalize() if it
+propagates to the top of the call chain."""
+try:
+    _ = SystemExit
+except NameError:
+    pass
+else:
+    raise Exception
+
+try:
+    import __builtin__
+    __builtin__.SystemExit
+except AttributeError:
+    pass
+else:
+    raise Exception
+
+try:
+    __builtins__.SystemExit
+except AttributeError:
+    pass
+else:
+    raise Exception


More information about the Python-checkins mailing list