diff options
author | Guido van Rossum <guido@python.org> | 2001-09-21 19:22:34 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-09-21 19:22:34 +0000 |
commit | dbb718fa8775731666bb9cbc73662fadee41ea8f (patch) | |
tree | 9081dce67bff0bca69fe2eed9e6e832126edd77e /Lib/test | |
parent | 11310bf867ae1c26d2ad9dc696bf2331709b9843 (diff) | |
download | cpython-git-dbb718fa8775731666bb9cbc73662fadee41ea8f.tar.gz |
Make these modules work when Python is compiled without Unicode support.
Diffstat (limited to 'Lib/test')
-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 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 |