summaryrefslogtreecommitdiff
path: root/Lib/test/test_grammar.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r--Lib/test/test_grammar.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 254e006540..e5ba73e6d6 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -394,11 +394,15 @@ def f():
if z != 2: raise TestFailed, 'exec \'z=1+1\''
z = None
del z
+ import types
+ if hasattr(types, "UnicodeType"):
+ exec r"""if 1:
exec u'z=1+1\n'
if z != 2: raise TestFailed, 'exec u\'z=1+1\'\\n'
del z
exec u'z=1+1'
if z != 2: raise TestFailed, 'exec u\'z=1+1\''
+"""
f()
g = {}
exec 'z = 1' in g