From dbb718fa8775731666bb9cbc73662fadee41ea8f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 21 Sep 2001 19:22:34 +0000 Subject: Make these modules work when Python is compiled without Unicode support. --- Lib/test/test_grammar.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/test/test_grammar.py') 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 -- cgit v1.2.1