[Python-checkins] CVS: python/dist/src/Lib/test test_grammar.py,1.36,1.37

Guido van Rossum gvanrossum@users.sourceforge.net
Fri, 21 Sep 2001 12:22:36 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv22030

Modified Files:
	test_grammar.py 
Log Message:
Make these modules work when Python is compiled without Unicode support.

Index: test_grammar.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_grammar.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** test_grammar.py	2001/08/27 21:50:42	1.36
--- test_grammar.py	2001/09/21 19:22:34	1.37
***************
*** 395,398 ****
--- 395,401 ----
      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'
***************
*** 400,403 ****
--- 403,407 ----
      exec u'z=1+1'
      if z != 2: raise TestFailed, 'exec u\'z=1+1\''
+ """
  f()
  g = {}