diff options
author | Guido van Rossum <guido@python.org> | 2001-09-21 19:22:34 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-09-21 19:22:34 (GMT) |
commit | dbb718fa8775731666bb9cbc73662fadee41ea8f (patch) | |
tree | 9081dce67bff0bca69fe2eed9e6e832126edd77e /Lib/test/test_grammar.py | |
parent | 11310bf867ae1c26d2ad9dc696bf2331709b9843 (diff) | |
download | cpython-dbb718fa8775731666bb9cbc73662fadee41ea8f.zip cpython-dbb718fa8775731666bb9cbc73662fadee41ea8f.tar.gz cpython-dbb718fa8775731666bb9cbc73662fadee41ea8f.tar.bz2 |
Make these modules work when Python is compiled without Unicode support.
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r-- | Lib/test/test_grammar.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 254e006..e5ba73e 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 |