[Python-checkins] CVS: python/dist/src/Lib/test test_re.py,1.29,1.30

Fredrik Lundh effbot@users.sourceforge.net
Thu, 22 Mar 2001 07:51:30 -0800


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

Modified Files:
	test_re.py 
Log Message:


SRE 2.1b1: don't do unicode tests under 1.5.2, or on unicode
strings/patterns.


Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** test_re.py	2001/02/09 11:54:48	1.29
--- test_re.py	2001/03/22 15:51:28	1.30
***************
*** 337,343 ****
              # Try the match on a unicode string, and check that it
              # still succeeds.
!             result = obj.search(unicode(s, "latin-1"))
!             if result is None:
!                 print '=== Fails on unicode match', t
  
              # Try the match on a unicode pattern, and check that it
--- 337,348 ----
              # Try the match on a unicode string, and check that it
              # still succeeds.
!             try:
!                 result = obj.search(unicode(s, "latin-1"))
!                 if result is None:
!                     print '=== Fails on unicode match', t
!             except NameError:
!                 continue # 1.5.2
!             except TypeError:
!                 continue # unicode test case
  
              # Try the match on a unicode pattern, and check that it