[Python-checkins] CVS: python/dist/src/Lib/test test_sre.py,1.34,1.35 re_tests.py,1.29,1.30

Fredrik Lundh effbot@users.sourceforge.net
Sun, 09 Dec 2001 08:13:17 -0800


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

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


bug #133283, #477728, #483789, #490573

backed out of broken minimal repeat patch from July

also fixed a couple of minor potential resource leaks in pattern_subx
(Guido had already fixed the big one)


Index: test_sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sre.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** test_sre.py	2001/12/08 05:11:15	1.34
--- test_sre.py	2001/12/09 16:13:15	1.35
***************
*** 297,301 ****
  test("sre.match('(x)*', 50000*'x').span()", (0, 50000), RuntimeError)
  test("sre.match(r'(x)*y', 50000*'x'+'y').span()", (0, 50001), RuntimeError)
! test("sre.match(r'(x)*?y', 50000*'x'+'y').span()", (0, 50001))
  
  from re_tests import *
--- 297,301 ----
  test("sre.match('(x)*', 50000*'x').span()", (0, 50000), RuntimeError)
  test("sre.match(r'(x)*y', 50000*'x'+'y').span()", (0, 50001), RuntimeError)
! test("sre.match(r'(x)*?y', 50000*'x'+'y').span()", (0, 50001), RuntimeError)
  
  from re_tests import *

Index: re_tests.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/re_tests.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** re_tests.py	2001/07/02 19:54:28	1.29
--- re_tests.py	2001/12/09 16:13:15	1.30
***************
*** 639,644 ****
      # bug 130748: ^* should be an error (nothing to repeat)
      (r'^*', '', SYNTAX_ERROR),
!     # bug 133283: minimizing repeat bug
!     (r'"(?:\\"|[^"])*?"', r'"\""', SUCCEED, 'found', r'"\"'),
  ]
  
--- 639,650 ----
      # bug 130748: ^* should be an error (nothing to repeat)
      (r'^*', '', SYNTAX_ERROR),
!     # bug 133283: minimizing repeat problem
!     (r'"(?:\\"|[^"])*?"', r'"\""', SUCCEED, 'found', r'"\""'),
!     # bug 477728: minimizing repeat problem
!     (r'^.*?$', 'one\ntwo\nthree\n', FAIL),
!     # bug 483789: minimizing repeat problem
!     (r'a[^>]*?b', 'a>b', FAIL),
!     # bug 490573: minimizing repeat problem
!     (r'^a*?$', 'foo', FAIL),
  ]