mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
Make these modules work when Python is compiled without Unicode support.
This commit is contained in:
parent
11310bf867
commit
dbb718fa87
3 changed files with 18 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue