summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-04-29 13:08:33 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-04-29 13:08:33 (GMT)
commit5c089314efb94d3ab4ddfea9c27d408e97ec3ff2 (patch)
tree7320d963eb87096ccf4897b033e0fc51cac81472 /Lib
parent91c2f37e216acbb3f3e8c6662999889d9f34ef0e (diff)
parent7d110042c5a2b27ffd0b3ae25dc7722f2f8bc5c5 (diff)
downloadcpython-5c089314efb94d3ab4ddfea9c27d408e97ec3ff2.zip
cpython-5c089314efb94d3ab4ddfea9c27d408e97ec3ff2.tar.gz
cpython-5c089314efb94d3ab4ddfea9c27d408e97ec3ff2.tar.bz2
merge 3.3
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_import.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index 470a6d2..8be66a1 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -324,6 +324,13 @@ class ImportTests(unittest.TestCase):
except ImportError:
self.fail("fromlist must allow bogus names")
+ @cpython_only
+ def test_delete_builtins_import(self):
+ args = ["-c", "del __builtins__.__import__; import os"]
+ popen = script_helper.spawn_python(*args)
+ stdout, stderr = popen.communicate()
+ self.assertIn(b"ImportError", stdout)
+
@skip_if_dont_write_bytecode
class FilePermissionTests(unittest.TestCase):