From f216c9427dc880f64bd38d7f0345f038a45d3123 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 31 Oct 2008 02:28:05 +0000 Subject: Merged revisions 67066 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r67066 | benjamin.peterson | 2008-10-30 21:16:05 -0500 (Thu, 30 Oct 2008) | 5 lines make sure the parser flags and passed onto the compiler This fixes "from __future__ import unicode_literals" in an exec statment See #4225 ........ --- Lib/test/test_future.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lib/test/test_future.py') diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py index 8846f6a8d19..1cede70eeb7 100644 --- a/Lib/test/test_future.py +++ b/Lib/test/test_future.py @@ -106,6 +106,11 @@ class FutureTest(unittest.TestCase): support.unload("test.test_future5") from test import test_future5 + def test_unicode_literals_exec(self): + scope = {} + exec("from __future__ import unicode_literals; x = ''", {}, scope) + self.assertTrue(isinstance(scope["x"], str)) + def test_main(): support.run_unittest(FutureTest) -- cgit v1.2.3