diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-03-22 12:19:50 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-03-22 12:19:50 (GMT) |
commit | 98ba7534322696250267438053fb36cea5b0a85f (patch) | |
tree | 73c4d055f0f2f1d01cbce29adf606c337dc6068e /Lib/test/test_ast.py | |
parent | 96ad2619b208ce8452f8f6bd5127f32e2b097d2c (diff) | |
parent | a4e4e35783d26151be19253ff6dd1c3ec2ca7efa (diff) | |
download | cpython-98ba7534322696250267438053fb36cea5b0a85f.zip cpython-98ba7534322696250267438053fb36cea5b0a85f.tar.gz cpython-98ba7534322696250267438053fb36cea5b0a85f.tar.bz2 |
merge 3.2 (#14378)
Diffstat (limited to 'Lib/test/test_ast.py')
-rw-r--r-- | Lib/test/test_ast.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index 064c669..3b9f10c 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -226,6 +226,12 @@ class AST_Tests(unittest.TestCase): im = ast.parse("from . import y").body[0] self.assertIsNone(im.module) + def test_non_interned_future_from_ast(self): + mod = ast.parse("from __future__ import division") + self.assertIsInstance(mod.body[0], ast.ImportFrom) + mod.body[0].module = " __future__ ".strip() + compile(mod, "<test>", "exec") + def test_base_classes(self): self.assertTrue(issubclass(ast.For, ast.stmt)) self.assertTrue(issubclass(ast.Name, ast.expr)) |