summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-06-13 13:06:21 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-06-13 13:06:21 (GMT)
commitd1f5a59edb56b64336f07fc88cff6cbebed12dd6 (patch)
tree4486a70b3c41a35c4adb467c6d9a526bbe887c59 /Lib/test/test_compile.py
parent565e1b6bb724af71f439ec914b34f74e5163fe3d (diff)
downloadcpython-d1f5a59edb56b64336f07fc88cff6cbebed12dd6.zip
cpython-d1f5a59edb56b64336f07fc88cff6cbebed12dd6.tar.gz
cpython-d1f5a59edb56b64336f07fc88cff6cbebed12dd6.tar.bz2
allow importing from a module named None if it has an 'as' clause
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r--Lib/test/test_compile.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 4e15d8c..6ffd64a 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -281,6 +281,8 @@ if 1:
self.assertRaises(SyntaxError, compile, stmt, 'tmp', 'exec')
# This is ok.
compile("from None import x", "tmp", "exec")
+ compile("from x import None as y", "tmp", "exec")
+ compile("import None as x", "tmp", "exec")
def test_import(self):
succeed = [