diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-10-31 02:16:05 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-10-31 02:16:05 +0000 |
commit | dcee09d9204957ace381b1c3507259f718aa4907 (patch) | |
tree | bb1bee26c4b535f8e9dd75f25a1ef1a72735e880 /Lib/test/test_future.py | |
parent | 44a90c95ceb6d6348dd7f81db33287f09112118d (diff) | |
download | cpython-git-dcee09d9204957ace381b1c3507259f718aa4907.tar.gz |
make sure the parser flags and passed onto the compiler
This fixes "from __future__ import unicode_literals" in an exec statment
See #4225
Diffstat (limited to 'Lib/test/test_future.py')
-rw-r--r-- | Lib/test/test_future.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py index 1432e74900..81d0a3ed2a 100644 --- a/Lib/test/test_future.py +++ b/Lib/test/test_future.py @@ -106,6 +106,11 @@ class FutureTest(unittest.TestCase): test_support.unload("test.test_future5") from test import test_future5 + def test_unicode_literals_exec(self): + scope = {} + exec "from __future__ import unicode_literals; x = ''" in scope + self.assertTrue(isinstance(scope["x"], unicode)) + def test_main(): test_support.run_unittest(FutureTest) |