[Python-checkins] CVS: python/dist/src/Lib/test test_sre.py,1.5,1.6
Fredrik Lundh
python-dev@python.org
Thu, 3 Aug 2000 09:29:53 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Modules _codecsmodule.c,2.4,2.5 unicodedata.c,2.3,2.4 unicodedatabase.c,2.2,2.3 unicodedatabase.h,2.2,2.3
- Next message: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.31,2.32 sre.h,2.17,2.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv12492/Lib/test
Modified Files:
test_sre.py
Log Message:
-- added recursion limit (currently ~10,000 levels)
-- improved error messages
-- factored out SRE_COUNT; the same code is used by
SRE_OP_REPEAT_ONE_TEMPLATE
-- minor cleanups
Index: test_sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sre.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** test_sre.py 2000/08/01 13:16:55 1.5
--- test_sre.py 2000/08/03 16:29:50 1.6
***************
*** 265,268 ****
--- 265,278 ----
print 'Exception raised on flag', flags
+ if verbose:
+ print 'Test engine limitations'
+
+ # Try nasty case that overflows the straightforward recursive
+ # implementation of repeated groups.
+ try:
+ assert sre.match('(x)*', 50000*'x').span() == (0, 50000)
+ except RuntimeError, v:
+ print v
+
from re_tests import *
- Previous message: [Python-checkins] CVS: python/dist/src/Modules _codecsmodule.c,2.4,2.5 unicodedata.c,2.3,2.4 unicodedatabase.c,2.2,2.3 unicodedatabase.h,2.2,2.3
- Next message: [Python-checkins] CVS: python/dist/src/Modules _sre.c,2.31,2.32 sre.h,2.17,2.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]