[Python-checkins] python/dist/src/Lib/test test_re.py,1.34,1.35
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Thu, 24 Apr 2003 18:40:14 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv1537
Modified Files:
test_re.py
Log Message:
Fix test_limitations(). The match there is *expected* to raise
RuntimeError.
Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** test_re.py 24 Apr 2003 19:43:18 -0000 1.34
--- test_re.py 25 Apr 2003 01:40:11 -0000 1.35
***************
*** 180,184 ****
# Try nasty case that overflows the straightforward recursive
# implementation of repeated groups.
! self.assertEqual(re.match('(x)*', 50000*'x').span(), (0, 50000))
def run_re_tests():
--- 180,189 ----
# Try nasty case that overflows the straightforward recursive
# implementation of repeated groups.
! try:
! re.match('(x)*', 50000*'x')
! except RuntimeError, v:
! self.assertEqual(str(v), "maximum recursion limit exceeded")
! else:
! self.fail("re.match('(x)*', 50000*'x') should have failed")
def run_re_tests():