prevent import statements from assigning to None
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 78215d2..4e15d8c 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -270,11 +270,17 @@
             '(a, None) = 0, 0',
             'for None in range(10): pass',
             'def f(None): pass',
+            'import None',
+            'import x as None',
+            'from x import None',
+            'from x import y as None'
         ]
         for stmt in stmts:
             stmt += "\n"
             self.assertRaises(SyntaxError, compile, stmt, 'tmp', 'single')
             self.assertRaises(SyntaxError, compile, stmt, 'tmp', 'exec')
+        # This is ok.
+        compile("from None import x", "tmp", "exec")
 
     def test_import(self):
         succeed = [