[Python-checkins] CVS: python/dist/src/Lib/test test_sre.py,1.22,1.23 re_tests.py,1.27,1.28

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


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

Modified Files:
	test_sre.py re_tests.py 
Log Message:


sre 2.1b2 update:

- take locale into account for word boundary anchors (#410271)
- restored 2.0's *? behaviour (#233283, #408936 and others)
- speed up re.sub/re.subn

Index: test_sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sre.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** test_sre.py	2001/02/18 12:05:16	1.22
--- test_sre.py	2001/03/22 15:50:10	1.23
***************
*** 330,333 ****
--- 330,335 ----
              except NameError:
                  pass
+             except TypeError:
+                 continue # skip unicode test strings
              else:
                  result=obj.search(u)

Index: re_tests.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** re_tests.py	2001/02/18 21:04:48	1.27
--- re_tests.py	2001/03/22 15:50:10	1.28
***************
*** 640,641 ****
--- 640,652 ----
      (r'^*', '', SYNTAX_ERROR),
  ]
+ 
+ try:
+     u = eval("u'\N{LATIN CAPITAL LETTER A WITH DIAERESIS}'")
+ except SyntaxError:
+     pass
+ else:
+     tests.extend([
+     # bug 410271: \b broken under locales
+     (r'\b.\b', 'a', SUCCEED, 'found', 'a'),
+     (r'(?u)\b.\b', u, SUCCEED, 'found', u),
+     ])